]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
NFSv4.2: Fix 5 seconds delay when doing inter server copy
authorDai Ngo <dai.ngo@oracle.com>
Tue, 24 Nov 2020 03:15:17 +0000 (22:15 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 2 Dec 2020 18:45:33 +0000 (13:45 -0500)
commitbd75475c2fa161acec0017e030f6e8c01cb0d107
treefa5cd96979ed449f77e2cf0a094d8c082d6a75ee
parent5482e09a8840ee3bb1848d73d05301eafc0e6199
NFSv4.2: Fix 5 seconds delay when doing inter server copy

Since commit b4868b44c5628 ("NFSv4: Wait for stateid updates after
CLOSE/OPEN_DOWNGRADE"), every inter server copy operation suffers 5
seconds delay regardless of the size of the copy. The delay is from
nfs_set_open_stateid_locked when the check by nfs_stateid_is_sequential
fails because the seqid in both nfs4_state and nfs4_stateid are 0.

Fix __nfs42_ssc_open to delay setting of NFS_OPEN_STATE in nfs4_state,
until after the call to update_open_stateid, to indicate this is the 1st
open. This fix is part of a 2 patches, the other patch is the fix in the
source server to return the stateid for COPY_NOTIFY request with seqid 1
instead of 0.

Fixes: ce0887ac96d3 ("NFSD add nfs4 inter ssc to nfsd4_copy")
Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs4file.c