Ian Turner <[EMAIL PROTECTED]> wrote:
> Paul,
>
> It's a fine heuristic. I'm still concerned that we read a small file on NFS
> at
> the beginning of the archive, which happens to be in cache, and decide at
> that point that O_NOATIME works for the entire filesystem, when actually, it
> doesn't. I don't see any way around this, other than second-guessing yourself
> all the time.
>
> Another, possibly more reliable way of detecting this, would just be to do
> statfs(), and see if the filesystem type is one known to not work. Then you
> (probably) don't have to worry about false negatives; the only way O_NOATIME
> won't work in that case is if the kernel doesn't support it, so the only bad
> behavior allowed by the heuristic is to call utimes() on possibly several
> files at the beginning of the archive, until it finds one that isn't being
> accessed, at which time it would switch to O_NOATIME.
>
> Another approach might just be to ask the kernel (via uname()) if it supports
> O_NOATIME -- that is, if it is at least version 2.6.8. If that's too much of
> a hack, a sysctl could be addde to ask this question to a future kernel, so
> that we would only nede to use uname() for, say, kernels 2.6.8 - 2.6.14.
Should't a clean Linux implementation offer a related [f]pathconf() call for
this feature?
Jörg
--
EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin
[EMAIL PROTECTED] (uni)
[EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
Bug-tar mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-tar