"Pankaj Raghav (Samsung)" <kernel@xxxxxxxxxxxxxxxx> writes: > From: Pankaj Raghav <p.raghav@xxxxxxxxxxx> > > The testcase estimates to have ratio of 1:3/4 for holes:filesize. This > holds true where the blocksize is always less than or equal to pagesize > and the total size of the file is calculated based on the pagesize. > There is an implicit assumption that blocksize will always be less than > the pagesize. > > LBS support will enable bs > ps where a minimum IO size is one block, > which can be greater than a page. Adjust the size calculation to be > based on the blocksize and not the pagesize. Thanks for addressing the comments. I agree it should be just blocksize itself. Even the randholes.c only takes -b blocksize. (Minor nit below) Looks good to me. Please feel free to add - Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@xxxxxxxxx> > > Signed-off-by: Pankaj Raghav <p.raghav@xxxxxxxxxxx> > --- > tests/xfs/008 | 20 +++++++++----------- > tests/xfs/008.out | 8 ++++---- > 2 files changed, 13 insertions(+), 15 deletions(-) > > diff --git a/tests/xfs/008 b/tests/xfs/008 > index e7d6153b..f42b3ac8 100755 > --- a/tests/xfs/008 > +++ b/tests/xfs/008 > @@ -10,8 +10,7 @@ > _begin_fstest rw ioctl auto quick > > status=0 # success is the default! > -pgsize=`$here/src/feature -s` > - > +blksize=$(_get_file_block_size "$TEST_DIR") nit: maybe we should move blksize calculation to after _require_test ?? > # Override the default cleanup function. > _cleanup() > { > @@ -21,7 +20,7 @@ _cleanup() > > _filter() > { > - sed -e "s/-b $pgsize/-b PGSIZE/g" \ > + sed -e "s/-b $blksize/-b BLKSIZE/g" \ > -e "s/-l .* -c/-l FSIZE -c/g" > } > > @@ -73,18 +72,17 @@ _require_test > # We are trying to create roughly 50 or 100 holes in a file > # using random writes. Assuming a good distribution of 50 writes > # in a file, the file only needs to be 3-4x the size of the write > -# size muliplied by the number of writes. Hence we use 200 * pgsize > -# for files we want 50 holes in and 400 * pgsize for files we want > +# size muliplied by the number of writes. Hence we use 200 * blksize > +# for files we want 50 holes in and 400 * blksize for files we want > # 100 holes in. This keeps the runtime down as low as possible. > # > -_do_test 1 50 "-l `expr 200 \* $pgsize` -c 50 -b $pgsize" > -_do_test 2 100 "-l `expr 400 \* $pgsize` -c 100 -b $pgsize" > -_do_test 3 100 "-l `expr 400 \* $pgsize` -c 100 -b 512" # test partial pages > +_do_test 1 50 "-l `expr 200 \* $blksize` -c 50 -b $blksize" > +_do_test 2 100 "-l `expr 400 \* $blksize` -c 100 -b $blksize" > +_do_test 3 100 "-l `expr 400 \* $blksize` -c 100 -b 512" # test partial blocks > > # rinse, lather, repeat for direct IO > -_do_test 4 50 "-d -l `expr 200 \* $pgsize` -c 50 -b $pgsize" > -_do_test 5 100 "-d -l `expr 400 \* $pgsize` -c 100 -b $pgsize" > -# note: direct IO requires page aligned IO > +_do_test 4 50 "-d -l `expr 200 \* $blksize` -c 50 -b $blksize" > +_do_test 5 100 "-d -l `expr 400 \* $blksize` -c 100 -b $blksize" > > # todo: realtime. > > diff --git a/tests/xfs/008.out b/tests/xfs/008.out > index 5e3ae8e3..0941e218 100644 > --- a/tests/xfs/008.out > +++ b/tests/xfs/008.out > @@ -1,10 +1,10 @@ > QA output created by 008 > > -randholes.1 : -l FSIZE -c 50 -b PGSIZE > +randholes.1 : -l FSIZE -c 50 -b BLKSIZE > ------------------------------------------ > holes is in range > > -randholes.2 : -l FSIZE -c 100 -b PGSIZE > +randholes.2 : -l FSIZE -c 100 -b BLKSIZE > ------------------------------------------ > holes is in range > > @@ -12,10 +12,10 @@ randholes.3 : -l FSIZE -c 100 -b 512 > ------------------------------------------ > holes is in range > > -randholes.4 : -d -l FSIZE -c 50 -b PGSIZE > +randholes.4 : -d -l FSIZE -c 50 -b BLKSIZE > ------------------------------------------ > holes is in range > > -randholes.5 : -d -l FSIZE -c 100 -b PGSIZE > +randholes.5 : -d -l FSIZE -c 100 -b BLKSIZE > ------------------------------------------ > holes is in range > -- > 2.34.1