OSDN Git Service

Btrfs: set scrub page's io_error if failing to submit io
authorLiu Bo <bo.li.liu@oracle.com>
Wed, 29 Mar 2017 17:55:16 +0000 (10:55 -0700)
committerDavid Sterba <dsterba@suse.com>
Tue, 18 Apr 2017 12:07:26 +0000 (14:07 +0200)
commit1bcd7aa17fc1fa29009feec3e0ac4230d0d9f700
tree0c0ffcaf4449e85de8714d177d7615dfc4e91045
parent171938e528079deced3226a17dcab12121312a64
Btrfs: set scrub page's io_error if failing to submit io

Scrub repairs data by the unit called scrub_block, which may contain
several pages.  Scrub always tries to look up a good copy of a whole
block, but if there's no such copy, it tries to do repair page by page.

If we don't set page's io_error when checking this bad copy, in the last
step, we may skip this page when repairing bad copy from good copy.

Cc: David Sterba <dsterba@suse.cz>
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/scrub.c