OSDN Git Service

NFSD add vfs_fsync after async copy is done
authorOlga Kornievskaia <kolga@netapp.com>
Wed, 19 May 2021 18:48:27 +0000 (14:48 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 25 May 2021 21:06:51 +0000 (17:06 -0400)
commiteac0b17a77fbd763d305a5eaa4fd1119e5a0fe0d
tree8d4564e8689e153884abd2a0afb3a08fc271659f
parenteeeadbb9bd5652c47bb9b31aa9ad8b4f1b4aa8b3
NFSD add vfs_fsync after async copy is done

Currently, the server does all copies as NFS_UNSTABLE. For synchronous
copies linux client will append a COMMIT to the COPY compound but for
async copies it does not (because COMMIT needs to be done after all
bytes are copied and not as a reply to the COPY operation).

However, in order to save the client doing a COMMIT as a separate
rpc, the server can reply back with NFS_FILE_SYNC copy. This patch
proposed to add vfs_fsync() call at the end of the async copy.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4proc.c
fs/nfsd/xdr4.h