Re: why is the size of a directory always 1024b ?

Brandon S. Allbery KF8NH (allbery@kf8nh.apk.net)
Thu, 24 Jun 1999 17:42:38 -0400


In message <Pine.LNX.4.04.9906241421090.10023-100000@blrmail.tatainfotech.com>,
MURALI N writes:
+-----
| drwxr-xr-x 2 root root 12288 May 4 21:35 lost+found
| drwxr-xr-x 5 root root 1024 May 5 12:12 mnt
| dr-xr-xr-x 33 root root 0 Jun 23 19:06 proc
|
| "lost+found"
|
| drwxr-xr-x 2 root root 12288 May 4 21:35 .
| drwxr-xr-x 17 root root 1024 May 28 16:40 ..
|
| If the present scheme allocates 13 * 1024 bytes for just "." and "..", I
| feel it is time to rethink the directory handling.
+--->8

lost+found is a special case: fsck is much more reliable at recovering files
when lost+found has empty directory entries preallocated (otherwise it has to
allocate a block from a known-corrupt filesystem, which can lead to
disaster); so when lost+found is created, a bunch of files are created in it
and then removed to preallocate entries in it.

-- 
brandon s. allbery	[os/2][linux][solaris][japh]	 allbery@kf8nh.apk.net
system administrator	     [WAY too many hats]	   allbery@ece.cmu.edu
carnegie mellon / electrical and computer engineering			 KF8NH
     We are Linux. Resistance is an indication that you missed the point.

- 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/