Messages in this thread | | | Date | Thu, 24 Jun 1999 05:33:08 +0400 (MSD) | From | Khimenko Victor <> | Subject | Re: why is the size of a directory always 1024b ? |
| |
On Wed, 23 Jun 1999, MURALI N wrote:
> : > :I can also report that on my 4k block systems, I never see directories > :smaller than 4k in size, but that's (A) expected, and (B) desired. > : > :I can understand the viewpoint that says the "size" of a directory is > :simply a count of the number of valid entries therein, but I don't > :agree with it. > > and why not? it seems meaningless to see a directory size reported as > 1024 while the actual size may be far below.
In this case -- not. But when I see directory of size 115714 bytes (I had directory of size > 1M with just few files once :-) in inn spool with just few tens of files in it I know that it's time to recreate this directory.
BTW what's "actual size" ? If you'll create 10'000 files in directory and then remove them directory will STILL hold 10'000 slots ! What's its size: 2 (for "." and "..") or 10'002 (for all slots on disk) ? And what about HPFS and NTFS where andditional space is needed for b-trees and/or file contents (yes, NTFS keep DATA of small files in directory blocks on disk) ?
Can you define what's "actual size" for all filesystems out there ?
> only the filesystem algorithms can make sense out of it.
Not at all (see above).
> why, then it would make sense to see all regular files with sizes multiples > of blocksize.
There are exists quite a few operations with file where "size" is sort of boundary (seek, for example). But I'm not know disk operations where size of directory (in any sense) is sort of boundary.
> can you please explain why you desire it that way.
What for you'll use directory size (in your definition) ? And WHAT'S you definition BTW ?
- 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/
| |