xfs
[Top] [All Lists]

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

To: xfs@xxxxxxxxxxx, aelder@xxxxxxx
Subject: Re: xfstests 258: Test xfs fs creation with fs size close to 4 TB
From: Arkadiusz Miśkiewicz <arekm@xxxxxxxx>
Date: Wed, 21 Sep 2011 21:06:47 +0200
Cc: Boris Ranto <branto@xxxxxxxxxx>, Christoph Hellwig <hch@xxxxxxxxxxxxx>, Sandeen <sandeen@xxxxxxxxxx>, Eric@xxxxxxxxxxx
In-reply-to: <1316624075.2986.22.camel@doink>
References: <1316613160.781.8.camel@xxxxxxxxxxxxxxxxxxxxxxxxxx> <1316624075.2986.22.camel@doink>
User-agent: KMail/1.13.7 (Linux/3.1.0-rc6-00217-g9d037a7-dirty; KDE/4.7.1; x86_64; ; )
On Wednesday 21 of September 2011, Alex Elder wrote:
> 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.

I can say only that bashizm sux. posix shell unfortunately makes problems 
here.

mksh (https://www.mirbsd.org/mksh.htm) supports 32bit arithmetic only (even on 
64bit arch).

single unix spec says "signed long", so you cannot rely on posix shell for > 
32bit values.

-- 
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/

<Prev in Thread] Current Thread [Next in Thread>