aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfs_xdr.h
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2022-07-22 14:12:20 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2022-07-23 15:28:59 -0400
commit69d966510d9f5de81588b37d23a9ee8ccc477b23 (patch)
treed115d8b86c52e31ead95c9021223d67662998a71 /include/linux/nfs_xdr.h
parentnfs: always check dreq->error after a commit (diff)
downloadlinux-dev-69d966510d9f5de81588b37d23a9ee8ccc477b23.tar.xz
linux-dev-69d966510d9f5de81588b37d23a9ee8ccc477b23.zip
nfs: only issue commit in DIO codepath if we have uncommitted data
Currently, we try to determine whether to issue a commit based on nfs_write_need_commit which looks at the current verifier. In the case where we got a short write and then tried to follow it up with one that failed, the verifier can't be trusted. What we really want to know is whether the pgio request had any successful writes that came back as UNSTABLE. Add a new flag to the pgio request, and use that to indicate that we've had a successful unstable write. Only issue a commit if that flag is set. Signed-off-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'include/linux/nfs_xdr.h')
-rw-r--r--include/linux/nfs_xdr.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 0e3aa0f5f324..e86cf6642d21 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -1600,6 +1600,7 @@ enum {
NFS_IOHDR_STAT,
NFS_IOHDR_RESEND_PNFS,
NFS_IOHDR_RESEND_MDS,
+ NFS_IOHDR_UNSTABLE_WRITES,
};
struct nfs_io_completion;