From: "Myklebust, Trond" <Trond.Myklebust@netapp.com>
To: "Schumaker, Bryan" <Bryan.Schumaker@netapp.com>
Cc: Stanislav Kinsbursky <skinsbursky@parallels.com>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"xemul@parallels.com" <xemul@parallels.com>,
"neilb@suse.de" <neilb@suse.de>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"jbottomley@parallels.com" <jbottomley@parallels.com>,
"bfields@fieldses.org" <bfields@fieldses.org>,
"davem@davemloft.net" <davem@davemloft.net>,
"devel@openvz.org" <devel@openvz.org>
Subject: Re: [PATCH 3/5] NFS: search for client session id in proper network namespace
Date: Tue, 7 Feb 2012 17:48:52 +0000 [thread overview]
Message-ID: <1328636931.4124.17.camel@lade.trondhjem.org> (raw)
In-Reply-To: <4F314688.5050406@netapp.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 3474 bytes --]
On Tue, 2012-02-07 at 10:43 -0500, Bryan Schumaker wrote:
> On 01/26/12 06:11, Stanislav Kinsbursky wrote:
>
> > Network namespace is taken from request transport and passed as a part of
> > cb_process_state structure.
> >
> > Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
> >
> > ---
> > fs/nfs/callback.h | 1 +
> > fs/nfs/callback_proc.c | 2 +-
> > fs/nfs/callback_xdr.c | 1 +
> > fs/nfs/client.c | 4 ++--
> > fs/nfs/internal.h | 3 ++-
> > 5 files changed, 7 insertions(+), 4 deletions(-)
> >
> > diff --git a/fs/nfs/callback.h b/fs/nfs/callback.h
> > index c89d3b9..197e0d3 100644
> > --- a/fs/nfs/callback.h
> > +++ b/fs/nfs/callback.h
> > @@ -39,6 +39,7 @@ struct cb_process_state {
> > __be32 drc_status;
> > struct nfs_client *clp;
> > int slotid;
> > + struct net *net;
> > };
> >
> > struct cb_compound_hdr_arg {
> > diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
> > index 0e6e63f..f71978d 100644
> > --- a/fs/nfs/callback_proc.c
> > +++ b/fs/nfs/callback_proc.c
> > @@ -461,7 +461,7 @@ __be32 nfs4_callback_sequence(struct cb_sequenceargs *args,
> > int i;
> > __be32 status = htonl(NFS4ERR_BADSESSION);
> >
> > - clp = nfs4_find_client_sessionid(args->csa_addr, &args->csa_sessionid);
> > + clp = nfs4_find_client_sessionid(cps->net, args->csa_addr, &args->csa_sessionid);
> > if (clp == NULL)
> > goto out;
> >
> > diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c
> > index f2be3e1e..8c2a969 100644
> > --- a/fs/nfs/callback_xdr.c
> > +++ b/fs/nfs/callback_xdr.c
> > @@ -861,6 +861,7 @@ static __be32 nfs4_callback_compound(struct svc_rqst *rqstp, void *argp, void *r
> > .drc_status = 0,
> > .clp = NULL,
> > .slotid = -1,
> > + .net = rqstp->rq_xprt->xpt_net,
> > };
> > unsigned int nops = 0;
> >
> > diff --git a/fs/nfs/client.c b/fs/nfs/client.c
> > index 9e11d29..2328dcb 100644
> > --- a/fs/nfs/client.c
> > +++ b/fs/nfs/client.c
> > @@ -1232,11 +1232,11 @@ nfs4_find_client_ident(struct net *net, int cb_ident)
> > * Returns NULL if no such client
> > */
> > struct nfs_client *
> > -nfs4_find_client_sessionid(const struct sockaddr *addr,
> > +nfs4_find_client_sessionid(struct net *net, const struct sockaddr *addr,
> > struct nfs4_sessionid *sid)
> > {
> > struct nfs_client *clp;
> > - struct nfs_net *nn = net_generic(&init_net, nfs_net_id);
> > + struct nfs_net *nn = net_generic(net, nfs_net_id);
>
>
> Hi,
>
> You changed this function for the v4.1 case, but not for v4.0 (this is what I was trying to bisect earlier). Without CONFIG_NFS_V4_1 set, I get this:
>
> make[1]: Nothing to be done for `all'.
> CHK include/linux/version.h
> CHK include/generated/utsrelease.h
> CALL scripts/checksyscalls.sh
> CHK include/generated/compile.h
> CHK kernel/config_data.h
> CC [M] fs/nfs/client.o
> fs/nfs/client.c:1265:1: error: conflicting types for 'nfs4_find_client_sessionid'
> fs/nfs/internal.h:155:1: note: previous declaration of 'nfs4_find_client_sessionid' was here
> make[2]: *** [fs/nfs/client.o] Error 1
> make[1]: *** [fs/nfs] Error 2
> make: *** [fs] Error 2
Thanks for tracking this down Bryan!
--
Trond Myklebust
Linux NFS client maintainer
NetApp
Trond.Myklebust@netapp.com
www.netapp.com
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
next prev parent reply other threads:[~2012-02-07 17:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-26 11:11 [PATCH 0/5] NFS: various small fixes and updates for conteinerization Stanislav Kinsbursky
2012-01-26 11:11 ` [PATCH 1/5] NFS: pass proper net rpc_pton() in nfs_dns_resolve_name() Stanislav Kinsbursky
2012-01-26 11:11 ` [PATCH 2/5] NFS: build fixed in case of NFS_USE_NEW_IDMAPPER is undefined Stanislav Kinsbursky
2012-01-26 11:11 ` [PATCH 3/5] NFS: search for client session id in proper network namespace Stanislav Kinsbursky
2012-02-07 15:43 ` Bryan Schumaker
2012-02-07 15:50 ` Stanislav Kinsbursky
2012-02-07 17:48 ` Myklebust, Trond [this message]
2012-01-26 11:11 ` [PATCH 4/5] NFS: pass current net to rpc_pton() while parsing mount options Stanislav Kinsbursky
2012-01-26 11:12 ` [PATCH 5/5] NFS: pass transport net to rpc_pton() while parse server name Stanislav Kinsbursky
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=1328636931.4124.17.camel@lade.trondhjem.org \
--to=trond.myklebust@netapp.com \
--cc=Bryan.Schumaker@netapp.com \
--cc=bfields@fieldses.org \
--cc=davem@davemloft.net \
--cc=devel@openvz.org \
--cc=jbottomley@parallels.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=netdev@vger.kernel.org \
--cc=skinsbursky@parallels.com \
--cc=xemul@parallels.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
all inboxes | Powered by JetHome®