]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Skip scrubbing removed chunks to avoid -ENOENT.
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Thu, 19 Jun 2014 02:42:51 +0000 (10:42 +0800)
committerChris Mason <clm@fb.com>
Thu, 19 Jun 2014 21:20:54 +0000 (14:20 -0700)
commitea911fe9b2a34199d34d05c646aeb705cb4f8b96
tree44967160e52bb4b5cd82d1ad6308702ce77e24af
parent4eef8db707497243758168c6c064378d97e9182d
btrfs: Skip scrubbing removed chunks to avoid -ENOENT.

When run scrub with balance, sometimes -ENOENT will be returned, since
in scrub_enumerate_chunks() will search dev_extent in *COMMIT_ROOT*, but
btrfs_lookup_block_group() will search block group in *MEMORY*, so if a
chunk is removed but not committed, -ENOENT will be returned.

However, there is no need to stop scrubbing since other chunks may be
scrubbed without problem.

So this patch changes the behavior to skip removed chunks and continue
to scrub the rest.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/scrub.c