Re: why is the size of a directory always 1024b ?

Richard B. Johnson (root@chaos.analogic.com)
Wed, 23 Jun 1999 09:11:03 -0400 (EDT)


On Wed, 23 Jun 1999, MURALI N wrote:

>
> On Tue, 22 Jun 1999, David S. Miller wrote:
>
> : I want to know if there is any significant reason why the
> : size of each directory ( ext2fs) is reported as 1024b ( or a
> : multiple of 1024).
> :
> :Because this is the "block size" of the filesystem, the directory
> :space is allocated in units of this.
>
> Why is it then that SunOS does not follow the same allocation
> procedure? see the attachment for a dir listing.
>

Because their length field contains the actual size of the directory
file data (just like a regular file). Linux contains what was actually
allocated. In both cases, if an allocation unit was 1024 bytes, both
directory entries use 1024 bytes.

Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.2.6 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

-
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.tux.org/lkml/