bug-findutils
[Top][All Lists]
Advanced

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

Re: fts and O_NOATIME


From: Jim Meyering
Subject: Re: fts and O_NOATIME
Date: Thu, 07 Jul 2011 17:52:59 +0200

Eric Blake wrote:
> http://savannah.gnu.org/bugs/?33724 raised the issue that findutils is
> updating directory atime as part of traversing a hierarchy (and,
> according to POSIX, this behavior is the correct default).  However, it
> would be nice to support the use of fts in a mode where O_NOATIME is
> used, so that directories don't appear to have an atime change merely
> because fts called readdir.
>
> It looks to me like the only way to do this is to use open(O_NOATIME)
> followed by fdopendir() - but we are already using this approach for
> other reasons.  So would it be worth a patch that adds a new FTS_NOATIME
> flag, and when that flag is set, pass in the O_NOATIME flag to all
> directories opened by fts?

Sure.  If you're stuck with a file system that would otherwise
update every directory's atime during a traversal, an option
like this could result in a significant speed-up.



reply via email to

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