bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] Re: [patch] O_NOATIME support


From: Joerg Schilling
Subject: Re: [Bug-tar] Re: [patch] O_NOATIME support
Date: Thu, 13 Oct 2005 16:57:15 +0200
User-agent: nail 11.2 8/15/04

Ian Turner <address@hidden> 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:address@hidden (home) Jörg Schilling D-13353 Berlin
       address@hidden           (uni)  
       address@hidden   (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily




reply via email to

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