md-cluster: sync bitmap when node received RESYNCING msg
authorGuoqing Jiang <gqjiang@suse.com>
Mon, 2 May 2016 15:50:12 +0000 (11:50 -0400)
committerShaohua Li <shli@fb.com>
Wed, 4 May 2016 19:39:35 +0000 (12:39 -0700)
commit18c9ff7f487efa8e88886bee21bd3516dde05bc5
treeae819ad9bda782b06bfa86281cc432afef3134ff
parentc9d65032282943d11b2773ed6f0279ba4820fed1
md-cluster: sync bitmap when node received RESYNCING msg

If the node received RESYNCING message which means
another node will perform resync with the area, then
we don't want to do it again in another node.

Let's set RESYNC_MASK and clear NEEDED_MASK for the
region from old-low to new-low which has finished
syncing, and the region from old-hi to new-hi is about
to syncing, bitmap_sync_with_cluste is introduced for
the purpose.

Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/bitmap.c
drivers/md/bitmap.h
drivers/md/md-cluster.c