diff options
author | Neil Brown <neilb@suse.de> | 2006-02-02 03:19:57 +0000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2006-02-02 03:19:57 +0000 |
commit | 561832f9d4a162b40190c70e872be46ec7218aea (patch) | |
tree | 33f9f3164e511c1886356ae9fac5ac8d7424ede0 /super1.c | |
parent | 881990a2e440d58d2c1d070e9005225f56d21260 (diff) | |
download | mdadm-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |