]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid1: add failfast handling for writes.
authorNeilBrown <neilb@suse.com>
Fri, 18 Nov 2016 05:16:12 +0000 (16:16 +1100)
committerShaohua Li <shli@fb.com>
Tue, 22 Nov 2016 17:14:10 +0000 (09:14 -0800)
commit6ebc029f52264b758acafa424e34a969013cab0f
tree8c7cdf4eb6191d1d0210b524eccb9b7e88e2c378
parenta2540fb64f62946011a1701b80bde0ab49054cdf
md/raid1: add failfast handling for writes.

When writing to a fastfail device we use MD_FASTFAIL unless
it is the only device being written to.

For resync/recovery, assume there was a working device to
read from so always use REQ_FASTFAIL_DEV.

If a write for resync/recovery fails, we just fail the
device - there is not much else to do.

If a normal failfast write fails, but the device cannot be
failed (must be only one left), we queue for write error
handling.  This will call narrow_write_error() to retry the
write synchronously and without any FAILFAST flags.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/raid1.c