Safeguard against writing to an active device of another node
authorGuoqing Jiang <gqjiang@suse.com>
Mon, 19 Oct 2015 08:03:19 +0000 (16:03 +0800)
committerNeilBrown <neilb@suse.com>
Wed, 21 Oct 2015 00:19:05 +0000 (11:19 +1100)
commitd15a1f72bd92bc4724ee94b2ae8132633ffeb72b
tree4e47c3a55d0edca1b255eb429647df358a9482b6
parent28d744468e0ec839cdfc4400ea7176ced5ebbc1d
Safeguard against writing to an active device of another node

Modifying an exiting device's superblock or creating a new superblock
on an existing device needs to be checked because the device could be
in use by another node in another array. So, we check this by taking
all superblock locks in userspace so that we don't  step onto an active
device used by another node and safeguard against accidental edits.
After the edit is complete, we release all locks and the lockspace so
that it can be used by the kernel space.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: NeilBrown <neilb@suse.com>
Makefile
mdadm.c
mdadm.h
super1.c
util.c