From 3ef0bca9ac4705f29d429af6ce2951ad1d39def1 Mon Sep 17 00:00:00 2001 From: Arne Wiebalck Date: Fri, 10 Jan 2014 17:29:11 +0100 Subject: [PATCH] Log shutdown progress Shutting down fileservers with thousands of volumes can take a while and it is helpful for operations to actually see that there is progress when detaching volumes. This patch adds a log message to the fileserver log every time 100 volumes have been detached. Change-Id: I1685aa62335b223cf7cd3286188781318084c22f Reviewed-on: http://gerrit.openafs.org/10797 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Derrick Brashear --- src/vol/volume.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vol/volume.c b/src/vol/volume.c index 7eb239db8..89a9314c9 100644 --- a/src/vol/volume.c +++ b/src/vol/volume.c @@ -1791,9 +1791,14 @@ ShutdownVByPForPass_r(struct DiskPartition64 * dp, int pass) { struct rx_queue * q = queue_First(&dp->vol_list, rx_queue); int i = 0; + const char *pass_strs[4] = {"{un/pre}attached vols", "vols w/ vol header loaded", "vols w/o vol header loaded", "vols with exclusive state"}; - while (ShutdownVolumeWalk_r(dp, pass, &q)) + while (ShutdownVolumeWalk_r(dp, pass, &q)) { i++; + if (0 == i%100) { + Log("VShutdownByPartition: ... shut down %d volumes on %s in pass %d (%s)\n", i, VPartitionPath(dp), pass, pass_strs[pass]); + } + } return i; } -- 2.39.5