bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: add dd support for O_NOATIME


From: Paul Eggert
Subject: Re: add dd support for O_NOATIME
Date: Thu, 08 Dec 2005 12:53:22 -0800
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Jim Meyering <address@hidden> writes:

> I'm tempted to say O_NOATIME should be the default for rm -r, but
> maybe not for cp, find, du, ls, etc.

Yes, that makes sense.

How about if we suggest instead that laptop owners mount their file
systems with the noatime option?  That solves the problem in general,
rather than forcing app writers to modify cat, ls, sh, etc.

> CVS glibc does provide fdopendir now, but it's not yet commonly available.

Can we modify gnulib fdopendir to muck with glibc's guts, if it knows
it's using glibc?  That is, gnulib could contain a copy of glibc's
internal function __alloc_dir, as well as of its internal data
structure DIR.  This should be safe, since we know all the older glibc
versions that we'd be using this code in, so we know their internal
structure.

Normally I wouldn't suggest this sort of thing, but if it's a major
performance issue....  (On second thought maybe I shouldn't have
suggested it anyway.  :-)

> So, in some cases we'd have to call open twice for
> each directory.

If we have a --noatime option, it could fail for files you don't own.
Then we wouldn't have to open twice.  That's how dd iflags=noatime
works, as well as tar --atime-preserve=system.

That noatime mount option is looking better and better....




reply via email to

[Prev in Thread] Current Thread [Next in Thread]