md-cluster: re-add capabilities
authorGoldwyn Rodrigues <rgoldwyn@suse.de>
Tue, 14 Apr 2015 15:45:42 +0000 (10:45 -0500)
committerNeilBrown <neilb@suse.de>
Tue, 21 Apr 2015 21:59:39 +0000 (07:59 +1000)
commit97f6cd39da227459cb46ed4088d37d5d8db51c50
tree129f07ab60f7f7fd4b6ac792bb29d40bcf938aa1
parenta6da4ef85cef0382244fc588c901e133a2ec5109
md-cluster: re-add capabilities

When "re-add" is writted to /sys/block/mdXX/md/dev-YYY/state,
the clustered md:

1. Sends RE_ADD message with the desc_nr. Nodes receiving the message
   clear the Faulty bit in their respective rdev->flags.
2. The node initiating re-add, gathers the bitmaps of all nodes
   and copies them into the local bitmap. It does not clear the bitmap
   from which it is copying.
3. Initiating node schedules a md recovery to sync the devices.

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