viced: Fix minor log message mistakes 24/14724/3
authorMark Vitale <mvitale@sinenomine.net>
Mon, 22 Jun 2020 01:44:17 +0000 (21:44 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 6 Aug 2021 02:29:41 +0000 (22:29 -0400)
Fix a few minor mistakes/typos that have crept up in viced over time:

- In PrintCallBackStats, struct FEs and struct CBs are 64 bytes, not
  16 bytes. Show the actual size of the structs.

- A log message in cb_stateDiskEntryToFE is missing the trailing
  newline.

- In cb_stateVerifyHCBList, a log message mentions the non-existent
  cb_stateVerifyFCBList (instead of cb_stateVerifyHCBList)

Change-Id: I1146acae84d11980b6005cede9bb8bb53c54c70f
Reviewed-on: https://gerrit.openafs.org/14724
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

src/viced/callback.c

index 97cd0a1..41398ef 100644 (file)
@@ -1688,9 +1688,9 @@ PrintCallBackStats(void)
            cbstuff.AddCallBacks, cbstuff.BreakCallBacks,
            cbstuff.DeleteCallBacks, cbstuff.DeleteFiles, cbstuff.CBsTimedOut,
            cbstuff.GotSomeSpaces, cbstuff.DeleteAllCallBacks);
-    fprintf(stderr, "%d CBs, %d FEs, (%d of total of %d 16-byte blocks)\n",
+    fprintf(stderr, "%d CBs, %d FEs, (%d of total of %d %d-byte blocks)\n",
            cbstuff.nCBs, cbstuff.nFEs, cbstuff.nCBs + cbstuff.nFEs,
-           cbstuff.nblks);
+           cbstuff.nblks, (int) sizeof(struct CallBack));
     fprintf(stderr, "%d GSS1, %d GSS2, %d GSS3, %d GSS4, %d GSS5 (internal counters)\n",
            cbstuff.GSS1, cbstuff.GSS2, cbstuff.GSS3, cbstuff.GSS4, cbstuff.GSS5);
 
@@ -2079,7 +2079,7 @@ cb_stateVerifyHCBList(struct fs_dump_state * state, struct host * host)
            goto done;
        }
        if (chain_len > FS_STATE_HCB_MAX_LIST_LEN) {
-           ViceLog(0, ("cb_stateVerifyFCBList: error: list length exceeds %d (h->index=%d); assuming there's a loop\n",
+           ViceLog(0, ("cb_stateVerifyHCBList: error: list length exceeds %d (h->index=%d); assuming there's a loop\n",
                        FS_STATE_HCB_MAX_LIST_LEN, hi));
            ret = 1;
            goto done;
@@ -2563,7 +2563,7 @@ cb_stateDiskEntryToFE(struct fs_dump_state * state,
 
     /* setup FE map entry */
     if (!in->index || (in->index >= state->fe_map.len)) {
-       ViceLog(0, ("cb_stateDiskEntryToFE: index (%d) out of range",
+       ViceLog(0, ("cb_stateDiskEntryToFE: index (%d) out of range\n",
                    in->index));
        ret = 1;
        goto done;