Re: Do too many files hurt a directory?

From: Charlie Gibbs (cgibbs_at_kltpzyxm.invalid)
Date: 03/27/04

  • Next message: Nick Landsberg: "Re: Do too many files hurt a directory?"
    Date: 26 Mar 04 17:04:40 -0800
    
    

    In article <d229c.23475$tY6.687474@bgtnsc04-news.ops.worldnet.att.net>
    hukolau@NOSPAM.att.net (Nick Landsberg) writes:

    >Charlie Gibbs wrote:
    >
    >> :-) Actually, copying everything into a new directory did the
    >> trick. The system is now as snappy as it ever was. Many thanks
    >> to you all.
    >>
    >> As an interesting postscript, when I dialed back into the system
    >> I was still logged in (I've already pointed out to them what a
    >> security hole it is to not log someone out when the connection
    >> drops), and it was very strange to find myself in a directory
    >> that had been unlinked. Most commands died immediately, complaining
    >> about an invalid directory, and pwd returned a completely blank line.
    >> When I logged out and back in again, everything was back to normal.
    >
    >Hey! You were on the right track even without our help. :)
    >
    >Your postscript is very interesting. I've never encountered
    >that behavior before. Then, I haven't ever been logged
    >in to a directory which is removed out from under my feet. :)
    >
    >The fact that pwd would return a blank line is easily
    >explained. It tries to open "." in order to look up
    >it's inode number and and then tries to open ".." and
    >search the directory for the same inode number, and repeats
    >the operation up the full path. (At least it used to in the old
    >days.)
    >
    >Regarding the other commands, I'm not surprised that some
    >failed, but surprised that *only* some failed. It used to
    >be that the kernel kept a record of the current directory
    >for each process as part of the process information. Thus
    >your shell would have an invalid entry for the current
    >directory associated with it. Any commands you ran would
    >also inherit this invalid information. I wonder why some succeeded,
    >but that's a question to ponder another time.

    Actually, you could probably replace "most" by "all" above.
    I tried a few things, got "invalid directory" messages,
    then shrugged and logged out. The only thing I tried that
    didn't say "invalid directory" was pwd, which probably got
    so confused that it just gave up without saying anything.

    --
    /~\  cgibbs@kltpzyxm.invalid (Charlie Gibbs)
    \ /  I'm really at ac.dekanfrus if you read it the right way.
     X   Top-posted messages will probably be ignored.  See RFC1855.
    / \  HTML will DEFINITELY be ignored.  Join the ASCII ribbon campaign!
    

  • Next message: Nick Landsberg: "Re: Do too many files hurt a directory?"