diff options
author | NeilBrown <neilb@suse.de> | 2013-08-14 09:06:22 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2013-08-14 09:16:35 +0200 |
commit | 4c0ea7b0d97f73ed18164bfdaa0b59d49e03a6cf (patch) | |
tree | ae8c5e7c19582c6008ac95c1b9df95f9cd2360dd /super1.c | |
parent | Fix bug with adding to 0.90 array (diff) | |
download | mdadm-4c0ea7b0d97f73ed18164bfdaa0b59d49e03a6cf.tar.xz mdadm-4c0ea7b0d97f73ed18164bfdaa0b59d49e03a6cf.zip |
super1: fix setting of data_offset for 1.0 metadata.
commit 23bf42cc79d46de019d4b27c16354a191a98ed41
super1: simplify setting of array size.
removed the setting for sb->data_offset for 1.0 metadata for some reason,
and messed up the size calculation for 1.0 metadata too.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super1.c')
-rw-r--r-- | super1.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1638,6 +1638,7 @@ static int write_init_super1(struct supertype *st) sb_offset = dsize; sb_offset -= 8*2; sb_offset &= ~(4*2-1); + sb->data_offset = __cpu_to_le64(data_offset); sb->super_offset = __cpu_to_le64(sb_offset); if (sb_offset < array_size + bm_space) bm_space = sb_offset - array_size; @@ -2311,7 +2312,7 @@ static int validate_geometry1(struct supertype *st, int level, case 0: /* metadata at end. Round down and subtract space to reserve */ devsize = (devsize & ~(4ULL*2-1)); /* space for metadata, bblog, bitmap */ - devsize -= 8*2 - 8 - bmspace; + devsize -= 8*2 + 8 + bmspace; break; case 1: case 2: |