Messages in this thread | | | Date | Tue, 2 Nov 1999 11:45:36 +0530 (IST) | From | Sushil Agrawal <> | Subject | nfs write() result depends on O_SYNC |
| |
Hi,
I tried to write to a file on a read-only mounted nfs file system. The write system call returns a value depending on whether the O_SYNC flag was set during the open system call.
If O_SYNC flag is set, the nfs_updatepage() function returns "Read Only file system" error but if O_SYNC flag is not set the nfs_updatepage() returns the count itself. This error is subsequently returned by the write system call.
Can someone help me out with following doubts :
1. If O_SYNC flag is not set then does the kernel caches the write request? What happens in the NFS V2 protocol (as far as i remember in V2 protocol clients do not cache write requests) ?
2. Has POSIX defined some standard for behaviour of read/write system calls for an NFS file (or any other standard/rfc in use)?
3. This behaviour does no seem to be correct because if an application has not set the O_SYNC flag and tries (unknowingly) to write to a Read Only NFS file then it will never know that an error occured?
Thanks, Sushil.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |