From: Arne Wiebalck Date: Fri, 10 Jan 2014 16:29:11 +0000 (+0100) Subject: Log shutdown progress X-Git-Tag: upstream/1.8.0_pre1^2~802 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=3ef0bca9ac4705f29d429af6ce2951ad1d39def1;p=packages%2Fo%2Fopenafs.git 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 --- 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; }