On Mon, 15 Oct 2001 at 17:30, Steve Lord wrote:
> A directory entry contains the name of the file, and the inode number
> - which is 8 bytes on XFS. A small XFS directory lives within the
> inode, and the size you see is the amount of space in the inode being
> used by these entries plus some space management data structures. Once
> the directory does not fit in the inode it grows to one filesystem
> block - or 4Kbytes, it will sit at this size until it no longer fits
> into one block, at which point we turn the directory into a btree of
> blocks - the leaf blocks contain the entries and the node blocks
> contain the index pointers to the entries. The smallest btree is 3
> blocks, so the next size you would see is 12K.
>
> After this it will go up a block at a time as it grows. If you remove
> stuff from the directory it will shrink again - all the way back into
> the inode.
Wow. Nice comprehensive answer, and one that I believe can be understood
by most would-be (and current) XFS system administrators as well. Seth,
maybe this can be added to the FAQ? Do you think it's worth putting there?
I expect that a number of people wonder what makes up a directory's size
(ie: is the the total size of all contents?), and this answer by Steve is
(as expected) great. :)
--> Jijo
--
Federico Sevilla III :: jijo@xxxxxxxxxxxxxxxxxxxx
Network Administrator :: The Leather Collection, Inc.
GnuPG Key: <http://jijo.leathercollection.ph/jijo.gpg>
|