Re: VFS/ext2fs - large files on the Alpha (fails for 17GB+)

Chris Wedgwood (chris@cybernet.co.nz)
Wed, 19 Aug 1998 19:33:03 +1200


[apologies to tytso and mj when they didn't need to be cc'd
originally to this]

On Wed, Aug 19, 1998 at 09:43:10AM +0300, Matti Aarnio wrote:

> Each indirection block is able to tell location of blocksize/4
> blocks, thus if your EXT2 has 1kB blocks (default) in it, each of
> them can tell 256 blocks. Triply indirection gives thus 256^3
> blocks of 1kB each, which is that 16 GB you see. Add to it what
> little those lesser orders allow...

Oh crap... I didn't even think of that.

Seems to me though, that perhaps ext2fs should perhaps printk a
warning here for this.... (although, it then means any user can make
an pretty effective DoS attack with a sparse file and seek....)

> Propably you will be happy with 2k block size ;-)

Actually... since the vm system is marginally happier with blocks the
same size as pages (is it really?) I may as well use 8k block.

I'm not even sure why I'm using 1k blocks. I don't normally... odd.

> File offsets are expressed in 32-bit signed integer (long), which
> can cover only 2GB in 32-bit systems. That is why.

Signed - why does it have to be signed?

lseek uses off_t - which is 32 bits on Intel. read/write use size_t
which is unsigned 32 bits...

-cw

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