Searched hist:"031 d73ed768a40684f3ca21992265ffdb6a270bf" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/fs/nfs/ |
H A D | direct.c | diff 031d73ed768a40684f3ca21992265ffdb6a270bf Mon Sep 30 13:02:56 CDT 2019 Trond Myklebust <trondmy@gmail.com> 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>
|