SUNRPC mark the first transport
When an RPC client gets created it's first transport is special and should be marked a main transport. Signed-off-by: Olga Kornievskaia <kolga@netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
parent
681d5699cb
commit
e091853ebd
|
@ -293,6 +293,7 @@ struct rpc_xprt {
|
||||||
struct rcu_head rcu;
|
struct rcu_head rcu;
|
||||||
const struct xprt_class *xprt_class;
|
const struct xprt_class *xprt_class;
|
||||||
struct rpc_sysfs_xprt *xprt_sysfs;
|
struct rpc_sysfs_xprt *xprt_sysfs;
|
||||||
|
bool main; /*mark if this is the 1st transport */
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(CONFIG_SUNRPC_BACKCHANNEL)
|
#if defined(CONFIG_SUNRPC_BACKCHANNEL)
|
||||||
|
|
|
@ -412,6 +412,7 @@ static struct rpc_clnt * rpc_new_client(const struct rpc_create_args *args,
|
||||||
}
|
}
|
||||||
|
|
||||||
rpc_clnt_set_transport(clnt, xprt, timeout);
|
rpc_clnt_set_transport(clnt, xprt, timeout);
|
||||||
|
xprt->main = true;
|
||||||
xprt_iter_init(&clnt->cl_xpi, xps);
|
xprt_iter_init(&clnt->cl_xpi, xps);
|
||||||
xprt_switch_put(xps);
|
xprt_switch_put(xps);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue