]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
md: wait for pending superblock updates before switching to read-only
authorNeilBrown <neilb@suse.com>
Thu, 24 Sep 2015 04:00:51 +0000 (14:00 +1000)
committerNeilBrown <neilb@suse.com>
Fri, 2 Oct 2015 07:23:43 +0000 (17:23 +1000)
commit88724bfa68be792c1487d759e87568c36ac1a1cc
tree12cf787a5922610396529d90ae82ccaf223a57d9
parentbcee19f424a0d8c26ecf2607b73c690802658b29
md: wait for pending superblock updates before switching to read-only

If a superblock update is pending, wait for it to complete before
letting md_set_readonly() switch to readonly.
Otherwise we might lose important information about a device having
failed.

For external arrays, waiting for superblock updates can wait on
user-space, so in that case, just return an error.

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