mirror of
https://github.com/versity/scoutfs.git
synced 2026-02-10 04:30:10 +00:00
scoutfs: add scoutfs_net_client_node_id()
Some upcoming network request processing paths need access to the connected client's node_id. We could add it to the arguments but that'd be a lot of churn so we'll add an accessor function for now. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -1154,6 +1154,17 @@ scoutfs_net_alloc_conn(struct super_block *sb,
|
||||
return conn;
|
||||
}
|
||||
|
||||
/*
|
||||
* Give the caller the client node_id of the connection. This used by
|
||||
* rare server processing callers who want to send async responses after
|
||||
* request processing has returned. We didn't want to plumb the
|
||||
* requesting node_id into all the request handlers but that'd work too.
|
||||
*/
|
||||
u64 scoutfs_net_client_node_id(struct scoutfs_net_connection *conn)
|
||||
{
|
||||
return conn->node_id;
|
||||
}
|
||||
|
||||
/*
|
||||
* Shutdown the connection. Once this returns no network traffic
|
||||
* or work will be executing. The caller can then connect or bind and
|
||||
|
||||
@@ -28,6 +28,7 @@ scoutfs_net_alloc_conn(struct super_block *sb,
|
||||
scoutfs_net_notify_t notify_up,
|
||||
scoutfs_net_notify_t notify_down, size_t info_size,
|
||||
scoutfs_net_request_t *req_funcs, char *name_suffix);
|
||||
u64 scoutfs_net_client_node_id(struct scoutfs_net_connection *conn);
|
||||
int scoutfs_net_connect(struct super_block *sb,
|
||||
struct scoutfs_net_connection *conn,
|
||||
struct sockaddr_in *sin, unsigned long timeout_ms);
|
||||
|
||||
Reference in New Issue
Block a user