summaryrefslogtreecommitdiffstats
path: root/drivers/md/bitmap.h
diff options
context:
space:
mode:
authorGoldwyn Rodrigues <rgoldwyn@suse.com>2014-06-07 00:36:26 -0500
committerGoldwyn Rodrigues <rgoldwyn@suse.com>2015-02-23 09:59:05 -0600
commit11dd35daaab86d12270d23a10e8d242846a8830a (patch)
tree59e531ed5e28e9768768aa430c9848ef6d843105 /drivers/md/bitmap.h
parentf9209a323547f054c7439a3bf67c45e64a054bdd (diff)
downloadlinux-11dd35daaab86d12270d23a10e8d242846a8830a.tar.bz2
Copy set bits from another slot
bitmap_copy_from_slot reads the bitmap from the slot mentioned. It then copies the set bits to the node local bitmap. This is helper function for the resync operation on node failure. bitmap_set_memory_bits() currently assumes it is only run at startup and that they bitmap is currently empty. So if it finds that a region is already marked as dirty, it won't mark it dirty again. Change bitmap_set_memory_bits() to always set the NEEDED_MASK bit if 'needed' is set. Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.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 67c7f77c67dd..4aabc74ef7b9 100644
--- a/drivers/md/bitmap.h
+++ b/drivers/md/bitmap.h
@@ -262,6 +262,8 @@ void bitmap_daemon_work(struct mddev *mddev);
int bitmap_resize(struct bitmap *bitmap, sector_t blocks,
int chunksize, int init);
+int bitmap_copy_from_slot(struct mddev *mddev, int slot,
+ sector_t *lo, sector_t *hi);
#endif
#endif