summaryrefslogtreecommitdiffstats
path: root/src/server/iscsi.c
diff options
context:
space:
mode:
authorSimon Rettberg2025-11-06 13:59:06 +0100
committerSimon Rettberg2025-12-09 15:33:20 +0100
commitaf451c397c267298ea2396f5e66cbd174188c02a (patch)
treeb1bfe95becb245e1085039cbad90659a89639d44 /src/server/iscsi.c
parent[SERVER] iscsi: Minor clang-tidy cleanups (mostly) (diff)
downloaddnbd3-af451c397c267298ea2396f5e66cbd174188c02a.tar.gz
dnbd3-af451c397c267298ea2396f5e66cbd174188c02a.tar.xz
dnbd3-af451c397c267298ea2396f5e66cbd174188c02a.zip
[SERVER] iscsi: Add bytesSent accounting, set thread name
Diffstat (limited to 'src/server/iscsi.c')
-rw-r--r--src/server/iscsi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/server/iscsi.c b/src/server/iscsi.c
index 5657710..21980bf 100644
--- a/src/server/iscsi.c
+++ b/src/server/iscsi.c
@@ -561,6 +561,8 @@ static int iscsi_task_xfer_scsi_data_in(iscsi_connection *conn, const iscsi_task
max_burst_offset += max_burst_len;
}
+ conn->client->bytesSent += xfer_len;
+
return (status & ISCSI_SCSI_DATA_IN_RESPONSE_FLAGS_STATUS);
}
@@ -3327,6 +3329,9 @@ static int iscsi_connecction_handle_login_response(iscsi_connection *conn, iscsi
return ISCSI_CONNECT_PDU_READ_ERR_LOGIN_RESPONSE;
}
+ char tname[50];
+ snprintf( tname, sizeof(tname), "i%s", conn->client->hostName );
+ setThreadName( tname );
break;
}