]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
Btrfs: Separate finding-right-mirror and writing-to-target's process in scrub_handle_...
authorZhao Lei <zhaolei@cn.fujitsu.com>
Tue, 20 Jan 2015 07:11:40 +0000 (15:11 +0800)
committerChris Mason <clm@fb.com>
Thu, 22 Jan 2015 02:06:49 +0000 (18:06 -0800)
commit8d6738c1bd74a27ff6a5043c5211c7bff7745420
tree5a62834b17957c5ec0bb274799864e4274a11eb6
parentdc5f7a3bd820883793bb0d9789e938a34aa4da5f
Btrfs: Separate finding-right-mirror and writing-to-target's process in scrub_handle_errored_block()

In corrent code, code of finding-right-mirror and writing-to-target
are mixed in logic, if we find a right mirror but failed in writing
to target, it will treat as "hadn't found right block", and fill the
target with sblock_bad.

Actually, "failed in writing to target" does not mean "source
block is wrong", this patch separate above two condition in logic,
and do some cleanup to make code clean.

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