]> git.baikalelectronics.ru Git - kernel.git/commit
NFSD: delay unmount source's export after inter-server copy completed.
authorDai Ngo <dai.ngo@oracle.com>
Fri, 21 May 2021 19:09:37 +0000 (15:09 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 25 May 2021 21:06:51 +0000 (17:06 -0400)
commit006c81776132548ed1fa6da89cd3d0e1b0f4cf74
tree44bb946e81e134a5ae0487807f1324f4d4709951
parentb2b95833f63982a57b02b1217f2d43dc74832ecc
NFSD: delay unmount source's export after inter-server copy completed.

Currently the source's export is mounted and unmounted on every
inter-server copy operation. This patch is an enhancement to delay
the unmount of the source export for a certain period of time to
eliminate the mount and unmount overhead on subsequent copy operations.

After a copy operation completes, a work entry is added to the
delayed unmount list with an expiration time. This list is serviced
by the laundromat thread to unmount the export of the expired entries.
Each time the export is being used again, its expiration time is
extended and the entry is re-inserted to the tail of the list.

The unmount task and the mount operation of the copy request are
synced to make sure the export is not unmounted while it's being
used.

Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/netns.h
fs/nfsd/nfs4proc.c
fs/nfsd/nfs4state.c
fs/nfsd/nfsd.h
fs/nfsd/nfssvc.c
include/linux/nfs_ssc.h