]> git.baikalelectronics.ru Git - kernel.git/commit
md: clear Blocked flag on failed devices when array is read-only.
authorNeil Brown <neilb@suse.de>
Wed, 17 Jun 2015 02:31:46 +0000 (12:31 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 25 Jun 2015 07:16:49 +0000 (17:16 +1000)
commit368bc6621ab92fe8186e3d7a2c4af2dd6287726e
tree8759fd4e6003feb01a0dd371f05e0b289f737349
parent4995734e85e36622aaf4fb7924a458904f173d19
md: clear Blocked flag on failed devices when array is read-only.

The Blocked flag indicates that a device has failed but that this
fact hasn't been recorded in the metadata yet.  Writes to such
devices cannot be allowed until the metadata has been updated.

On a read-only array, the Blocked flag will never be cleared.
This prevents the device being removed from the array.

If the metadata is being handled by the kernel
(i.e. !mddev->external), then we can be sure that if the array is
switch to writable, then a metadata update will happen and will
record the failure.  So we don't need the flag set.

If metadata is externally managed, it is upto the external manager
to clear the 'blocked' flag.

Reported-by: XiaoNi <xni@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md.c