From 08f9968437a18757aaacf119394e48c98a2f4c21 Mon Sep 17 00:00:00 2001 From: grog Date: Wed, 31 Mar 1999 08:44:20 +0000 Subject: vinum_resetstats: Reset stats for drives correctly when recursing. --- sbin/vinum/commands.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sbin/vinum/commands.c b/sbin/vinum/commands.c index c516b62..4ead132 100644 --- a/sbin/vinum/commands.c +++ b/sbin/vinum/commands.c @@ -719,8 +719,10 @@ reset_sd_stats(int sdno, int recurse) if (ioctl(superdev, VINUM_RESETSTATS, &msg) < 0) { fprintf(stderr, "Can't reset stats for subdisk %d: %s\n", sdno, reply->msg); longjmp(command_fail, -1); - } else if (recurse) - reset_drive_stats(sd.driveno); + } else if (recurse) { + get_sd_info(&sd, sdno); /* get the info */ + reset_drive_stats(sd.driveno); /* and clear the drive */ + } } void -- cgit v1.1