noatime option for CIFS
sfrench at us.ibm.com
Sat Jul 29 01:28:13 GMT 2006
Similar to the case of other protocols, if the server updates the atime,
the client will eventually reflect this change. Some local filesystems
on the server can not be mounted with "noatime." In the absense of
mounting the filesystem (on the server) with noatime or equivalent all
local access to a fille (inode) including access from the Samba server
(indirectly generated by the client) - will update atime on the server
(and eventually cause the client's atime to be updated).
The reason for the noatime option on nfs (and why I would consider it
worth investigating for cifs) as I understand it, is to increase network
performance and to avoid unnecessary setattr calls to flow across the
network (SMB SetPathInfo is sent less often).
In addition to noatime (to set atime less frequently), querying timestamps
across the network too often is a performance cost - CIFS caches
timestamps (and filesize) for 1 second to reduce network traffic. In
order to handle very slow links, this should be configurable via a mount
parm (to reduce the getattr, ie SMB QueryPathInfo calls to a minimum)
I should expose the create time - but not sure the best way to do this
(probably via an xattr, ie getfattr) and also the dos attributes. For the
dos attributes we should return them in the same format that Samba sets
them (I forget the name - but it is fairly easy to spot in the source for
"Kevin Wilcox" wrote:
> On 7/28/06, Steven French <sfrench at us.ibm.com> wrote:
> > I think it would be on the order of 50 to 150 lines of code.
> > A few lines in fs/cifs/connect.c to parse_mount_options and much of
> > rest in inode.c in cifs_setattr and perhaps cifs_revalidate
> > Probably not hard.
> > A reasonably simple testcase (better than scripts that do ls/stat )
> > be helpful too
> I'm really sorry to bother you so much. What I still don't understand
> is how are you going to convey to the CIFS server to not update the
> last access time? I didn't see any provisions in the CIFS protcol for
> On another subject: I asked a question on the linux-cifs-client about
> getfattr not working. Did you see that e-mail? I'm trying to get the
> DOS/Win file creation time. A google search indicated that it should
> work, but I get no output from getfattr for any extended attribute.
> I've mounted the FS with the user_xatrr on and off with no change.
Senior Software Engineer
Linux Technology Center - IBM Austin
email: sfrench at-sign us dot ibm dot com
More information about the samba-technical