summaryrefslogtreecommitdiffstats
path: root/super1.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-02-02 03:19:57 +0000
committerNeil Brown <neilb@suse.de>2006-02-02 03:19:57 +0000
commit561832f9d4a162b40190c70e872be46ec7218aea (patch)
tree33f9f3164e511c1886356ae9fac5ac8d7424ede0 /super1.c
parent881990a2e440d58d2c1d070e9005225f56d21260 (diff)
downloadmdadm-561832f9d4a162b40190c70e872be46ec7218aea.tar.gz
mdadm-561832f9d4a162b40190c70e872be46ec7218aea.tar.xz
mdadm-561832f9d4a162b40190c70e872be46ec7218aea.zip
Some little bits and pieces...
I'm obviously bored of writing changelog entries. Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'super1.c')
-rw-r--r--super1.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/super1.c b/super1.c
index afe2998..b4af6cc 100644
--- a/super1.c
+++ b/super1.c
@@ -694,14 +694,14 @@ static int write_init_super1(struct supertype *st, void *sbv,
sb_offset &= ~(4*2-1);
sb->super_offset = __cpu_to_le64(sb_offset);
sb->data_offset = __cpu_to_le64(0);
- if (sb_offset-64*2 >= array_size)
+ if (sb_offset-64*2 >= array_size && array_size > 8*1024*1024*2)
sb->data_size = __cpu_to_le64(sb_offset-64*2);
else
sb->data_size = __cpu_to_le64(sb_offset);
break;
case 1:
sb->super_offset = __cpu_to_le64(0);
- if (dsize - 64*2 >= array_size)
+ if (dsize - 64*2 >= array_size && array_size > 8*1024*1024*2)
space = 64*2;
else
space = 4*2;
@@ -710,7 +710,7 @@ static int write_init_super1(struct supertype *st, void *sbv,
break;
case 2:
sb_offset = 4*2;
- if (dsize - 4*2 - 64*2 >= array_size)
+ if (dsize - 4*2 - 64*2 >= array_size && array_size > 8*1024*1024*2)
space = 64*2;
else
space = 4*2;