On Mon, Jan 30 2017, J. Bruce Fields wrote: > On Mon, Jan 30, 2017 at 05:17:00PM +1100, NeilBrown wrote: >> >> If you change the set of filesystems that are exported, then >> the contents of various directories in the NFSv4 pseudo-root >> is likely to change. However the change-id of those >> directories is currently tied to the underlying directory, >> so the clinet may not see the changes in a timely fashion. > > Oh, good catch. > >> This patch changes the change-id number to be derived from the >> "flush_time" of the export cache. Whenever any changes are >> made to the set of exported filesystems, this flush_time is >> updated. The result is that clients see changes to the set >> of exported filesystems much more quickly, often immediately. > > And, a clever solution, as usual.... > > I wonder if it's completely right yet, though. Off the top of my head: > can't the client see the new flush time before it sees the new contents? > If so, a client that caches both during that window could cache the old > contents indefinitely. uhm.... Yes, it could see the new flush time before it sees the new contents. When it sees that new flush time (i.e. new change attribute), it will invalidate its cached contents and ask for the contents again. It will then definitely get new contents. Or do you see something that I don't? Thanks, NeilBrown