Add support for dumping filesystem state for debugging purposes.
[bluesky.git] / nfs3 / rpc.c
index 92c17c8..468c58c 100644 (file)
@@ -295,6 +295,8 @@ nfs_program_3(RPCRequest *req)
     xdrproc_t _xdr_argument, _xdr_result;
     char *(*local)(char *, RPCRequest *);
 
+    printf("Dispatched NFS RPC message type %d\n", req->req_proc);
+
     switch (req->req_proc) {
     case NFSPROC3_NULL:
         _xdr_argument = (xdrproc_t) xdr_void;
@@ -449,6 +451,7 @@ nfs_program_3(RPCRequest *req)
     result = (*local)((char *)req->args, req);
 
     bluesky_flushd_invoke(fs);
+    bluesky_debug_dump(fs);
 
     return;
 }
@@ -632,7 +635,6 @@ static gboolean async_rpc_do_read(GIOChannel *channel,
             rpc->frag_len = ntohl(rpc->frag_len);
             g_string_set_size(rpc->msgbuf, rpc->msgbuf->len - 4);
             rpc->frag_hdr_bytes = 0;
-            g_print("RPC fragment header: %08x\n", rpc->frag_len);
         }
     } else {
         /* We were reading in the fragment body. */
@@ -641,7 +643,6 @@ static gboolean async_rpc_do_read(GIOChannel *channel,
         if (rpc->frag_len = 0x80000000) {
             /* We have a complete message since this was the last fragment and
              * there are no more bytes in it.  Dispatch the message. */
-            g_print("Complete RPC message: %zd bytes\n", rpc->msgbuf->len);
             if (!async_rpc_dispatch(rpc)) {
                 fprintf(stderr, "Invalid RPC message, closing channel\n");
                 g_io_channel_shutdown(rpc->channel, TRUE, NULL);