Skip to content

Commit

Permalink
SUNRPC mark the first transport
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Olga Kornievskaia authored and Trond Myklebust committed Jul 8, 2021
1 parent 681d569 commit e091853
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/linux/sunrpc/xprt.h
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ struct rpc_xprt {
struct rcu_head rcu;
const struct xprt_class *xprt_class;
struct rpc_sysfs_xprt *xprt_sysfs;
bool main; /*mark if this is the 1st transport */
};

#if defined(CONFIG_SUNRPC_BACKCHANNEL)
Expand Down
1 change: 1 addition & 0 deletions net/sunrpc/clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ static struct rpc_clnt * rpc_new_client(const struct rpc_create_args *args,
}

rpc_clnt_set_transport(clnt, xprt, timeout);
xprt->main = true;
xprt_iter_init(&clnt->cl_xpi, xps);
xprt_switch_put(xps);

Expand Down

0 comments on commit e091853

Please sign in to comment.