Linux NFS development
 help / color / mirror / Atom feed
* invalidating cache on chmod
@ 2014-07-16 19:38 J. Bruce Fields
  2014-07-17  5:00 ` Trond Myklebust
  0 siblings, 1 reply; 2+ messages in thread
From: J. Bruce Fields @ 2014-07-16 19:38 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: linux-nfs

As of (a backport of) 3a1556e8662 "NFSv2/v3: Simulate the change
attribute" we have a user complaining about chmod on the client
invalidating data caches.  (They have some sort of pipeline running on
the client where output from one stage is has ownership and permissions,
but not data, change before being used as input to the next.)

Looks like that's expected?

--b.

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

* Re: invalidating cache on chmod
  2014-07-16 19:38 invalidating cache on chmod J. Bruce Fields
@ 2014-07-17  5:00 ` Trond Myklebust
  0 siblings, 0 replies; 2+ messages in thread
From: Trond Myklebust @ 2014-07-17  5:00 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: Linux NFS Mailing List

On Wed, Jul 16, 2014 at 12:38 PM, J. Bruce Fields <bfields@fieldses.org> wrote:
> As of (a backport of) 3a1556e8662 "NFSv2/v3: Simulate the change
> attribute" we have a user complaining about chmod on the client
> invalidating data caches.  (They have some sort of pipeline running on
> the client where output from one stage is has ownership and permissions,
> but not data, change before being used as input to the next.)
>
> Looks like that's expected?

Yes, that's expected. There is a tradeoff here: we could either use
the ctime, in which case there is the problem of false negative cache
revalidations (in cases such as the above), or we could use the mtime,
which has a problem of false positive cache revalidations (after an
application deliberately sets the mtime value).

The choice fell on ctime because that's what was being used for NFSv4
and, because false positive revalidations can lead to data corruption,
whereas false negatives do not.

-- 
Trond Myklebust

Linux NFS client maintainer, PrimaryData

trond.myklebust@primarydata.com

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

end of thread, other threads:[~2014-07-17  5:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-16 19:38 invalidating cache on chmod J. Bruce Fields
2014-07-17  5:00 ` Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox