]> git.karo-electronics.de Git - linux-beck.git/commit
md: cleanup mddev flag clear for takeover
authorShaohua Li <shli@fb.com>
Thu, 5 Jan 2017 00:10:19 +0000 (16:10 -0800)
committerShaohua Li <shli@fb.com>
Thu, 5 Jan 2017 19:45:18 +0000 (11:45 -0800)
commit394ed8e4743b0cfc5496fe49059fbfc2bc8eae35
tree65412c7b017be0fc1a2316f4a0778328421a0f4c
parent99f17890f04cff0262de7393c60a2f6d9c9c7e71
md: cleanup mddev flag clear for takeover

Commit 6995f0b (md: takeover should clear unrelated bits) clear
unrelated bits, but it's quite fragile. To avoid error in the future,
define a macro for unsupported mddev flags for each raid type and use it
to clear unsupported mddev flags. This should be less error-prone.

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