diff options
author | NeilBrown <neilb@suse.com> | 2016-11-18 16:16:11 +1100 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2016-11-22 09:11:33 -0800 |
commit | 46533ff7fefb7e9e3539494f5873b00091caa8eb (patch) | |
tree | c594fb27cb08069d7ce63bcaa5439d5e7313a6aa /drivers/md/raid1.c | |
parent | 688834e6ae6b21e3d98b5cf2586aa4a9b515c3a0 (diff) | |
download | lwn-46533ff7fefb7e9e3539494f5873b00091caa8eb.tar.gz lwn-46533ff7fefb7e9e3539494f5873b00091caa8eb.zip |
md: Use REQ_FAILFAST_* on metadata writes where appropriate
This can only be supported on personalities which ensure
that md_error() never causes an array to enter the 'failed'
state. i.e. if marking a device Faulty would cause some
data to be inaccessible, the device is status is left as
non-Faulty. This is true for RAID1 and RAID10.
If we get a failure writing metadata but the device doesn't
fail, it must be the last device so we re-write without
FAILFAST to improve chance of success. We also flag the
device as LastDev so that future metadata updates don't
waste time on failfast writes.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r-- | drivers/md/raid1.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index d24adc50a31f..4006a9be2eab 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -2988,6 +2988,7 @@ static int raid1_run(struct mddev *mddev) mddev->thread = conf->thread; conf->thread = NULL; mddev->private = conf; + set_bit(MD_FAILFAST_SUPPORTED, &mddev->flags); md_set_array_sectors(mddev, raid1_size(mddev, 0, 0)); |