From eac22d3e46c72c0e2b82f35c5187d50b6fa136a2 Mon Sep 17 00:00:00 2001 From: Mark Vitale Date: Fri, 17 Mar 2017 18:12:23 -0400 Subject: [PATCH] ubik: urecovery_AbortAll diagnostic msgs As a troubleshooting aid for developers, add a few counters and a log msg so we know when transactions are being aborted (if any) by urecovery_AbortAll. Change-Id: I528df6d51acd5d10bb2de30f43b8d4415adc7f8a Reviewed-on: https://gerrit.openafs.org/12618 Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Michael Meffie --- src/ubik/recovery.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ubik/recovery.c b/src/ubik/recovery.c index b351c96629..b0644cd914 100644 --- a/src/ubik/recovery.c +++ b/src/ubik/recovery.c @@ -133,9 +133,17 @@ int urecovery_AbortAll(struct ubik_dbase *adbase) { struct ubik_trans *tt; + int reads = 0, writes = 0; + for (tt = adbase->activeTrans; tt; tt = tt->next) { + if (tt->type == UBIK_WRITETRANS) + writes++; + else + reads++; udisk_abort(tt); } + ViceLog(0, ("urecovery_AbortAll: just aborted %d read and %d write transactions\n", + reads, writes)); return 0; }