svn commit: r240604 - in stable/9/sys/geom: mirror raid3
Gleb Smirnoff
glebius at FreeBSD.org
Mon Sep 17 13:06:48 UTC 2012
Author: glebius
Date: Mon Sep 17 13:06:47 2012
New Revision: 240604
URL: http://svn.freebsd.org/changeset/base/240604
Log:
Merge r240371:
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.
Submitted by: Konstantin Kukushkin <dark ramtel.ru>
Reviewed by: pjd
Modified:
stable/9/sys/geom/mirror/g_mirror.c
stable/9/sys/geom/raid3/g_raid3.c
Directory Properties:
stable/9/sys/ (props changed)
Modified: stable/9/sys/geom/mirror/g_mirror.c
==============================================================================
--- stable/9/sys/geom/mirror/g_mirror.c Mon Sep 17 13:05:39 2012 (r240603)
+++ stable/9/sys/geom/mirror/g_mirror.c Mon Sep 17 13:06:47 2012 (r240604)
@@ -3143,6 +3143,11 @@ g_mirror_dumpconf(struct sbuf *sb, const
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: stable/9/sys/geom/raid3/g_raid3.c
==============================================================================
--- stable/9/sys/geom/raid3/g_raid3.c Mon Sep 17 13:05:39 2012 (r240603)
+++ stable/9/sys/geom/raid3/g_raid3.c Mon Sep 17 13:06:47 2012 (r240604)
@@ -3447,6 +3447,11 @@ g_raid3_dumpconf(struct sbuf *sb, const
(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 svn-src-stable-9
mailing list