All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: linux-nfs@vger.kernel.org
Subject: [PATCH RFC 4/7] NFS: Add a private local dispatcher for NFSv4 callback operations
Date: Mon, 12 Jul 2021 10:52:40 -0400	[thread overview]
Message-ID: <162610156015.2466.9878372753061480550.stgit@klimt.1015granger.net> (raw)
In-Reply-To: <162610122257.2466.7452891285800059767.stgit@klimt.1015granger.net>

The client's NFSv4 callback service is the only remaining user of
svc_generic_dispatch().

Note that the NFSv4 callback service doesn't use the .pc_encode and
.pc_decode callouts in any substantial way, so they are removed.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 fs/nfs/callback_xdr.c |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c
index 7ff99155b023..34cb84174196 100644
--- a/fs/nfs/callback_xdr.c
+++ b/fs/nfs/callback_xdr.c
@@ -992,6 +992,15 @@ static __be32 nfs4_callback_compound(struct svc_rqst *rqstp)
 	return rpc_success;
 }
 
+static int
+nfs_callback_dispatch(struct svc_rqst *rqstp, __be32 *statp)
+{
+	const struct svc_procedure *procp = rqstp->rq_procinfo;
+
+	*statp = procp->pc_func(rqstp);
+	return !test_bit(RQ_DROPME, &rqstp->rq_flags);
+}
+
 /*
  * Define NFS4 callback COMPOUND ops.
  */
@@ -1080,7 +1089,7 @@ const struct svc_version nfs4_callback_version1 = {
 	.vs_proc = nfs4_callback_procedures1,
 	.vs_count = nfs4_callback_count1,
 	.vs_xdrsize = NFS4_CALLBACK_XDRSIZE,
-	.vs_dispatch = NULL,
+	.vs_dispatch = nfs_callback_dispatch,
 	.vs_hidden = true,
 	.vs_need_cong_ctrl = true,
 };
@@ -1092,7 +1101,7 @@ const struct svc_version nfs4_callback_version4 = {
 	.vs_proc = nfs4_callback_procedures1,
 	.vs_count = nfs4_callback_count4,
 	.vs_xdrsize = NFS4_CALLBACK_XDRSIZE,
-	.vs_dispatch = NULL,
+	.vs_dispatch = nfs_callback_dispatch,
 	.vs_hidden = true,
 	.vs_need_cong_ctrl = true,
 };



  parent reply	other threads:[~2021-07-12 14:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-12 14:52 [PATCH RFC 0/7] XDR overhaul of NFS callback service Chuck Lever
2021-07-12 14:52 ` [PATCH RFC 1/7] SUNRPC: Add svc_rqst::rq_auth_stat Chuck Lever
2021-07-12 14:52 ` [PATCH RFC 2/7] SUNRPC: Set rq_auth_stat in the pg_authenticate() callout Chuck Lever
2021-07-12 14:52 ` [PATCH RFC 3/7] SUNRPC: Eliminate the RQ_AUTHERR flag Chuck Lever
2021-07-12 14:52 ` Chuck Lever [this message]
2021-07-12 14:52 ` [PATCH RFC 5/7] NFS: Remove unused callback void encoder and decoder Chuck Lever
2021-07-12 14:52 ` [PATCH RFC 6/7] NFS: Extract the xdr_init_encode/decode() calls from decode_compound Chuck Lever
2021-07-12 14:52 ` [PATCH RFC 7/7] NFS: Clean up the synopsis of callback process_op() Chuck Lever
2021-07-23 20:29 ` [PATCH RFC 0/7] XDR overhaul of NFS callback service J. Bruce Fields

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=162610156015.2466.9878372753061480550.stgit@klimt.1015granger.net \
    --to=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.