summaryrefslogtreecommitdiffstats
path: root/bitmap.c
diff options
context:
space:
mode:
authorGuoqing Jiang <gqjiang@suse.com>2015-06-10 07:42:04 +0200
committerNeilBrown <neilb@suse.de>2015-06-16 23:54:03 +0200
commit95a05b37e8eb2bc0803b1a0298fce6adc60eff16 (patch)
treed57af663338ae8a79466d74bd9dc2f744acfed6d /bitmap.c
parentGrow: fix a couple of typos. (diff)
downloadmdadm-95a05b37e8eb2bc0803b1a0298fce6adc60eff16.tar.xz
mdadm-95a05b37e8eb2bc0803b1a0298fce6adc60eff16.zip
Create n bitmaps for clustered mode
For a clustered MD, create bitmaps equal to number of nodes so each node has an independent bitmap. Only the first bitmap is has the bits set so that the first node that assembles the device also performs the sync. The bitmaps are aligned to 4k boundaries. On-disk format: 0 4k 8k 12k ------------------------------------------------------------------- | idle | md super | bm super [0] + bits | | bm bits[0, contd] | bm super[1] + bits | bm bits[1, contd] | | bm super[2] + bits | bm bits [2, contd] | bm super[3] + bits | | bm bits [3, contd] | | | Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com> Signed-off-by: Guoqing Jiang <gqjiang@suse.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'bitmap.c')
-rw-r--r--bitmap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bitmap.c b/bitmap.c
index b1d54a6f..920033ad 100644
--- a/bitmap.c
+++ b/bitmap.c
@@ -32,6 +32,8 @@ inline void sb_le_to_cpu(bitmap_super_t *sb)
sb->daemon_sleep = __le32_to_cpu(sb->daemon_sleep);
sb->sync_size = __le64_to_cpu(sb->sync_size);
sb->write_behind = __le32_to_cpu(sb->write_behind);
+ sb->nodes = __le32_to_cpu(sb->nodes);
+ sb->sectors_reserved = __le32_to_cpu(sb->sectors_reserved);
}
inline void sb_cpu_to_le(bitmap_super_t *sb)