From: Greg Banks <gnb@sgi.com>
To: Tom Tucker <tom@opengridcomputing.com>
Cc: Linux NFS Mailing List <nfs@lists.sourceforge.net>,
Thomas Talpey <Thomas.Talpey@netapp.com>,
Peter Leckie <pleckie@melbourne.sgi.com>
Subject: [RFC,PATCH 14/14] knfsd: centralise SK_ bits some more
Date: Thu, 17 May 2007 05:29:24 +1000 [thread overview]
Message-ID: <20070516192924.GT9626@sgi.com> (raw)
Further centralise the handling of the SK_BUSY, SK_DATA and SK_LISTENER
flags by moving the code which initialises them out of transport
specific code.
Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
---
net/sunrpc/svcsock.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
Index: linux/net/sunrpc/svcsock.c
===================================================================
--- linux.orig/net/sunrpc/svcsock.c 2007-05-17 04:10:26.330080170 +1000
+++ linux/net/sunrpc/svcsock.c 2007-05-17 04:12:19.099511550 +1000
@@ -938,7 +938,6 @@ svc_udp_init(struct svc_sock *svsk)
3 * svsk->sk_server->sv_max_mesg,
3 * svsk->sk_server->sv_max_mesg);
- svc_sock_set_data_ready(svsk); /* might have come in before data_ready set up */
set_bit(SK_CHNGBUF, &svsk->sk_flags);
oldfs = get_fs();
@@ -1395,8 +1394,6 @@ svc_tcp_init_listener(struct svc_sock *s
dprintk("setting up TCP socket for listening\n");
sk->sk_data_ready = svc_tcp_listen_data_ready;
- set_bit(SK_LISTENER, &svsk->sk_flags);
- svc_sock_set_connection_ready(svsk);
}
static void
@@ -1426,7 +1423,6 @@ svc_tcp_init_connection(struct svc_sock
3 * svsk->sk_server->sv_max_mesg);
set_bit(SK_CHNGBUF, &svsk->sk_flags);
- svc_sock_set_data_ready(svsk);
if (sk->sk_state != TCP_ESTABLISHED) {
/* note: caller calls svc_sock_enqueue() */
svc_sock_set_close(svsk);
@@ -1711,7 +1707,6 @@ static struct svc_sock *svc_setup_socket
return NULL;
}
- set_bit(SK_BUSY, &svsk->sk_flags);
inet->sk_user_data = svsk;
svsk->sk_sock = sock;
svsk->sk_sk = inet;
@@ -1741,6 +1736,7 @@ static struct svc_sock *svc_setup_socket
void svc_sock_init(struct svc_sock *svsk, struct svc_serv *serv)
{
+ set_bit(SK_BUSY, &svsk->sk_flags);
svsk->sk_server = serv;
atomic_set(&svsk->sk_inuse, 1);
svsk->sk_lastrecv = get_seconds();
@@ -1754,6 +1750,8 @@ void svc_sock_add_connection(struct svc_
{
struct svc_serv *serv = svsk->sk_server;
+ svc_sock_set_data_ready(svsk);
+
spin_lock_bh(&serv->sv_lock);
set_bit(SK_TEMP, &svsk->sk_flags);
@@ -1784,11 +1782,14 @@ static void svc_sock_add_permanent(struc
void svc_sock_add_listener(struct svc_sock *svsk)
{
+ set_bit(SK_LISTENER, &svsk->sk_flags);
+ svc_sock_set_connection_ready(svsk);
svc_sock_add_permanent(svsk);
}
void svc_sock_add_connectionless(struct svc_sock *svsk)
{
+ svc_sock_set_data_ready(svsk); /* might have come in before data_ready set up */
svc_sock_add_permanent(svsk);
}
--
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
Apparently, I'm Bedevere. Which MPHG character are you?
I don't speak for SGI.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
reply other threads:[~2007-05-16 19:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20070516192924.GT9626@sgi.com \
--to=gnb@sgi.com \
--cc=Thomas.Talpey@netapp.com \
--cc=nfs@lists.sourceforge.net \
--cc=pleckie@melbourne.sgi.com \
--cc=tom@opengridcomputing.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