Linux NFS development
 help / color / mirror / Atom feed
From: Olga Kornievskaia <okorniev@redhat.com>
To: chuck.lever@oracle.com, jlayton@kernel.org
Cc: linux-nfs@vger.kernel.org, Olga Kornievskaia <okorniev@redhat.com>
Subject: [PATCH 2/3] SUNRPC: add ability to remove specific server transport
Date: Wed, 15 Jan 2025 18:24:05 -0500	[thread overview]
Message-ID: <20250115232406.44815-3-okorniev@redhat.com> (raw)
In-Reply-To: <20250115232406.44815-1-okorniev@redhat.com>

nfsd needs to be able to remove a particular entry from its
list of transports.

Suggested-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Olga Kornievskaia <okorniev@redhat.com>
---
 include/linux/sunrpc/svc.h |  1 +
 net/sunrpc/svc_xprt.c      | 11 +++++++++++
 2 files changed, 12 insertions(+)

diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 74658cca0f38..0bc0b9ead01e 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -444,6 +444,7 @@ int		   svc_register(const struct svc_serv *, struct net *, const int,
 				const unsigned short, const unsigned short);
 
 void		   svc_wake_up(struct svc_serv *);
+void		   svc_xprt_dequeue_entry(struct svc_xprt *xprt);
 void		   svc_reserve(struct svc_rqst *rqstp, int space);
 void		   svc_pool_wake_idle_thread(struct svc_pool *pool);
 struct svc_pool   *svc_pool_for_cpu(struct svc_serv *serv);
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
index 06779b4cdd0a..7b86e69df08b 100644
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -507,6 +507,17 @@ static struct svc_xprt *svc_xprt_dequeue(struct svc_pool *pool)
 	return xprt;
 }
 
+void svc_xprt_dequeue_entry(struct svc_xprt *xprt)
+{
+	struct svc_pool *pool;
+
+	pool = svc_pool_for_cpu(xprt->xpt_server);
+
+	WARN_ON_ONCE(pool->sp_xprts.ready);
+	llist_del_entry(&pool->sp_xprts.new, &xprt->xpt_ready.node);
+}
+EXPORT_SYMBOL_GPL(svc_xprt_dequeue_entry);
+
 /**
  * svc_reserve - change the space reserved for the reply to a request.
  * @rqstp:  The request in question
-- 
2.47.1


  parent reply	other threads:[~2025-01-15 23:24 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-15 23:24 [PATCH 0/3] fix removal of nfsd listeners Olga Kornievskaia
2025-01-15 23:24 ` [PATCH 1/3] llist: add ability to remove a particular entry from the list Olga Kornievskaia
2025-01-16 14:26   ` Chuck Lever
2025-01-16 14:54     ` Olga Kornievskaia
2025-01-16 15:33       ` Chuck Lever
2025-01-16 15:42         ` Jeff Layton
2025-01-16 16:00           ` Chuck Lever
2025-01-16 16:31             ` Olga Kornievskaia
2025-01-16 16:44               ` Chuck Lever
2025-01-17  4:08   ` kernel test robot
2025-01-17  4:08   ` kernel test robot
2025-01-24  0:57   ` kernel test robot
2025-01-15 23:24 ` Olga Kornievskaia [this message]
2025-01-15 23:24 ` [PATCH 3/3] nfsd: fix management of listener transports Olga Kornievskaia
2025-01-16 14:27   ` Chuck Lever
2025-01-16 14:46     ` Jeff Layton
2025-01-16 14:55       ` Chuck Lever
2025-01-16 15:34         ` Olga Kornievskaia
2025-01-16 15:42           ` Chuck Lever
2025-01-16 11:53 ` [PATCH 0/3] fix removal of nfsd listeners Jeff Layton

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=20250115232406.44815-3-okorniev@redhat.com \
    --to=okorniev@redhat.com \
    --cc=chuck.lever@oracle.com \
    --cc=jlayton@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox