lkml.org 
[lkml]   [1999]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectnfs 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/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.400 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site