mesa dating - Nfs not updating ctime

It'd just ensure that when we write the file again, we choose a genuinely new change attribute and not one we might have used on the previous boot.

nfs not updating ctime-60

I do think we'll need to come up with some scheme that avoids that.

I'm not so sure, but actually this is really only a problem if the counter wraps around *and* a client's two successive stats manage to hit the same value each time through, which sounds pretty unlikely.

Especially if there's a possibility of multiple reboots and network partitions I don't think we even know which boots are affected (maybe this is a boot after a clean shutdown but we still have a back-in-time change attribute left over from a previous crash).

Maybe a simple fix would be: instead of making the change attribute a simple 64-bit counter, instead put current unix time in the top 32 bits and a counter in the bottom 32 bits.

Print a warning and congratulations to the log the first time anyone manages to sustain more than 4 billion writes in a second....

Posted Aug 23, 2013 UTC (Fri) by bfields (subscriber, #19510) [Link] You're suggesting ensuring that any pending ctime/mtime/change attribute updates be committed to disk before responding to an nfs stat? remember that the NFS spec requires that any writes to a NFS volume must be safe on disk before the write completes.

I suspect it wouldn't be too hard to hit that mark ;) This scheme might work, but you'd still have the same problem that all caches would end up invalidated when the server reboots.

You're quite correct that that *is* a problem that can crush an NFS server if it has a lot of clients dealing with large files.

could be (and for the record, I didn't recognize that was who he was), but I've seen people manage to miss obvious things before in their area of expertise (and I've done it myself) If I'm wrong about my understanding of what NFS requires, I'm interested in being corrected, I'll learn something and be in a better position to setup or troubleshoot in the future.

David Lang Posted Aug 24, 2013 UTC (Sat) by bfields (subscriber, #19510) [Link] No problem, I can overlook the obvious....

In that case..-- maybe adding some sort of random offset to the change_attribute that's generated at boot time might make sense.

Tags: , ,