Re: [RFC] Improved inode number allocation for HTree

Daniel Phillips
2003-03-11T13:26:24Z

On Tue 11 Mar 03 14:00, Helge Hafting wrote:
> Hans Reiser wrote:
> > Let's make noatime the default for VFS.
> >
> > Daniel Phillips wrote:
>
> [...]
>
> >> If I were able to design Unix over again, I'd state that if you don't
> >> lock a directory before traversing it then it's your own fault if
> >> somebody changes it under you, and I would have provided an interface
> >> to inform you about your bad luck. Strictly wishful thinking.
> >> (There, it feels better now.)
>
> I'm happy nobody _can_ lock a directory like that. Think of it - unable
> to create or delete files while some slow-moving program is traversing
> the directory? Ouch. Plenty of options for DOS attacks too.
> And how to do "rm *.bak" if rm locks the dir for traversal?

<wishful thinking>
Now that you mention it, just locking out create and rename during directory
traversal would eliminate the pain. Delete is easy enough to handle during
traversal. For a B-Tree, coalescing could simply be deferred until the
traversal is finished, so reading the directory in physical storage order
would be fine. Way, way cleaner than what we have to do now.
</wishful thinking>

Regards,

Daniel