On Sun, Jun 02 2013, Alan Mackenzie wrote:

> Hello, Jörg.
>
> On Sun, Jun 02, 2013 at 04:06:11PM +0200, Joerg Schilling wrote:
>> Alan Mackenzie <a...@muc.de> wrote:
>
>> > The wikipedia page on Ext3 says that with a 1kB blocksize, the maximum
>> > file size is 16GB, but with a 2kB blocksize it's 256GB.  Could it be
>> > you've somehow actually got a 1kB blocksize on the partition?
>
>> Where does such a strange limitation come from?
>
> Haven't a clue.  I would have expected the maximum file size to be a
> number of blocks, which makes it seem strange that doubling the block
> size multiplies max file size by 16.


The wonders of indirect blocks.  When the blocksize doubles, a single
indirect block points to twice as many direct blocks, each of which is
double the size.  For double indirect you get twice as many single
indirect, etc.

There are plenty of places to read about this.  One is my lecture notes
http://cs.nyu.edu/~gottlieb/courses/os/class-notes.html#inodes

allan

Reply via email to