diff options
author | Guoqing Jiang <gqjiang@suse.com> | 2015-06-10 07:42:04 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2015-06-16 23:54:03 +0200 |
commit | 95a05b37e8eb2bc0803b1a0298fce6adc60eff16 (patch) | |
tree | d57af663338ae8a79466d74bd9dc2f744acfed6d /bitmap.c | |
parent | Grow: fix a couple of typos. (diff) | |
download | mdadm-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.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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) |