xfs
[Top] [All Lists]

Re: Directory File Size [Slightly OT]

To: Federico Sevilla III <jijo@xxxxxxxxxxxxxxxxxxxx>
Subject: Re: Directory File Size [Slightly OT]
From: Seth Mos <knuffie@xxxxxxxxx>
Date: Tue, 16 Oct 2001 07:29:28 +0200 (CEST)
Cc: Linux XFS Mailing List <linux-xfs@xxxxxxxxxxx>
In-reply-to: <Pine.LNX.4.40.0110160735570.24809-100000@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
On Tue, 16 Oct 2001, Federico Sevilla III wrote:

> 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. :)

It's busy at work at the moment since I will be a week off to spain in a
week. I will see if I can fit it in.

Cheers


<Prev in Thread] Current Thread [Next in Thread>