diff options
author | Guoqing Jiang <gqjiang@suse.com> | 2015-06-10 13:42:04 +0800 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2015-06-17 07:54:03 +1000 |
commit | 95a05b37e8eb2bc0803b1a0298fce6adc60eff16 (patch) | |
tree | d57af663338ae8a79466d74bd9dc2f744acfed6d /bitmap.h | |
parent | 2a6493cfe14e81b4ddf5c339890719c71df01419 (diff) | |
download | mdadm-95a05b37e8eb2bc0803b1a0298fce6adc60eff16.tar.gz |
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.h')
-rw-r--r-- | bitmap.h | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -154,8 +154,11 @@ typedef struct bitmap_super_s { __u32 chunksize; /* 52 the bitmap chunk size in bytes */ __u32 daemon_sleep; /* 56 seconds between disk flushes */ __u32 write_behind; /* 60 number of outstanding write-behind writes */ - - __u8 pad[256 - 64]; /* set to zero */ + __u32 sectors_reserved; /* 64 number of 512-byte sectors that are + * reserved for the bitmap. */ + __u32 nodes; /* 68 the maximum number of nodes in cluster. */ + __u8 cluster_name[64]; /* 72 cluster name to which this md belongs */ + __u8 pad[256 - 136]; /* set to zero */ } bitmap_super_t; /* notes: |