All of lore.kernel.org
 help / color / mirror / Atom feed
* NFS atime behavior is not documented
@ 2013-11-11 16:50 Chuck Lever
  2013-11-11 17:33 ` Myklebust, Trond
  0 siblings, 1 reply; 5+ messages in thread
From: Chuck Lever @ 2013-11-11 16:50 UTC (permalink / raw)
  To: Linux NFS Mailing List

Hi-

It was recently pointed out to me that the behavior of atime on NFS mount points is pretty dodgy, yet this is not documented anywhere, not even in the venerable and unmaintained Linux NFS FAQ.

A good place to cover this topic might be nfs(5).  It could discuss how the Linux NFS client deals with the various *atime mount options (mostly be collapsing them into relatime, all the time).  And it could discuss how file timestamps are updated when the physical backing store is on another system.

Thoughts?  Comments?

-- 
Chuck Lever
chuck[dot]lever[at]oracle[dot]com





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: NFS atime behavior is not documented
  2013-11-11 16:50 NFS atime behavior is not documented Chuck Lever
@ 2013-11-11 17:33 ` Myklebust, Trond
  2013-11-11 20:35   ` Chuck Lever
  0 siblings, 1 reply; 5+ messages in thread
From: Myklebust, Trond @ 2013-11-11 17:33 UTC (permalink / raw)
  To: Charles Edward Lever; +Cc: Linux NFS Mailing List


On Nov 11, 2013, at 11:50, Chuck Lever <chuck.lever@oracle.com> wrote:

> Hi-
> 
> It was recently pointed out to me that the behavior of atime on NFS mount points is pretty dodgy, yet this is not documented anywhere, not even in the venerable and unmaintained Linux NFS FAQ.
> 
> A good place to cover this topic might be nfs(5).  It could discuss how the Linux NFS client deals with the various *atime mount options (mostly be collapsing them into relatime, all the time).  And it could discuss how file timestamps are updated when the physical backing store is on another system.
> 
> Thoughts?  Comments?

NFS atime is not the same as relatime.

Our atime is only updated when a READ rpc call goes to the server. Cached reads do not, for instance, trigger an atime update. That is a very different model than the relatime model.

Cheers
  Trond

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: NFS atime behavior is not documented
  2013-11-11 17:33 ` Myklebust, Trond
@ 2013-11-11 20:35   ` Chuck Lever
  2013-11-11 21:02     ` Myklebust, Trond
  0 siblings, 1 reply; 5+ messages in thread
From: Chuck Lever @ 2013-11-11 20:35 UTC (permalink / raw)
  To: Myklebust, Trond; +Cc: Linux NFS Mailing List


On Nov 11, 2013, at 12:33 PM, "Myklebust, Trond" <Trond.Myklebust@netapp.com> wrote:

> 
> On Nov 11, 2013, at 11:50, Chuck Lever <chuck.lever@oracle.com> wrote:
> 
>> Hi-
>> 
>> It was recently pointed out to me that the behavior of atime on NFS mount points is pretty dodgy, yet this is not documented anywhere, not even in the venerable and unmaintained Linux NFS FAQ.
>> 
>> A good place to cover this topic might be nfs(5).  It could discuss how the Linux NFS client deals with the various *atime mount options (mostly be collapsing them into relatime, all the time).  And it could discuss how file timestamps are updated when the physical backing store is on another system.
>> 
>> Thoughts?  Comments?
> 
> NFS atime is not the same as relatime.
> 
> Our atime is only updated when a READ rpc call goes to the server. Cached reads do not, for instance, trigger an atime update. That is a very different model than the relatime model.

Yes, but /proc/mounts shows the "relatime" option on NFS mounts.  And apparently it doesn't go away if you specify "noatime," for example.

Basically it looks to some people like NFS ignores all the atime mount options.  We should document how NFS behaves, or fix it.

