[Midnightbsd-cvs] src [8077] trunk/sys/geom: When synchronizing, include in the config dump amount of
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Thu Sep 15 18:09:16 EDT 2016
Revision: 8077
http://svnweb.midnightbsd.org/src/?rev=8077
Author: laffer1
Date: 2016-09-15 18:09:15 -0400 (Thu, 15 Sep 2016)
Log Message:
-----------
When synchronizing, include in the config dump amount of
bytes syncronized.
The rationale behind this is the following: for large disks the
percent synchronisation counter ticks too seldom, and monitoring
software (as well as human operator) can't tell whether
synchronisation goes on or one of disks got stuck. On an idle
server one can look into gstat and see whether synchronisation goes
on or not, but on a busy server that won't work. Also, new value
monitored can be differentiated obtaining the synchronisation speed
quite precisely.
Obtained from: FreeBSD
Modified Paths:
--------------
trunk/sys/geom/mirror/g_mirror.c
trunk/sys/geom/raid3/g_raid3.c
Modified: trunk/sys/geom/mirror/g_mirror.c
===================================================================
--- trunk/sys/geom/mirror/g_mirror.c 2016-09-15 22:06:50 UTC (rev 8076)
+++ trunk/sys/geom/mirror/g_mirror.c 2016-09-15 22:09:15 UTC (rev 8077)
@@ -3143,6 +3143,11 @@
sc->sc_provider->mediasize));
}
sbuf_printf(sb, "</Synchronized>\n");
+ if (disk->d_sync.ds_offset > 0) {
+ sbuf_printf(sb, "%s<BytesSynced>%jd"
+ "</BytesSynced>\n", indent,
+ (intmax_t)disk->d_sync.ds_offset);
+ }
}
sbuf_printf(sb, "%s<SyncID>%u</SyncID>\n", indent,
disk->d_sync.ds_syncid);
Modified: trunk/sys/geom/raid3/g_raid3.c
===================================================================
--- trunk/sys/geom/raid3/g_raid3.c 2016-09-15 22:06:50 UTC (rev 8076)
+++ trunk/sys/geom/raid3/g_raid3.c 2016-09-15 22:09:15 UTC (rev 8077)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/geom/raid3/g_raid3.c,v 1.7 2012/10/06 18:52:49 laffer1 Exp $ */
+/* $MidnightBSD$ */
/*-
* Copyright (c) 2004-2006 Pawel Jakub Dawidek <pjd at FreeBSD.org>
* All rights reserved.
@@ -3448,6 +3448,11 @@
(sc->sc_mediasize / (sc->sc_ndisks - 1))));
}
sbuf_printf(sb, "</Synchronized>\n");
+ if (disk->d_sync.ds_offset > 0) {
+ sbuf_printf(sb, "%s<BytesSynced>%jd"
+ "</BytesSynced>\n", indent,
+ (intmax_t)disk->d_sync.ds_offset);
+ }
}
sbuf_printf(sb, "%s<SyncID>%u</SyncID>\n", indent,
disk->d_sync.ds_syncid);
More information about the Midnightbsd-cvs
mailing list