extern BlueSkyFS *fs;
static int outstanding_rpcs = 0;
+static struct bluesky_stats *rpc_recv_stats, *rpc_send_stats;
/* TCP port number to use for NFS protocol. (Should be 2049.) */
#define NFS_SERVICE_PORT 2051
}
g_atomic_int_add(&outstanding_rpcs, -1);
+ bluesky_stats_add(rpc_send_stats, str->len);
struct rpc_reply header;
header.xid = htonl(req->xid);
GString *msg = rpc->msgbuf;
const char *buf = msg->str;
+ bluesky_stats_add(rpc_recv_stats, msg->len);
+
if (msg->len < sizeof(struct rpc_call_header)) {
fprintf(stderr, "Short RPC message: only %zd bytes!\n", msg->len);
return FALSE;
{
SVCXPRT *transp;
+ rpc_recv_stats = bluesky_stats_new("NFS RPC Messages In");
+ rpc_send_stats = bluesky_stats_new("NFS RPC Messages Out");
+
async_rpc_init();
/* MOUNT protocol */