summaryrefslogtreecommitdiffstats
path: root/drivers/md/bitmap.h
diff options
context:
space:
mode:
authorGuoqing Jiang <gqjiang@suse.com>2017-03-01 09:42:39 +0100
committerShaohua Li <shli@fb.com>2017-03-17 00:55:50 +0100
commitb98938d16a108d0201d54b8db1337dac71aebfdd (patch)
tree2005c989bfe629751fa7349d808cd541695a1930 /drivers/md/bitmap.h
parentmd-cluster: add CHANGE_CAPACITY message type (diff)
downloadlinux-b98938d16a108d0201d54b8db1337dac71aebfdd.tar.xz
linux-b98938d16a108d0201d54b8db1337dac71aebfdd.zip
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>
Diffstat (limited to 'drivers/md/bitmap.h')
-rw-r--r--drivers/md/bitmap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/bitmap.h b/drivers/md/bitmap.h
index 5b6dd63dda91..9f761097aab2 100644
--- a/drivers/md/bitmap.h
+++ b/drivers/md/bitmap.h
@@ -267,8 +267,10 @@ void bitmap_daemon_work(struct mddev *mddev);
int bitmap_resize(struct bitmap *bitmap, sector_t blocks,
int chunksize, int init);
+struct bitmap *get_bitmap_from_slot(struct mddev *mddev, int slot);
int bitmap_copy_from_slot(struct mddev *mddev, int slot,
sector_t *lo, sector_t *hi, bool clear_bits);
+void bitmap_free(struct bitmap *bitmap);
#endif
#endif