Re: [Linux-cachefs] fscache basic question

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

 



Weikuan Yu <wkyuwk@xxxxxxxxx> wrote:

> So suppose a page is cache by one client of a cluster file system (say
> GFS/Lustre), this means if the client VM caches a page in its page cache, it
> must hold the correct locks for that page then. Otherwise, it would be a race
> condition if another client modifies this page, right?

Yes. Assuming you have such locks to play with.

AFS monitors state by a combination of two things: (1) maintaining a data
version number, and (2) the server holding a temporary lease on behalf of the
client - which gains the client notification of change imposed by a third
party.

NFSv3 and before don't have such things, but NFSv4 does, I believe, as does
SMB/CIFS (oplocks).

I don't know about GFS and Lustre.

> It occurs to me the key is the explanation of page cache being read-through
> rather than be looked aside. I was thinking more from file read/write path,
> and got lost when I thought a client must confirm with servers about the
> state of a file, before reading from the page cache. I guess the locking of
> cluster file systems would play a role here to guarantee the consistency of
> cached pages then.

It would, yes; but you still have to validate the cache against the network
when you open a file for caching.

David


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]
  Powered by Linux