]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
vos: restore status information to 'vos status'
authorMark Vitale <mvitale@sinenomine.net>
Fri, 30 Nov 2018 17:10:50 +0000 (12:10 -0500)
committerStephan Wiesand <stephan.wiesand@desy.de>
Fri, 25 Jan 2019 14:27:44 +0000 (09:27 -0500)
Commit d3eaa39da3693bba708fa2fa951568009e929550 'rx: Make the rx_call
structure private' created accessors for several rx_call members.
However, it simply #ifdef'd out the packet counters and timestamps
reported by 'vos status' (AFSVol_Monitor).  This is a regression for the
1.8.x 'vos status' command.

Instead, supply an accessor so 'vos status' can again be used to monitor
the progress of certain volume operations.

FIXES 134856

Reviewed-on: https://gerrit.openafs.org/13400
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
(cherry picked from commit 59d3a8b86da648e3c5b9774183c6c8571a36f0c4)

Change-Id: I16c995623c40a708b06f08fb09224be1baa4de21
Reviewed-on: https://gerrit.openafs.org/13421
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/rx/rx.h
src/rx/rx_call.c
src/volser/volprocs.c

index 6bbf574995dacbc80cbacc137612fba4ebb88ca2..1b3887b2ed959e6c3b6d89657550b35de5fbdc65 100644 (file)
@@ -102,6 +102,11 @@ extern void rx_RecordCallStatistics(struct rx_call *call,
                                    unsigned int totalFunc,
                                    int isServer);
 
+extern void rx_GetCallStatus(struct rx_call *call,
+                            afs_int32 *readNext,
+                            afs_int32 *transmitNext,
+                            int *lastSendTime,
+                            int *lastReceiveTime);
 /* Peer management */
 extern afs_uint32 rx_HostOf(struct rx_peer *peer);
 extern u_short rx_PortOf(struct rx_peer *peer);
index 43d6034fcb7021215cbf6ab10655606001e18ae1..6f22ce0728aac51404701fddb4320a8c31720a1c 100644 (file)
@@ -72,3 +72,23 @@ rx_RecordCallStatistics(struct rx_call *call, unsigned int rxInterface,
                             totalFunc, &queue, &exec, call->app.bytesSent,
                             call->app.bytesRcvd, 1);
 }
+
+/*
+ * Accessor for VolMonitor 'vos status'
+ * note: the rx_call members are all unsigned, but our return targets
+ * in wire struct transDebugInfo are all signed.  Sigh.
+ */
+void
+rx_GetCallStatus(struct rx_call *call, afs_int32 *readNext,
+                       afs_int32 *transmitNext, int *lastSendTime,
+                       int *lastReceiveTime)
+{
+    if (readNext != NULL)
+       *readNext = call->rnext;
+    if (transmitNext != NULL)
+       *transmitNext = call->tnext;
+    if (lastSendTime != NULL)
+       *lastSendTime = call->lastSendTime;
+    if (lastReceiveTime != NULL)
+       *lastReceiveTime = call->lastReceiveTime;
+}
index 985c0a01da87fbd7f9e4fc7185eac0b093153ceb..7491ab24f125e17c79ffebb60940f8dc685796a9 100644 (file)
@@ -2861,12 +2861,8 @@ VolMonitor(struct rx_call *acid, transDebugEntries *transInfo)
        pntr->callValid = 0;
        if (tt->rxCallPtr) {    /*record call related info */
            pntr->callValid = 1;
-#if 0
-           pntr->readNext = tt->rxCallPtr->rnext;
-           pntr->transmitNext = tt->rxCallPtr->tnext;
-           pntr->lastSendTime = tt->rxCallPtr->lastSendTime;
-           pntr->lastReceiveTime = tt->rxCallPtr->lastReceiveTime;
-#endif
+           rx_GetCallStatus(tt->rxCallPtr, &(pntr->readNext), &(pntr->transmitNext),
+                               &(pntr->lastSendTime), &(pntr->lastReceiveTime));
        }
         VTRANS_OBJ_UNLOCK(tt);
        pntr++;