diff --git a/kmod/src/net.c b/kmod/src/net.c index a217e19c..14c763a9 100644 --- a/kmod/src/net.c +++ b/kmod/src/net.c @@ -1353,6 +1353,21 @@ int scoutfs_net_response(struct super_block *sb, NULL, NULL, NULL); } +int scoutfs_net_response_node(struct super_block *sb, + struct scoutfs_net_connection *conn, + u64 node_id, u8 cmd, u64 id, int error, + void *resp, u16 resp_len) +{ + if (error) { + resp = NULL; + resp_len = 0; + } + + return submit_send(sb, conn, node_id, cmd, SCOUTFS_NET_FLAG_RESPONSE, + id, net_err_from_host(sb, error), resp, resp_len, + NULL, NULL, NULL); +} + /* * The response function that was submitted with the request is not * called if the request is canceled here. diff --git a/kmod/src/net.h b/kmod/src/net.h index cbbd29bc..b59db537 100644 --- a/kmod/src/net.h +++ b/kmod/src/net.h @@ -58,6 +58,10 @@ int scoutfs_net_sync_request(struct super_block *sb, int scoutfs_net_response(struct super_block *sb, struct scoutfs_net_connection *conn, u8 cmd, u64 id, int error, void *resp, u16 resp_len); +int scoutfs_net_response_node(struct super_block *sb, + struct scoutfs_net_connection *conn, + u64 node_id, u8 cmd, u64 id, int error, + void *resp, u16 resp_len); void scoutfs_net_shutdown(struct super_block *sb, struct scoutfs_net_connection *conn); void scoutfs_net_free_conn(struct super_block *sb,