Re: [PATCH 1/1] NFS: Sync the correct byte range during synchronous writes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2017-09-07 at 09:29 -0400, tarangg@xxxxxxxxxx wrote:
> Since commit 18290650b1c8 ("NFS: Move buffered I/O locking into
> nfs_file_write()") nfs_file_write() has not flushed the correct byte
> range during synchronous writes.  generic_write_sync() expects that
> iocb->ki_pos points to the right edge of the range rather than the
> left edge.
> 
> To replicate the problem, open a file with O_DSYNC, have the client
> write at increasing offsets, and then print the successful offsets.
> Block port 2049 partway through that sequence, and observe that the
> client application indicates successful writes in advance of what the
> server received.
> 
> Fixes: 18290650b1c8 ("NFS: Move buffered I/O locking into
> nfs_file_write()")
> Signed-off-by: Jacob Strauss <jsstraus@xxxxxxxxxx>
> Signed-off-by: Tarang Gupta <tarangg@xxxxxxxxxx>
> Tested-by: Tarang Gupta <tarangg@xxxxxxxxxx>

Thanks! Nice catch!

Patch is applied and will be queued for stable 4.8+...

-- 
Trond Myklebust
Linux NFS client maintainer, PrimaryData
trond.myklebust@xxxxxxxxxxxxxxx
��.n��������+%������w��{.n�����{��w���jg��������ݢj����G�������j:+v���w�m������w�������h�����٥




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux