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)
commitced96edc48ba455b0982c3aa64d3cc3bf2d0816a
tree44967160e52bb4b5cd82d1ad6308702ce77e24af
parente570fd27f2c5d7eac3876bccf99e9838d7f911a3
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