[Ocfs2-test-devel] [PATCH 2/2] Resize_test: Fix a bug of resize_test.sh
Tristan Ye
tristan.ye at oracle.com
Tue Mar 16 00:10:21 PDT 2010
Currently, resizing of an ocfs2 volume will align with clustersize,
in that case, we will definitely failed at growing volume size to
the partion size if partitionsize didn't align to clustersize:
Instead, we'd better let tunefs.ocfs2 determine the largest size
it could afford by specify size as NULL(means grow the size to end).
Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
---
programs/resize_test/resize_test.sh | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/programs/resize_test/resize_test.sh b/programs/resize_test/resize_test.sh
index bc483d1..7177d5f 100755
--- a/programs/resize_test/resize_test.sh
+++ b/programs/resize_test/resize_test.sh
@@ -236,7 +236,7 @@ normal_resize_test() {
dbgout=${outdir}/${YMD}.dbg
blocks=$[${blocks}+${incblk}]
- if [ ${blocks} -gt ${partsz} ]
+ if [ ${blocks} -ge ${partsz} ]
then
blocks=0
fi
@@ -306,6 +306,9 @@ do_backup_test() {
fi
do_mount
+ if [ ${end} -ge ${partsz} ];then
+ end=0
+ fi
do_tunefs ${tuneout} ${end}
do_umount
do_fsck ${fsckout}
@@ -362,7 +365,7 @@ online_boundary_test() {
echo "y"|${MKFS} -b ${blocksz} -C ${clustsz} -N 4 -L ${label} ${device} ${start} >/dev/null
do_mount
- do_tunefs ${tuneout} ${partsz}
+ do_tunefs ${tuneout} 0
do_umount
do_fsck ${fsckout}
--
1.5.5
More information about the Ocfs2-test-devel
mailing list