From: Mike Snitzer <snitzer@kernel.org>
To: linux-nfs@vger.kernel.org
Cc: Anna Schumaker <anna@kernel.org>,
Trond Myklebust <trondmy@hammerspace.com>,
Chuck Lever <chuck.lever@oracle.com>,
Jeff Layton <jlayton@kernel.org>, NeilBrown <neilb@suse.de>
Subject: [for-6.13 PATCH v3 08/14] nfsd: nfsd_file_acquire_local no longer returns GC'd nfsd_file
Date: Fri, 15 Nov 2024 20:41:00 -0500 [thread overview]
Message-ID: <20241116014106.25456-9-snitzer@kernel.org> (raw)
In-Reply-To: <20241116014106.25456-1-snitzer@kernel.org>
Now that LOCALIO no longer leans on NFSD's filecache for caching open
files (and instead uses NFS client-side open nfsd_file caching) there
is no need to use NFSD filecache's GC feature. Avoiding GC will speed
up nfsd_file initial opens.
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
---
fs/nfsd/filecache.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
index fac98b2cb463a..ab9942e420543 100644
--- a/fs/nfsd/filecache.c
+++ b/fs/nfsd/filecache.c
@@ -1225,10 +1225,9 @@ nfsd_file_acquire(struct svc_rqst *rqstp, struct svc_fh *fhp,
* a file. The security implications of this should be carefully
* considered before use.
*
- * The nfsd_file object returned by this API is reference-counted
- * and garbage-collected. The object is retained for a few
- * seconds after the final nfsd_file_put() in case the caller
- * wants to re-use it.
+ * The nfsd_file_object returned by this API is reference-counted
+ * but not garbage-collected. The object is unhashed after the
+ * final nfsd_file_put().
*
* Return values:
* %nfs_ok - @pnf points to an nfsd_file with its reference
@@ -1250,7 +1249,7 @@ nfsd_file_acquire_local(struct net *net, struct svc_cred *cred,
__be32 beres;
beres = nfsd_file_do_acquire(NULL, net, cred, client,
- fhp, may_flags, NULL, pnf, true);
+ fhp, may_flags, NULL, pnf, false);
revert_creds(save_cred);
return beres;
}
--
2.44.0
next prev parent reply other threads:[~2024-11-16 1:41 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-16 1:40 [for-6.13 PATCH v3 00/14] nfs/nfsd: improvements for LOCALIO Mike Snitzer
2024-11-16 1:40 ` [for-6.13 PATCH v3 01/14] nfs/localio: add direct IO enablement with sync and async IO support Mike Snitzer
2024-11-16 1:40 ` [for-6.13 PATCH v3 02/14] nfsd: add nfsd_file_{get,put} to 'nfs_to' nfsd_localio_operations Mike Snitzer
2024-11-16 1:40 ` [for-6.13 PATCH v3 03/14] nfs_common: rename functions that invalidate LOCALIO nfs_clients Mike Snitzer
2024-11-16 1:40 ` [for-6.13 PATCH v3 04/14] nfs_common: move localio_lock to new lock member of nfs_uuid_t Mike Snitzer
2024-11-16 1:40 ` [for-6.13 PATCH v3 05/14] nfs: cache all open LOCALIO nfsd_file(s) in client Mike Snitzer
2024-11-16 1:40 ` [for-6.13 PATCH v3 06/14] nfsd: update percpu_ref to manage references on nfsd_net Mike Snitzer
2024-11-16 1:40 ` [for-6.13 PATCH v3 07/14] nfsd: rename nfsd_serv_ prefixed methods and variables with nfsd_net_ Mike Snitzer
2024-11-16 1:41 ` Mike Snitzer [this message]
2024-11-16 1:41 ` [for-6.13 PATCH v3 09/14] nfs_common: rename nfslocalio nfs_uuid_lock to nfs_uuids_lock Mike Snitzer
2024-11-16 1:41 ` [for-6.13 PATCH v3 10/14] nfs_common: track all open nfsd_files per LOCALIO nfs_client Mike Snitzer
2024-11-16 1:41 ` [for-6.13 PATCH v3 11/14] nfs_common: add nfs_localio trace events Mike Snitzer
2024-11-16 1:41 ` [for-6.13 PATCH v3 12/14] nfs/localio: remove redundant code and simplify LOCALIO enablement Mike Snitzer
2024-11-16 1:41 ` [for-6.13 PATCH v3 13/14] nfs: probe for LOCALIO when v4 client reconnects to server Mike Snitzer
2024-11-16 1:41 ` [for-6.13 PATCH v3 14/14] nfs: probe for LOCALIO when v3 " Mike Snitzer
2024-11-22 17:26 ` [for-6.13 PATCH v3 00/14] nfs/nfsd: improvements for LOCALIO Jeff Layton
2024-11-23 2:31 ` Mike Snitzer
2024-12-18 17:31 ` Mike Snitzer
2024-12-18 20:55 ` Anna Schumaker
2024-12-18 21:05 ` Chuck Lever
2024-12-18 21:19 ` Mike Snitzer
2025-01-08 16:05 ` Mike Snitzer
2025-01-08 20:56 ` Anna Schumaker
2025-01-13 22:29 ` [PATCH v2] nfs: fix incorrect error handling in LOCALIO (was: Re: [for-6.13 PATCH v3 00/14] nfs/nfsd: improvements for LOCALIO) Mike Snitzer
2024-12-18 21:07 ` [for-6.13 PATCH v3 00/14] nfs/nfsd: improvements for LOCALIO Mike Snitzer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241116014106.25456-9-snitzer@kernel.org \
--to=snitzer@kernel.org \
--cc=anna@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=trondmy@hammerspace.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox