Messages in this thread | | | Subject | Re: ext2fs: do directories ever shrink? | From | Peter Mutsaers <> | Date | 12 Jul 1998 22:29:55 +0200 |
| |
>> On Sun, 12 Jul 1998 14:49:27 +1000, Dancer <dancer@brisnet.org.au> >> said:
D> I remember this same thing in every unix system I've ever D> written software on. There may be 'standard' unix filesystems D> out there that don't partake of this behaviour...I just never D> recall seeing one.
When reading this thread I wanted to control myself and not plug FreeBSD, but since Dancer asked so directly:
yes, FreeBSD does shrink directories. I just put 40000 files in a directory. The directory grew to 500kb (b.t.w. the directory in FreeBSD stays as fast as a small one because something like a btree is used, so there is no slowdown in large directories).
When I removed the files the directory shrunk to 512 bytes.
D> Jakob Borg wrote: >> >> If a directory is created and filled with, say, 500 files, it will >> grow to 6K in size. It will retain this size when all files in it are >> unlinked. >> >> Does it ever shrink in size or will it retain it's 6 blocks until >> it's unlinked? If so, is this just another form of preallocation, in >> case we would that many files again in the same directory?
-- /\_/\ ( o.o ) Peter Mutsaers | Abcoude (Utrecht), | Trust me, I know ) ^ ( plm@xs4all.nl | the Netherlands | what I'm doing.
- 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.altern.org/andrebalsa/doc/lkml-faq.html
| |