diff options
-rw-r--r-- | Create.c | 13 | ||||
-rw-r--r-- | tests/00raid1 | 4 | ||||
-rw-r--r-- | tests/05r1-bitmapfile | 6 | ||||
-rw-r--r-- | tests/05r1-grow-external | 4 | ||||
-rw-r--r-- | tests/05r1-grow-internal | 4 | ||||
-rw-r--r-- | tests/05r1-grow-internal-1 | 4 | ||||
-rw-r--r-- | tests/05r1-internalbitmap | 6 | ||||
-rw-r--r-- | tests/05r1-internalbitmap-v1a | 6 | ||||
-rw-r--r-- | tests/05r1-internalbitmap-v1b | 6 | ||||
-rw-r--r-- | tests/05r1-internalbitmap-v1c | 6 | ||||
-rw-r--r-- | tests/05r1-n3-bitmapfile | 6 | ||||
-rw-r--r-- | tests/05r1-re-add | 4 | ||||
-rw-r--r-- | tests/05r1-re-add-nosuper | 4 | ||||
-rw-r--r-- | tests/06wrmostly | 4 | ||||
-rw-r--r-- | tests/07autoassemble | 6 | ||||
-rw-r--r-- | tests/09imsm-assemble | 6 | ||||
-rw-r--r-- | tests/09imsm-create-fail-rebuild | 2 | ||||
-rw-r--r-- | tests/10ddf-create | 2 |
18 files changed, 53 insertions, 40 deletions
@@ -280,6 +280,13 @@ int Create(struct supertype *st, char *mddev, if (size == 0) { size = newsize / 2; + if (level == 1) + /* If this is ever reshaped to RAID5, we will + * need a chunksize. So round it off a bit + * now just to be safe + */ + size &= ~(64ULL-1); + if (size && verbose > 0) fprintf(stderr, Name ": setting size to %lluK\n", (unsigned long long)size); @@ -482,6 +489,12 @@ int Create(struct supertype *st, char *mddev, return 1; } size = minsize; + if (level == 1) + /* If this is ever reshaped to RAID5, we will + * need a chunksize. So round it off a bit + * now just to be safe + */ + size &= ~(64ULL-1); if (verbose > 0) fprintf(stderr, Name ": size set to %lluK\n", size); } diff --git a/tests/00raid1 b/tests/00raid1 index e91c5866..eb9a658c 100644 --- a/tests/00raid1 +++ b/tests/00raid1 @@ -6,14 +6,14 @@ mdadm -CR $md0 -l 1 -n2 $dev0 $dev1 check resync check raid1 -testdev $md0 1 $mdsize1a 1 +testdev $md0 1 $mdsize1a 64 mdadm -S $md0 # now with version-0.90 superblock, spare mdadm -CR $md0 -e0.90 --level=raid1 -n3 -x2 $dev0 missing missing $dev1 $dev2 check recovery check raid1 -testdev $md0 1 $mdsize0 1 +testdev $md0 1 $mdsize0 64 mdadm -S $md0 # now with no superblock diff --git a/tests/05r1-bitmapfile b/tests/05r1-bitmapfile index 953613d7..e1fc3de8 100644 --- a/tests/05r1-bitmapfile +++ b/tests/05r1-bitmapfile @@ -6,11 +6,11 @@ bmf=$targetdir/bitmap rm -f $bmf mdadm --create --run $md0 --level=1 -n2 --delay=1 --bitmap $bmf $dev1 $dev2 check wait -testdev $md0 1 $mdsize1a 1 +testdev $md0 1 $mdsize1a 64 mdadm -S $md0 mdadm --assemble $md0 --bitmap=$bmf $dev1 $dev2 -testdev $md0 1 $mdsize1a 1 +testdev $md0 1 $mdsize1a 64 dirty1=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty2=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` @@ -20,7 +20,7 @@ then echo >&2 "ERROR bad 'dirty' counts: $dirty1 and $dirty2" exit 1 fi mdadm $md0 -f $dev1 -testdev $md0 1 $mdsize1a 1 +testdev $md0 1 $mdsize1a 64 sleep 4 dirty3=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` if [ $dirty3 -lt 400 ] diff --git a/tests/05r1-grow-external b/tests/05r1-grow-external index 0d93adbb..49666369 100644 --- a/tests/05r1-grow-external +++ b/tests/05r1-grow-external @@ -4,7 +4,7 @@ # mdadm --create --run $md0 -l 1 -n 2 $dev1 $dev2 check wait -testdev $md0 1 $mdsize1a 1 +testdev $md0 1 $mdsize1a 64 bmf=$targetdir/bm rm -f $bmf @@ -14,7 +14,7 @@ dirty1=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty2=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` -testdev $md0 1 $mdsize1a 1 +testdev $md0 1 $mdsize1a 64 dirty3=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty4=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` diff --git a/tests/05r1-grow-internal b/tests/05r1-grow-internal index f1dbe8e2..a648b440 100644 --- a/tests/05r1-grow-internal +++ b/tests/05r1-grow-internal @@ -4,7 +4,7 @@ # mdadm --create --run $md0 -l 1 -n 2 $dev1 $dev2 check wait -testdev $md0 1 $mdsize1a 1 +testdev $md0 1 $mdsize1a 64 #mdadm -E $dev1 mdadm --grow $md0 --bitmap=internal --bitmap-chunk=4 --delay=1 || { mdadm -X $dev2 ; exit 1; } @@ -12,7 +12,7 @@ dirty1=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty2=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` -testdev $md0 1 $mdsize1a 1 +testdev $md0 1 $mdsize1a 64 dirty3=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty4=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` diff --git a/tests/05r1-grow-internal-1 b/tests/05r1-grow-internal-1 index 7539fadf..a110f3b0 100644 --- a/tests/05r1-grow-internal-1 +++ b/tests/05r1-grow-internal-1 @@ -4,7 +4,7 @@ # mdadm --create --run $md0 -e1 -l 1 -n 2 $dev1 $dev2 check wait -testdev $md0 1 $mdsize1b 1 +testdev $md0 1 $mdsize1b 64 #mdadm -E $dev1 mdadm --grow $md0 --bitmap=internal --bitmap-chunk=4 --delay=1 @@ -12,7 +12,7 @@ dirty1=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty2=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` -testdev $md0 1 $mdsize1b 1 +testdev $md0 1 $mdsize1b 64 dirty3=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty4=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` diff --git a/tests/05r1-internalbitmap b/tests/05r1-internalbitmap index 68d65e42..2bfeab8e 100644 --- a/tests/05r1-internalbitmap +++ b/tests/05r1-internalbitmap @@ -4,11 +4,11 @@ # mdadm --create -e0.90 --run $md0 --level=1 -n2 --delay=1 --bitmap internal --bitmap-chunk=4 $dev1 $dev2 check wait -testdev $md0 1 $mdsize0 1 +testdev $md0 1 $mdsize0 64 mdadm -S $md0 mdadm --assemble $md0 $dev1 $dev2 -testdev $md0 1 $mdsize0 1 +testdev $md0 1 $mdsize0 64 dirty1=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty2=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` @@ -18,7 +18,7 @@ then echo >&2 "ERROR bad 'dirty' counts: $dirty1 and $dirty2" exit 1 fi mdadm $md0 -f $dev1 -testdev $md0 1 $mdsize0 1 +testdev $md0 1 $mdsize0 64 sleep 4 dirty3=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` if [ $dirty3 -lt 400 ] diff --git a/tests/05r1-internalbitmap-v1a b/tests/05r1-internalbitmap-v1a index f9b08e8c..3fcb0249 100644 --- a/tests/05r1-internalbitmap-v1a +++ b/tests/05r1-internalbitmap-v1a @@ -5,11 +5,11 @@ mdadm --create --run $md0 --metadata=1.0 --level=1 -n2 --delay=1 --bitmap internal --bitmap-chunk=4 $dev1 $dev2 check wait check bitmap -testdev $md0 1 $mdsize1b 1 +testdev $md0 1 $mdsize1b 64 mdadm -S $md0 mdadm --assemble $md0 $dev1 $dev2 -testdev $md0 1 $mdsize1b 1 +testdev $md0 1 $mdsize1b 64 dirty1=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty2=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` @@ -19,7 +19,7 @@ then echo >&2 "ERROR bad 'dirty' counts: $dirty1 and $dirty2" exit 1 fi mdadm $md0 -f $dev1 -testdev $md0 1 $mdsize1b 1 +testdev $md0 1 $mdsize1b 64 sleep 4 dirty3=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` if [ $dirty3 -lt 400 ] diff --git a/tests/05r1-internalbitmap-v1b b/tests/05r1-internalbitmap-v1b index 268de57e..1097536b 100644 --- a/tests/05r1-internalbitmap-v1b +++ b/tests/05r1-internalbitmap-v1b @@ -5,12 +5,12 @@ mdadm --create --run $md0 --metadata=1.1 --level=1 -n2 --delay=1 --bitmap internal --bitmap-chunk=4 $dev1 $dev2 check wait check bitmap -testdev $md0 1 $mdsize11 1 +testdev $md0 1 $mdsize11 64 mdadm -S $md0 mdadm --assemble $md0 $dev1 $dev2 check bitmap -testdev $md0 1 $mdsize11 1 +testdev $md0 1 $mdsize11 64 dirty1=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty2=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` @@ -20,7 +20,7 @@ then echo >&2 "ERROR bad 'dirty' counts: $dirty1 and $dirty2" exit 1 fi mdadm $md0 -f $dev1 -testdev $md0 1 $mdsize11 1 +testdev $md0 1 $mdsize11 64 sleep 4 dirty3=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` if [ $dirty3 -lt 400 ] diff --git a/tests/05r1-internalbitmap-v1c b/tests/05r1-internalbitmap-v1c index 9eb9a454..f6bbcf6b 100644 --- a/tests/05r1-internalbitmap-v1c +++ b/tests/05r1-internalbitmap-v1c @@ -5,11 +5,11 @@ mdadm --create --run $md0 --metadata=1.2 --level=1 -n2 --delay=1 --bitmap internal --bitmap-chunk 4 $dev1 $dev2 check wait check bitmap -testdev $md0 1 $mdsize12 1 +testdev $md0 1 $mdsize12 64 mdadm -S $md0 mdadm --assemble $md0 $dev1 $dev2 -testdev $md0 1 $mdsize12 1 +testdev $md0 1 $mdsize12 64 dirty1=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty2=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` @@ -19,7 +19,7 @@ then echo >&2 "ERROR bad 'dirty' counts: $dirty1 and $dirty2" exit 1 fi mdadm $md0 -f $dev1 -testdev $md0 1 $mdsize12 1 +testdev $md0 1 $mdsize12 64 sleep 4 dirty3=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` if [ $dirty3 -lt 400 ] diff --git a/tests/05r1-n3-bitmapfile b/tests/05r1-n3-bitmapfile index 4b4f0f1c..1bb9af16 100644 --- a/tests/05r1-n3-bitmapfile +++ b/tests/05r1-n3-bitmapfile @@ -8,11 +8,11 @@ bmf=$targetdir/bitmap rm -f $bmf mdadm --create -e0.90 --run $md0 --level=1 -n3 --delay=1 --bitmap $bmf $dev1 $dev2 $dev3 check wait -testdev $md0 1 $mdsize0 1 +testdev $md0 1 $mdsize0 64 mdadm -S $md0 mdadm --assemble $md0 --bitmap=$bmf $dev1 $dev2 $dev3 -testdev $md0 1 $mdsize0 1 +testdev $md0 1 $mdsize0 64 dirty1=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty2=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` @@ -22,7 +22,7 @@ then echo >&2 "ERROR bad 'dirty' counts: $dirty1 and $dirty2" exit 1 fi mdadm $md0 -f $dev2 -testdev $md0 1 $mdsize0 1 +testdev $md0 1 $mdsize0 64 sleep 4 dirty3=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` if [ $dirty3 -lt 400 ] diff --git a/tests/05r1-re-add b/tests/05r1-re-add index 4cd5328c..44da8908 100644 --- a/tests/05r1-re-add +++ b/tests/05r1-re-add @@ -8,7 +8,7 @@ mdadm -CR $md0 -l1 -n2 -binternal --bitmap-chunk=4 -d1 $dev1 $dev2 check resync check wait -testdev $md0 1 $mdsize1a 1 +testdev $md0 1 $mdsize1a 64 sleep 4 mdadm $md0 -f $dev2 @@ -21,7 +21,7 @@ check nosync mdadm $md0 -f $dev2 sleep 1 mdadm $md0 -r $dev2 -testdev $md0 1 $mdsize1a 1 +testdev $md0 1 $mdsize1a 64 mdadm $md0 -a $dev2 check wait cmp --ignore-initial=$[16*512] --bytes=$[$mdsize0*1024] $dev1 $dev2 diff --git a/tests/05r1-re-add-nosuper b/tests/05r1-re-add-nosuper index 8025a685..6fa276fb 100644 --- a/tests/05r1-re-add-nosuper +++ b/tests/05r1-re-add-nosuper @@ -9,7 +9,7 @@ rm -f $bmf mdadm -B $md0 -l1 -n2 -b$bmf -d1 $dev1 $dev2 check resync check wait -testdev $md0 1 $size 1 +testdev $md0 1 $size 64 sleep 4 mdadm $md0 -f $dev2 @@ -21,7 +21,7 @@ check nosync mdadm $md0 -f $dev2 sleep 1 mdadm $md0 -r $dev2 -testdev $md0 1 $size 1 +testdev $md0 1 $size 64 mdadm $md0 --re-add $dev2 check wait cmp --bytes=$[$mdsize0*1024] $dev1 $dev2 diff --git a/tests/06wrmostly b/tests/06wrmostly index 99a48b79..f139a08e 100644 --- a/tests/06wrmostly +++ b/tests/06wrmostly @@ -2,13 +2,13 @@ # create a raid1 array with a wrmostly device mdadm -CR $md0 -l1 -n3 $dev0 $dev1 --write-mostly $dev2 -testdev $md0 1 $mdsize1a 1 +testdev $md0 1 $mdsize1a 64 # unfortunately, we cannot measure if any read requests are going to $dev2 mdadm -S $md0 mdadm -CR $md0 -l1 -n3 --write-behind --bitmap=internal --bitmap-chunk=4 $dev0 $dev1 --write-mostly $dev2 -testdev $md0 1 $mdsize1a 1 +testdev $md0 1 $mdsize1a 64 mdadm -S $md0 diff --git a/tests/07autoassemble b/tests/07autoassemble index 469497e2..1d53d3fb 100644 --- a/tests/07autoassemble +++ b/tests/07autoassemble @@ -8,8 +8,8 @@ mdadm -CR $md0 -l0 -n2 $md1 $md2 --homehost=testing mdadm -Ss mdadm -As -c /dev/null --homehost=testing -vvv -testdev $md1 1 $mdsize1a 1 -testdev $md2 1 $mdsize1a 1 +testdev $md1 1 $mdsize1a 64 +testdev $md2 1 $mdsize1a 64 testdev $md0 2 $mdsize11a 512 mdadm -Ss @@ -19,6 +19,6 @@ mdadm -CR $md1 -l1 -n2 $dev0 $dev1 --homehost=testing mdadm -CR $md0 -l0 -n2 $md1 $dev2 --homehost=testing mdadm -Ss mdadm -As -c /dev/null --homehost=testing -vvv -testdev $md1 1 $mdsize1a 1 +testdev $md1 1 $mdsize1a 64 testdev $md0 1 $[mdsize1a+mdsize11a-1024] 512 mdadm -Ss diff --git a/tests/09imsm-assemble b/tests/09imsm-assemble index dd9fd6e8..2a42369e 100644 --- a/tests/09imsm-assemble +++ b/tests/09imsm-assemble @@ -49,7 +49,7 @@ mdadm -Ss # reassemble and make sure one of the families falls out mdadm -A $container $dev0 $dev1 $dev2 $dev3 mdadm -IR $container -testdev ${member}_0 1 $size 1 +testdev ${member}_0 1 $size 64 if mdadm --remove $container $dev0 ; then # the dev[23] family won imsm_check_removal $container $dev1 @@ -69,5 +69,5 @@ mdadm -IR $container mdadm -A ${container}2 $dev2 $dev3 --update=uuid mdadm -IR ${container}2 -testdev ${member}_0 1 $size 1 -testdev ${member}_1 1 $size 1 +testdev ${member}_0 1 $size 64 +testdev ${member}_1 1 $size 64 diff --git a/tests/09imsm-create-fail-rebuild b/tests/09imsm-create-fail-rebuild index 3b288846..448b03e3 100644 --- a/tests/09imsm-create-fail-rebuild +++ b/tests/09imsm-create-fail-rebuild @@ -42,7 +42,7 @@ level=1 chunk=0 mdadm -CR $member1 $dev0 $dev1 -n $num_disks -l $level -z $size imsm_check member $member1 $num_disks $level $size $size $offset $chunk -testdev $member1 1 $size 1 +testdev $member1 1 $size 64 check wait mdadm -Ss diff --git a/tests/10ddf-create b/tests/10ddf-create index ad3996e3..09256128 100644 --- a/tests/10ddf-create +++ b/tests/10ddf-create @@ -18,7 +18,7 @@ mdadm -CR r1 -l1 -n2 /dev/md/ddf0 mdadm -CR r5 -l5 -n3 /dev/md/ddf0 testdev /dev/md/r0 5 5000 512 # r0 will use 4608 due to chunk size, so that leaves 28160 for the rest -testdev /dev/md/r1 1 28160 1 +testdev /dev/md/r1 1 28160 64 testdev /dev/md/r5 2 28160 512 dd if=/dev/sda of=/dev/md/r0 || true dd if=/dev/sda of=/dev/md/r1 || true |