diff options
author | Goldwyn Rodrigues <rgoldwyn@suse.com> | 2015-08-19 07:35:54 +1000 |
---|---|---|
committer | Goldwyn Rodrigues <rgoldwyn@suse.com> | 2015-10-12 01:31:33 -0500 |
commit | 3c462c880b52aae2cfbbb8db8b401eef118cc128 (patch) | |
tree | 47df3599c19db234cccf92933ab396926ee4b49b /drivers/md/md.c | |
parent | 9ed38ff53090856769b99e9d2f19740fb11e6956 (diff) | |
download | lwn-3c462c880b52aae2cfbbb8db8b401eef118cc128.tar.gz lwn-3c462c880b52aae2cfbbb8db8b401eef118cc128.zip |
md: 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.
Added MD_FEATURE_CLUSTERED in order to return error for older
kernels which would assemble MD even if the bitmap is corrupted.
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index c702de18207a..1e1bdd86f40c 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -1735,6 +1735,9 @@ static void super_1_sync(struct mddev *mddev, struct md_rdev *rdev) } } + if (mddev_is_clustered(mddev)) + sb->feature_map |= cpu_to_le32(MD_FEATURE_CLUSTERED); + if (rdev->badblocks.count == 0) /* Nothing to do for bad blocks*/ ; else if (sb->bblog_offset == 0) |