public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Elder <aelder@sgi.com>
To: Boris Ranto <branto@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Sandeen <sandeen@redhat.com>,
	Eric@oss.sgi.com, xfs-oss <xfs@oss.sgi.com>
Subject: Re: xfstests 258: Test xfs fs creation with fs size close to 4 TB
Date: Wed, 21 Sep 2011 11:54:35 -0500	[thread overview]
Message-ID: <1316624075.2986.22.camel@doink> (raw)
In-Reply-To: <1316613160.781.8.camel@dhcp-26-208.brq.redhat.com>

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@redhat.com>

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@sgi.com>

. . .

> +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@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2011-09-21 16:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-21 13:52 xfstests 258: Test xfs fs creation with fs size close to 4 TB Boris Ranto
2011-09-21 16:54 ` Alex Elder [this message]
2011-09-21 19:06   ` Arkadiusz Miśkiewicz
2011-09-22  8:30   ` Boris Ranto
2011-09-22 16:30     ` Alex Elder
2011-09-26 11:44 ` Christoph Hellwig
2011-09-26 12:18   ` Alex Elder
2011-09-26 15:59   ` Eric Sandeen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1316624075.2986.22.camel@doink \
    --to=aelder@sgi.com \
    --cc=Eric@oss.sgi.com \
    --cc=branto@redhat.com \
    --cc=hch@infradead.org \
    --cc=sandeen@redhat.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox