bug-tar
[Top][All Lists]
Advanced

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

[Bug-tar] O_NOATIME support


From: Ian Turner
Subject: [Bug-tar] O_NOATIME support
Date: Thu, 15 Sep 2005 13:03:41 -0700
User-agent: Mozilla Thunderbird 1.0.6-1.1.fc3 (X11/20050720)

Hello all,

Starting in Linux kernel 2.6.8, there is support for opening files with a O_NOATIME flag. Opening files in this way avoids changing their atime. Note that you must be root or the owner of the file to do this. Also, this is only supported on certain filesystems -- NFS, for instance, has the server check atimes.

We should support this feature in tar. One way is to modify --atime-preserve so that, when running on a platform/filesystem that supports O_NOATIME, we avoid changing the ctime. But I think --atime-preserve has a lot of side-effects that make it severely different from O_NOATIME; in particular, you would never want to use --atime-preserve with incremental backups.

So I suggest the best way is to add a new option --noatime, which opens files with O_NOATIME if that is supported, and opens files without --noatime if it is not supported. For bonus points, you could have the option of combining --noatime and --atime-preserve, so that tar would fall back to --atime-preserve if O_NOATIME was not supported. But it might be difficult to check if O_NOATIME is effective on a particular file.

I'm happy to code this patch, but thought I'd check in with the tar folks first.

Cheers,

--Ian Turner




reply via email to

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