NFS Client Caching
Potential for inconsistent versions at different clients.
Solution approach:
- Whenever file cached, timestamp of last modification on server is cached as well.
- Validation: Client requests latest timestamp from server (getattributes), and compares against local timestamp. If fails, all blocks are invalidated.
Validation check:
- at file open
- whenever server contacted to get new block
- after timeout (3s for file blocks, 30s for directories)
Writes:
- block marked dirty and scheduled for flushing.
- flushing: when file is closed, or a sync occurs at client.
Time lag for change to propagate from one client to other:
- delay between write and flush
- time to next cache validation