]> 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)
commitb45d0206a7fa577bd47784d773308f3021a5c1d7
tree44967160e52bb4b5cd82d1ad6308702ce77e24af
parent0b762ca2ca197c95e706cd128dfbd705db8563e6
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