Re: >2 gig files on 2.4.0-test6?

From: Thomas Köhler (jean-luc@picard.franken.de)
Date: Sat Aug 26 2000 - 06:50:09 EST


On Sat, Aug 26, 2000 at 04:32:28AM +0200,
skp <skp@mirkwood.net> wrote:
>
> Not precisely sure where this should go - but I figure this is a likely
> list to try.
>
> I have 2.4.0-test6 running here. I've recently installed a brand new 30
> gig hd with an empty ext2 filesystem, and decided to try creating a file
> larger than 2 gigs on it.
>
> uname -a:
> Linux eriador 2.4.0-test6 #1 SMP Sun Aug 20 17:09:04 EDT 2000 i686 unknown
>
>
> File was created using:
> dd if=/dev/zero of=/mnt/disk2/3gigfile bs=2048 count=1500000
>
>
> Output of df:
> /dev/hdb1 29561392 3002956 25056764 11% /mnt/disk2

Seems OK :-)

> Output of ls -al:
> total 3002960
> drwxr-xr-x 3 root root 4096 Aug 22 09:46 ./
> drwxr-xr-x 8 root root 4096 Aug 22 06:26 ../
> -rw-r--r-- 1 root root 18446744072486584320 Aug 22 06:38
> 3gigfile
> drwxr-xr-x 2 root root 16384 Aug 21 00:57 lost+found/

Seems a bit oversized :-)

> That seemed to happen ~2 gig in size (I was making use of 'watch' at the
> time to watch the file grow). Someone mentioned that it would be right
> around the limit for a 32 bit integer.

2^31=2147483648 (=2 Gig)
It's 31 bit for size and 1 bit for calls like fseek() and such -
negative values tell to seek backwards. Hence that 2 GB limit (instead
of 4 GB).

> Interestingly enough, perl's stat() returns -1222967296 bytes.

Seems like the kernel does its job - it's time for glibc et al to be
fixed now...

CU,
Thomas

-- 
 Thomas Köhler Email:   jean-luc@picard.franken.de     | LCARS - Linux
     <><        WWW:     http://jeanluc-picard.de      | for Computers
                IRC:             jeanluc               | on All Real
               PGP public key available from Homepage! | Starships


- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 31 2000 - 21:00:17 EST