]> git.baikalelectronics.ru Git - kernel.git/commit
nfs: only issue commit in DIO codepath if we have uncommitted data
authorJeff Layton <jlayton@kernel.org>
Fri, 22 Jul 2022 18:12:20 +0000 (14:12 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 23 Jul 2022 19:28:59 +0000 (15:28 -0400)
commit9f479200a376b0540b116ed736932b0fc93241c7
treed115d8b86c52e31ead95c9021223d67662998a71
parent7a5da221f89b318b1fd3cd40f4efb738ea50123a
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>
fs/nfs/direct.c
fs/nfs/write.c
include/linux/nfs_xdr.h