mirror of
https://github.com/samba-team/samba.git
synced 2025-02-04 17:47:26 +03:00
merge from tridge
(This used to be ctdb commit 8648104f8d76d22427c14422b126f7e979cc2d95)
This commit is contained in:
commit
2e64727079
@ -359,7 +359,7 @@ static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb,
|
|||||||
case CTDB_CONTROL_PING:
|
case CTDB_CONTROL_PING:
|
||||||
CHECK_CONTROL_DATA_SIZE(0);
|
CHECK_CONTROL_DATA_SIZE(0);
|
||||||
ctdb->status.controls.ping++;
|
ctdb->status.controls.ping++;
|
||||||
return ctdb->num_clients;
|
return ctdb->status.num_clients;
|
||||||
|
|
||||||
case CTDB_CONTROL_GET_DBNAME: {
|
case CTDB_CONTROL_GET_DBNAME: {
|
||||||
uint32_t db_id;
|
uint32_t db_id;
|
||||||
|
@ -248,7 +248,7 @@ static void daemon_request_connect_wait(struct ctdb_client *client,
|
|||||||
static int ctdb_client_destructor(struct ctdb_client *client)
|
static int ctdb_client_destructor(struct ctdb_client *client)
|
||||||
{
|
{
|
||||||
ctdb_reqid_remove(client->ctdb, client->client_id);
|
ctdb_reqid_remove(client->ctdb, client->client_id);
|
||||||
client->ctdb->num_clients--;
|
client->ctdb->status.num_clients--;
|
||||||
close(client->fd);
|
close(client->fd);
|
||||||
client->fd = -1;
|
client->fd = -1;
|
||||||
return 0;
|
return 0;
|
||||||
@ -559,7 +559,7 @@ static void ctdb_accept_client(struct event_context *ev, struct fd_event *fde,
|
|||||||
client->ctdb = ctdb;
|
client->ctdb = ctdb;
|
||||||
client->fd = fd;
|
client->fd = fd;
|
||||||
client->client_id = ctdb_reqid_new(ctdb, client);
|
client->client_id = ctdb_reqid_new(ctdb, client);
|
||||||
ctdb->num_clients++;
|
ctdb->status.num_clients++;
|
||||||
|
|
||||||
client->queue = ctdb_queue_setup(ctdb, client, fd, CTDB_DS_ALIGNMENT,
|
client->queue = ctdb_queue_setup(ctdb, client, fd, CTDB_DS_ALIGNMENT,
|
||||||
ctdb_daemon_read_cb, client);
|
ctdb_daemon_read_cb, client);
|
||||||
|
@ -135,6 +135,7 @@ struct ctdb_daemon_data {
|
|||||||
ctdb status information
|
ctdb status information
|
||||||
*/
|
*/
|
||||||
struct ctdb_status {
|
struct ctdb_status {
|
||||||
|
uint32_t num_clients;
|
||||||
uint32_t client_packets_sent;
|
uint32_t client_packets_sent;
|
||||||
uint32_t client_packets_recv;
|
uint32_t client_packets_recv;
|
||||||
uint32_t node_packets_sent;
|
uint32_t node_packets_sent;
|
||||||
|
@ -97,6 +97,7 @@ static void show_status(struct ctdb_status *s)
|
|||||||
uint32_t offset;
|
uint32_t offset;
|
||||||
} fields[] = {
|
} fields[] = {
|
||||||
#define STATUS_FIELD(n) { #n, offsetof(struct ctdb_status, n) }
|
#define STATUS_FIELD(n) { #n, offsetof(struct ctdb_status, n) }
|
||||||
|
STATUS_FIELD(num_clients),
|
||||||
STATUS_FIELD(client_packets_sent),
|
STATUS_FIELD(client_packets_sent),
|
||||||
STATUS_FIELD(client_packets_recv),
|
STATUS_FIELD(client_packets_recv),
|
||||||
STATUS_FIELD(node_packets_sent),
|
STATUS_FIELD(node_packets_sent),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user