summaryrefslogtreecommitdiffstats
path: root/super0.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2005-10-11 04:44:44 +0000
committerNeil Brown <neilb@suse.de>2005-10-11 04:44:44 +0000
commitdcec9ee54779586f287f5db98ab1be3f0f02dd3f (patch)
tree053ff57337183f7b975433ad45f74a8cb245cdf9 /super0.c
parent5a6d7f456ad67779321d8aa81203f70bcc56a0a5 (diff)
downloadmdadm-dcec9ee54779586f287f5db98ab1be3f0f02dd3f.tar.gz
mdadm-dcec9ee54779586f287f5db98ab1be3f0f02dd3f.tar.xz
mdadm-dcec9ee54779586f287f5db98ab1be3f0f02dd3f.zip
Create version-4 bitmaps if kernel supports it.
Version-3 bitmaps are host-endian. Version-4 are little-endian and so more portable. Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'super0.c')
-rw-r--r--super0.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/super0.c b/super0.c
index 95968d3..4ab40af 100644
--- a/super0.c
+++ b/super0.c
@@ -657,7 +657,7 @@ static __u64 avail_size0(struct supertype *st, __u64 devsize)
return MD_NEW_SIZE_SECTORS(devsize);
}
-static int add_internal_bitmap0(struct supertype *st, void *sbv, int chunk, int delay, int write_behind, int *sizep, int may_change)
+static int add_internal_bitmap0(struct supertype *st, void *sbv, int chunk, int delay, int write_behind, int *sizep, int may_change, int major)
{
/*
* The bitmap comes immediately after the superblock and must be 60K in size
@@ -688,7 +688,7 @@ static int add_internal_bitmap0(struct supertype *st, void *sbv, int chunk, int
memset(bms, sizeof(*bms), 0);
bms->magic = __cpu_to_le32(BITMAP_MAGIC);
- bms->version = __cpu_to_le32(BITMAP_MAJOR);
+ bms->version = __cpu_to_le32(major);
uuid_from_super0((int*)bms->uuid, sb);
bms->chunksize = __cpu_to_le32(chunk);
bms->daemon_sleep = __cpu_to_le32(delay);