]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md-cluster: introduce cluster_check_sync_size
authorGuoqing Jiang <gqjiang@suse.com>
Wed, 1 Mar 2017 08:42:39 +0000 (16:42 +0800)
committerShaohua Li <shli@fb.com>
Thu, 16 Mar 2017 23:55:50 +0000 (16:55 -0700)
commitb98938d16a108d0201d54b8db1337dac71aebfdd
tree2005c989bfe629751fa7349d808cd541695a1930
parent7da3d203330305695f38302c076ee0d32c005ede
md-cluster: introduce cluster_check_sync_size

Support resize is a little complex for clustered
raid, since we need to ensure all the nodes share
the same knowledge about the size of raid.

We achieve the goal by check the sync_size which
is in each node's bitmap, we can only change the
capacity after cluster_check_sync_size returns 0.

Also, get_bitmap_from_slot is added to get a slot's
bitmap. And we exported some funcs since they are
used in cluster_check_sync_size().

We can also reuse get_bitmap_from_slot to remove
redundant code existed in bitmap_copy_from_slot.

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