diff options
author | Goldwyn Rodrigues <rgoldwyn@suse.com> | 2015-08-19 07:38:27 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.com> | 2015-09-28 11:47:04 +1000 |
commit | 6d9c7c2551ca31a800f61e36192ee12be20974b1 (patch) | |
tree | 274d6d765afe842a757e762b1793a27ea2e12211 /Create.c | |
parent | ccc93b33ca01b85b503cc9c81434967fabfa4330 (diff) | |
download | mdadm-6d9c7c2551ca31a800f61e36192ee12be20974b1.tar.gz |
Increment version for clustered bitmaps
Add BITMAP_MAJOR_CLUSTERED as 5, in order to prevent older kernels
to assemble a clustered device.
In order to maximize compatibility, the major version is set to
BITMAP_MAJOR_CLUSTERED *only* if the bitmap is clustered.
Also, added MD_FEATURE_CLUSTERED in order to return error
for older kernels which would assemble MD in case bitmap is
corrupted.
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to 'Create.c')
-rw-r--r-- | Create.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -114,6 +114,8 @@ int Create(struct supertype *st, char *mddev, unsigned long long newsize; int major_num = BITMAP_MAJOR_HI; + if (s->bitmap_file && strcmp(s->bitmap_file, "clustered") == 0) + major_num = BITMAP_MAJOR_CLUSTERED; memset(&info, 0, sizeof(info)); if (s->level == UnSet && st && st->ss->default_geometry) |