[lkml]   [1999]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: generalizing . and ..
    On Sun, Jun 27, 1999 at 04:09:44AM -0400, Rick Hohensee wrote:

    > Intuition tells you that /usr is not 1k. Or it did before you became
    > immersed in unix. The "size of a directory" is not the size of the
    > "file" containing the names of the files and subdirs in a directory.
    > It's the du of the directory. That's the size. The greenest newbie
    > makes more sense in this regard than the "illuminati" often do.

    But directories *are* just lists of filenames and inode numbers. It's silly
    to think of it otherwise. Remember that filename -> inode mapping is many to
    one (i.e. hard links). If I have a 1Mb 'file' that is in two directories,
    should *both* those directories appear to be >1Mb in size? If those two dirs
    share a parent at some point, should it have a size >2Mb?

    It gets worse for the 'inherited mtime' stuff, AFAICS. If I modify a file that
    appears in two directories, should both their mtimes be changed? How does the
    kernel know which directories need to be altered? The dentry will only allow
    us to change the mtime on the directory that we happened to use to lookup the
    file when we opened it, which is obviously nonsense. And besides, doing that
    throws away information that might be useful, i.e. when the directory itself
    was really changed (filename creat / unlink).

    "Apathy is not the problem, it's the solution"

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:52    [W:0.020 / U:139.412 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site