summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorTrond Myklebust <trondmy@gmail.com>2019-09-30 14:02:56 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2019-10-09 11:45:59 -0400
commit031d73ed768a40684f3ca21992265ffdb6a270bf (patch)
tree1ed200371be586b6290180285569bec68a2c632b /init
parent33ea5aaa87cdae0f9af4d6b7ee4f650a1a36fd1d (diff)
NFS: Fix O_DIRECT accounting of number of bytes read/written
When a series of O_DIRECT reads or writes are truncated, either due to eof or due to an error, then we should return the number of contiguous bytes that were received/sent starting at the offset specified by the application. Currently, we are failing to correctly check contiguity, and so we're failing the generic/465 in xfstests when the race between the read and write RPCs causes the file to get extended while the 2 reads are outstanding. If the first read RPC call wins the race and returns with eof set, we should treat the second read RPC as being truncated. Reported-by: Su Yanjun <suyj.fnst@cn.fujitsu.com> Fixes: 1ccbad9f9f9bd ("nfs: fix DIO good bytes calculation") Cc: stable@vger.kernel.org # 4.1+ Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions