Re: xfstests 258: Test xfs fs creation with fs size close to 4 TB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2011-09-21 at 15:52 +0200, Boris Ranto wrote:
> mkfs.xfs failed to create xfs filesystems with 4 TB minus few bytes due
> to round up error in mkfs.xfs code.
> 
> This test case is a regression test for the fs creation problem.
> 
> I've tested the test case with mkfs.xfs patch (in the form posted by
> Eric Sandeen) and the test passed (and therefore the patch fixed the
> issue for me).
> 
> Signed-off-by: Boris Ranto <branto@xxxxxxxxxx>

This looks OK, but I'm a little concerned about the
shell's ability to handle > 32-bit values in its
arithmetic expressions (within $((...))).

Using ${fourtb} works for me, but I just don't know
whether it is written somewhere that bash always
supports 64-bit (or even arbitrary) precision values.

Do you know?

Same general concern goes for dd, but I am more inclined
to think it can handle large numbers.

Otherwise this looks good to me (though I haven't yet
tried it out).

Reviewed-by: Alex Elder <aelder@xxxxxxx>

. . .

> +fourtb=4398046511104
> +for sub in 1 512 1024 1025 2048 4096;
> +do
> +	echo "Trying to make $fourtb - $sub B long xfs fs image"
> +	rm -f "$testfile"
> +	dd if=/dev/zero "of=$testfile" bs=1 count=0 seek=$(($fourtb - $sub))
> >/dev/null 2>&1 || echo "dd failed"
> +	lofile=$(losetup -f)
> +	losetup $lofile "$testfile"
> +	"$MKFS_XFS_PROG" -b size=512 $lofile >/dev/null || echo "mkfs failed!"
> +	losetup -d $lofile
> +done
> +

. . .


_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux