Is there any way to safely use non-zero timeouts in non-readonly filesystems? I cannot seem to find one. A couple of counter-examples:
Example One (non-zero negative entry timeout):
- An application calls stat() and gets ENOENT;
- calls create();
- calls stat(), expecting success, but gets ENOENT instead because of negative entry timeout, so it concludes the FS is broken/inconsistent/etc.
Example Two (non-zero attr timeout):
- An application calls utimes();
- calls stat(), but gets stale values and concludes the FS is broken/inconsistent/etc.
I cannot come up with a counterexample for a positive entry timeout - it seems that even if lookup() returns some stale inode, the filesystem still can return ENOENT for the later getattr() call.
But what about the above 2 examples?