summaryrefslogtreecommitdiff
path: root/drivers/md/persistent-data/dm-space-map-common.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2017-03-15 06:05:12 +0300
committerShaohua Li <shli@fb.com>2017-03-23 05:15:57 +0300
commit16d997b78b157315f5c90fcbc2f9ce575cb3879f (patch)
treeae10253861afd7ce27aae967a4cf075f4b2621af /drivers/md/persistent-data/dm-space-map-common.c
parent497280509f32340d90feac030bce18006a3e3605 (diff)
downloadlinux-16d997b78b157315f5c90fcbc2f9ce575cb3879f.tar.xz
md/raid5: simplfy delaying of writes while metadata is updated.
If a device fails during a write, we must ensure the failure is recorded in the metadata before the completion of the write is acknowleged. Commit c3cce6cda162 ("md/raid5: ensure device failure recorded before write request returns.") added code for this, but it was unnecessarily complicated. We already had similar functionality for handling updates to the bad-block-list, thanks to Commit de393cdea66c ("md: make it easier to wait for bad blocks to be acknowledged.") So revert most of the former commit, and instead avoid collecting completed writes if MD_CHANGE_PENDING is set. raid5d() will then flush the metadata and retry the stripe_head. As this change can leave a stripe_head ready for handling immediately after handle_active_stripes() returns, we change raid5_do_work() to pause when MD_CHANGE_PENDING is set, so that it doesn't spin. We check MD_CHANGE_PENDING *after* analyse_stripe() as it could be set asynchronously. After analyse_stripe(), we have collected stable data about the state of devices, which will be used to make decisions. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/persistent-data/dm-space-map-common.c')
0 files changed, 0 insertions, 0 deletions