Coda File System

Re: fsobj::dir_Creat: Create failed, and resolve problems

From: Jan Harkes <>
Date: Thu, 22 Jul 2004 22:51:13 -0400
On Sun, Jul 18, 2004 at 05:09:48PM -0500, Troy Benjegerdes wrote:
> > > Hrrm.. I bet the directory filled up.. what determines how many files a
> > > directory can have?
> > > 
> > > hozer_at_kalmia Maildir$ ls -ld .drgw/new
> > > drwx------    2 hozer    hozer      356352 Jul 16 14:42 .drgw/new
> > > hozer_at_kalmia Maildir$ ls .drgw/new/ | wc
> > >    4174    4174  320338
> > > 
> > > So.. the directory size (on ext3 is 356K), with 4174 files...
> > 
> > Ahh, there is a stupid limit, there are no double indirect blocks in the
> > RVM layout of Coda directories, so they can't exceed 256KB (roughly
> > about 4096 filenames in a maildir directory).
> Can this be increased? Is there a tradeoff involved? I have a couple of
> maildirs (mailing lists) over 4000 messages (my linux-kernel box has
> 7000).

It can be increased, but not in any scalable way. There is a fixed size
array which can hold 128 pointers to directory pages (2KB each). The
array size can be changed, but both clients and servers will have to be
reinitialized because it seriously breaks the RVM layout and it could
ofcourse introduce subtle bugs from code that assumes directories are
always smaller than 256KB.

> I'd say 16K messages (1MB of directory size) is a reasonable hard limit
> though.

I don't know, that is still less than 3 months of LKML at the current
rate. Directory data should just be stored in container files instead
of RVM, that will improve server-scalability a lot more as well. A
server with 500MB RVM data could not even store 500 directories if all
of them are anywhere close to 1MB. Directory metadata is only 512 bytes,
while file metadata is 256 bytes (112 actually), so we could store
thousands of directories if we didn't have the directory contents around
in RVM.

> Although I would probably be willing to reduce my useage below 4K
> messages if I knew how to make venus behave nicely when I go over the
> limit ;)

LKML is the only mailinglist that I don't automatically deliver into my
Coda home directory, stupid directory size limit.

Received on 2004-07-22 22:52:19