]> git.hungrycats.org Git - linux/commitdiff
Btrfs: output warning instead of error when loading free space cache failed
authorMiao Xie <miaox@cn.fujitsu.com>
Thu, 24 Apr 2014 05:31:55 +0000 (13:31 +0800)
committerJiri Slaby <jslaby@suse.cz>
Wed, 2 Jul 2014 10:06:36 +0000 (12:06 +0200)
commit 32d6b47fe6fc1714d5f1bba1b9f38e0ab0ad58a8 upstream.

If we fail to load a free space cache, we can rebuild it from the extent tree,
so it is not a serious error, we should not output a error message that
would make the users uncomfortable. This patch uses warning message instead
of it.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
fs/btrfs/free-space-cache.c

index b4f9904c4c6b2ed5f0da30ad664baf33100a879c..5467f84560fe23c30b78e3073d07853a57cbecfc 100644 (file)
@@ -832,7 +832,7 @@ int load_free_space_cache(struct btrfs_fs_info *fs_info,
 
        if (!matched) {
                __btrfs_remove_free_space_cache(ctl);
-               btrfs_err(fs_info, "block group %llu has wrong amount of free space",
+               btrfs_warn(fs_info, "block group %llu has wrong amount of free space",
                        block_group->key.objectid);
                ret = -1;
        }
@@ -844,7 +844,7 @@ out:
                spin_unlock(&block_group->lock);
                ret = 0;
 
-               btrfs_err(fs_info, "failed to load free space cache for block group %llu",
+               btrfs_warn(fs_info, "failed to load free space cache for block group %llu, rebuild it now",
                        block_group->key.objectid);
        }