md-cluster: append some actions when change bitmap from clustered to none
authorGuoqing Jiang <gqjiang@suse.com>
Sun, 20 Dec 2015 23:51:00 +0000 (10:51 +1100)
committerNeilBrown <neilb@suse.com>
Wed, 6 Jan 2016 00:38:57 +0000 (11:38 +1100)
commitf6a2dc64ee74477c966f5220b1f560ed6308d010
treeb371e1cbeb71c2e04e45be01c4964faace6ec400
parent09afd2a8d6ad2c40f3c1ae0b3f83784864cf4c15
md-cluster: append some actions when change bitmap from clustered to none

For clustered raid, we need to do extra actions when change
bitmap to none.

1. check if all the bitmap lock could be get or not, if yes then
   we can continue the change since cluster raid is only active
   in current node. Otherwise return fail and unlock the related
   bitmap locks
2. set nodes to 0 and then leave cluster environment.
3. release other nodes's bitmap lock.

Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: NeilBrown <neilb@suse.com>
drivers/md/md-cluster.c
drivers/md/md-cluster.h
drivers/md/md.c