On Mon, 12 Mar 2001, Peter J. Braam wrote:
> Hi,
>
> We were looking at generic_file_read and generic_file_write attempting to
> determine if reads can see partial writes.
Yes, reads can see partial writes.
> Writes appear to be atomic with respect to operations that are holding
> i_sem. Also, the page lock is taken and the comment indicates that this
> grants exclusive I/O access to the page. However we don't see corresponding
> locking in generic_file_read.
>
> Is this in fact so? Is that the way it should be?
The kernel makes no atomicity guarantees about sys_read vs sys_write. The
fact that i_sem is used and provides atomicity between writes is purely an
implementation detail that will eventually change.
-ben
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]