Re: reading an empty directory after reboot is very slow
Quoting Vincent Lefevre (email@example.com):
> On 2015-04-26 13:26:41 -0500, David Wright wrote:
> > Quoting Vincent Lefevre (firstname.lastname@example.org):
> > > On 2015-04-24 22:01:37 -0500, David Wright wrote:
> > > > Quoting Vincent Lefevre (email@example.com):
> > > > > So, I would say that this is a bug. POSIX says in
> > > > > http://pubs.opengroup.org/onlinepubs/9699919799/functions/readdir.html
> > > >
> > > > It may well be. But I'm just presenting facts about the
> > > > filesystems that I assumed you were using when you posted
> > > > https://lists.debian.org/debian-user/2015/04/msg00651.html ,
> > > > not the theory of a POSIX-compliant system.
> > >
> > > What's important when designing a file system is what should happen,
> > > not what actually happens.
> > Yes, but I don't design filesystems. I use them.
> The context was the design of ext3: Earlier in this thread, Bob Proulx
> said: "(I always wondered why they didn't simply take the *last* entry
> and move it down to the deleted entry and simply keep the array always
> compacted. I wonder. But they didn't do it that way.)"
> And Kushal Kumaran replied: "Moving entries around breaks ongoing
> readdir operations. If a readdir has gone past the file being removed,
> and you moved the last entry there, the entry being moved would be
> missed, despite *it* not being the entry added or removed."
> And you replied: "I don't think this matters. There's no guarantee
> that another process isn't writing to that directory while you are
> working your way along the entries."
> Perhaps I should have pointed that what Kushal Kumaran said was a
> POSIX requirement. So, this matters, and I replied: "But with the
> current solution (no automatic moving of an entry), you can't miss
> an entry that hasn't been removed."
Exactly. Saying "But this matters in a POSIX-compliant filesystem"
is very different from "But with the current solution". To me,
a "current solution" is an concrete implementation, not a POSIX
specification; the latter is a target.
In response to my tests, you wrote "You haven't demonstrated
anything", and not "You haven't tested compliance".
When Nicolas asked "What are you trying to prove with that test?"
you wrote "David's test was to show what could happen in practice..."
and you were perfectly correct. So forgive me for thinking you
were still interested, whether a bug or not.
> > > In case of bugs, anything can happen, so
> > > that's not interesting at all.
> > Au contraire mon frère, they're very important as you have to live
> > with them and work around them. [...]
> I agree for an end user, but see the context.
Um, I'm here in debian-user, not firstname.lastname@example.org or
email@example.com or firstname.lastname@example.org where I suppose
they chat about such things.