From: "Adamson, Andy" <William.Adamson@netapp.com>
To: Weston Andros Adamson <dros@monkey.org>
Cc: Trond Myklebust <trond.myklebust@primarydata.com>,
Steve Dickson <steved@redhat.com>,
linux-nfs list <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH Version 3 9/9] NFS add multiaddr to nfs_show_nfsv4_options
Date: Wed, 27 Apr 2016 18:32:01 +0000 [thread overview]
Message-ID: <1461781925092.21414@netapp.com> (raw)
In-Reply-To: <DF9E39F3-AF6A-4459-8747-EBAE3A03E684@monkey.org>
Thanks for catching that Dros
-->Andy
________________________________________
From: Weston Andros Adamson <weston.andros.adamson@gmail.com> on behalf of Weston Andros Adamson <dros@monkey.org>
Sent: Wednesday, April 27, 2016 2:05 PM
To: Adamson, Andy
Cc: Trond Myklebust; Steve Dickson; linux-nfs list
Subject: Re: [PATCH Version 3 9/9] NFS add multiaddr to nfs_show_nfsv4_options
> On Apr 27, 2016, at 11:36 AM, andros@netapp.com wrote:
>
> From: Andy Adamson <andros@netapp.com>
>
> Signed-off-by: Andy Adamson <andros@netapp.com>
> ---
> fs/nfs/super.c | 24 ++++++++++++++++++++++++
> net/sunrpc/xprtmultipath.c | 1 +
> 2 files changed, 25 insertions(+)
>
> diff --git a/fs/nfs/super.c b/fs/nfs/super.c
> index 70a4fda..1dc1e18 100644
> --- a/fs/nfs/super.c
> +++ b/fs/nfs/super.c
> @@ -605,8 +605,32 @@ static void nfs_show_nfsv4_options(struct seq_file *m, struct nfs_server *nfss,
> int showdefaults)
> {
> struct nfs_client *clp = nfss->nfs_client;
> + struct rpc_clnt *clnt = clp->cl_rpcclient;
> + struct rpc_xprt_switch *xps;
> + struct rpc_xprt *pos;
> + unsigned int nxprts;
>
> seq_printf(m, ",clientaddr=%s", clp->cl_ipaddr);
> + rcu_read_lock();
> + xps = xprt_switch_get(rcu_dereference(clnt->cl_xpi.xpi_xpswitch));
> + pos = xprt_iter_xprt(&clnt->cl_xpi);
> + if (xps == NULL || pos == NULL)
> + return;
^^ you need an rcu_read_unlock() before the return.
-dros
> + nxprts = xps->xps_nxprts;
> + list_for_each_entry_rcu(pos, &xps->xps_xprt_list, xprt_switch) {
> + if (nxprts == 0)
> + break;
> + if (pos->address_strings[RPC_DISPLAY_ADDR] == NULL)
> + break;
> + /* Do not display mount xprt as a multiaddr */
> + if (pos == rcu_access_pointer(clp->cl_rpcclient->cl_xprt))
> + continue;
> + seq_printf(m, ",multiaddr=%s",
> + pos->address_strings[RPC_DISPLAY_ADDR]);
> + nxprts--;
> + }
> + rcu_read_unlock();
> + xprt_switch_put(xps);
> }
> #else
> static void nfs_show_nfsv4_options(struct seq_file *m, struct nfs_server *nfss,
> diff --git a/net/sunrpc/xprtmultipath.c b/net/sunrpc/xprtmultipath.c
> index 360f64c..708c22a 100644
> --- a/net/sunrpc/xprtmultipath.c
> +++ b/net/sunrpc/xprtmultipath.c
> @@ -403,6 +403,7 @@ struct rpc_xprt *xprt_iter_xprt(struct rpc_xprt_iter *xpi)
> WARN_ON_ONCE(!rcu_read_lock_held());
> return xprt_iter_ops(xpi)->xpi_xprt(xpi);
> }
> +EXPORT_SYMBOL_GPL(xprt_iter_xprt);
>
> static
> struct rpc_xprt *xprt_iter_get_helper(struct rpc_xprt_iter *xpi,
> --
> 1.8.3.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2016-04-27 18:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 15:36 [PATCH Version 3 0/9] NFSV4.1,2 session trunking andros
2016-04-27 15:36 ` [PATCH Version 3 1/9] NFS parse multiple hostnames andros
2016-04-27 15:36 ` [PATCH Version 3 2/9] NFS default callback ops andros
2016-04-27 15:36 ` [PATCH Version 3 3/9] NFS refactor nfs4_match_clientids andros
2016-04-27 15:36 ` [PATCH Version 3 4/9] NFS refactor nfs4_check_serverowner_major_id andros
2016-04-27 15:36 ` [PATCH Version 3 5/9] NFS detect session trunking andros
2016-04-27 15:36 ` [PATCH Version 3 6/9] NFS refactor _nfs4_proc_exchange_id for " andros
2016-04-27 15:36 ` [PATCH Version 3 7/9] SUNRPC add flag to rpc_task_release_client andros
2016-04-27 15:36 ` [PATCH Version 3 8/9] NFS test and add multi-addrs for session trunking andros
2016-04-27 15:36 ` [PATCH Version 3 9/9] NFS add multiaddr to nfs_show_nfsv4_options andros
2016-04-27 18:05 ` Weston Andros Adamson
2016-04-27 18:32 ` Adamson, Andy [this message]
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=1461781925092.21414@netapp.com \
--to=william.adamson@netapp.com \
--cc=dros@monkey.org \
--cc=linux-nfs@vger.kernel.org \
--cc=steved@redhat.com \
--cc=trond.myklebust@primarydata.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 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.