-- 
Chuck Lever
chuck[dot]lever[at]oracle[dot]com





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: NFS atime behavior is not documented
  2013-11-11 20:35   ` Chuck Lever
@ 2013-11-11 21:02     ` Myklebust, Trond
  2013-11-11 21:12       ` Chuck Lever
  0 siblings, 1 reply; 5+ messages in thread
From: Myklebust, Trond @ 2013-11-11 21:02 UTC (permalink / raw)
  To: Chuck Lever; +Cc: Linux NFS Mailing List

On Mon, 2013-11-11 at 15:35 -0500, Chuck Lever wrote:
> On Nov 11, 2013, at 12:33 PM, "Myklebust, Trond" <Trond.Myklebust@netapp.com> wrote:
> 
> > 
> > On Nov 11, 2013, at 11:50, Chuck Lever <chuck.lever@oracle.com> wrote:
> > 
> >> Hi-
> >> 
> >> It was recently pointed out to me that the behavior of atime on NFS mount points is pretty dodgy, yet this is not documented anywhere, not even in the venerable and unmaintained Linux NFS FAQ.
> >> 
> >> A good place to cover this topic might be nfs(5).  It could discuss how the Linux NFS client deals with the various *atime mount options (mostly be collapsing them into relatime, all the time).  And it could discuss how file timestamps are updated when the physical backing store is on another system.
> >> 
> >> Thoughts?  Comments?
> > 
> > NFS atime is not the same as relatime.
> > 
> > Our atime is only updated when a READ rpc call goes to the server. Cached reads do not, for instance, trigger an atime update. That is a very different model than the relatime model.
> 
> Yes, but /proc/mounts shows the "relatime" option on NFS mounts.  And apparently it doesn't go away if you specify "noatime," for example.
> 
> Basically it looks to some people like NFS ignores all the atime mount options.  We should document how NFS behaves, or fix it.

We _should_ ignore all atime mount options. 

I'm fine with documenting the behaviour somewhere, but my point was that
documenting it in terms of "relatime" is not correct. We could, however,
clear that default MNT_RELATIME flag that 'do_mount' conveniently sets
for us.


-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: NFS atime behavior is not documented
  2013-11-11 21:02     ` Myklebust, Trond
@ 2013-11-11 21:12       ` Chuck Lever
  0 siblings, 0 replies; 5+ messages in thread
From: Chuck Lever @ 2013-11-11 21:12 UTC (permalink / raw)
  To: Myklebust, Trond; +Cc: Linux NFS Mailing List


On Nov 11, 2013, at 4:02 PM, "Myklebust, Trond" <Trond.Myklebust@netapp.com> wrote:

> On Mon, 2013-11-11 at 15:35 -0500, Chuck Lever wrote:
>> On Nov 11, 2013, at 12:33 PM, "Myklebust, Trond" <Trond.Myklebust@netapp.com> wrote:
>> 
>>> 
>>> On Nov 11, 2013, at 11:50, Chuck Lever <chuck.lever@oracle.com> wrote:
>>> 
>>>> Hi-
>>>> 
>>>> It was recently pointed out to me that the behavior of atime on NFS mount points is pretty dodgy, yet this is not documented anywhere, not even in the venerable and unmaintained Linux NFS FAQ.
>>>> 
>>>> A good place to cover this topic might be nfs(5).  It could discuss how the Linux NFS client deals with the various *atime mount options (mostly be collapsing them into relatime, all the time).  And it could discuss how file timestamps are updated when the physical backing store is on another system.
>>>> 
>>>> Thoughts?  Comments?
>>> 
>>> NFS atime is not the same as relatime.
>>> 
>>> Our atime is only updated when a READ rpc call goes to the server. Cached reads do not, for instance, trigger an atime update. That is a very different model than the relatime model.
>> 
>> Yes, but /proc/mounts shows the "relatime" option on NFS mounts.  And apparently it doesn't go away if you specify "noatime," for example.
>> 
>> Basically it looks to some people like NFS ignores all the atime mount options.  We should document how NFS behaves, or fix it.
> 
> We _should_ ignore all atime mount options.

Makes sense.

> I'm fine with documenting the behaviour somewhere, but my point was that
> documenting it in terms of "relatime" is not correct. We could, however,
> clear that default MNT_RELATIME flag that 'do_mount' conveniently sets
> for us.

I'm operating from what users can observe, and they see "relatime" in /proc/mounts, which is why I described it that way.  /proc/mounts is clearly wrong, then.

Can you make the kernel work the way you prefer?  I'm happy to provide an update to nfs(5) that documents that preference.  I think we do need to discuss how timestamps work on NFS, and exactly what happens when "*atime" mount options are specified.

-- 
Chuck Lever
chuck[dot]lever[at]oracle[dot]com





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-11-11 21:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-11 16:50 NFS atime behavior is not documented Chuck Lever
2013-11-11 17:33 ` Myklebust, Trond
2013-11-11 20:35   ` Chuck Lever
2013-11-11 21:02     ` Myklebust, Trond
2013-11-11 21:12       ` Chuck Lever

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.