]> www.infradead.org Git - users/jedix/linux-maple.git/commit
NFSD: fix management of pending async copies
authorOlga Kornievskaia <okorniev@redhat.com>
Tue, 17 Dec 2024 21:18:12 +0000 (16:18 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Tue, 17 Dec 2024 21:35:53 +0000 (16:35 -0500)
commit9048cf05a17a7bc26f0b8e2e53750b1237303970
tree49ea2b93eea1f8b13eaeda3b09b826f1acab39c1
parent69d803c40edeaf94089fbc8751c9b746cdc35044
NFSD: fix management of pending async copies

Currently the pending_async_copies count is decremented just
before a struct nfsd4_copy is destroyed. After commit aa0ebd21df9c
("NFSD: Add nfsd4_copy time-to-live") nfsd4_copy structures sticks
around for 10 lease periods after the COPY itself has completed,
the pending_async_copies count stays high for a long time. This
causes NFSD to avoid the use of background copy even though the
actual background copy workload might no longer be running.

In this patch, decrement pending_async_copies once async copy thread
is done processing the copy work.

Fixes: aa0ebd21df9c ("NFSD: Add nfsd4_copy time-to-live")
Signed-off-by: Olga Kornievskaia <okorniev@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4proc.c