Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Sep 2012 20:20:13 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r240371 - in head/sys/geom: mirror raid3
Message-ID:  <201209112020.q8BKKDZB024939@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Tue Sep 11 20:20:13 2012
New Revision: 240371
URL: http://svn.freebsd.org/changeset/base/240371

Log:
    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:
  head/sys/geom/mirror/g_mirror.c
  head/sys/geom/raid3/g_raid3.c

Modified: head/sys/geom/mirror/g_mirror.c
==============================================================================
--- head/sys/geom/mirror/g_mirror.c	Tue Sep 11 19:25:59 2012	(r240370)
+++ head/sys/geom/mirror/g_mirror.c	Tue Sep 11 20:20:13 2012	(r240371)
@@ -3144,6 +3144,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: head/sys/geom/raid3/g_raid3.c
==============================================================================
--- head/sys/geom/raid3/g_raid3.c	Tue Sep 11 19:25:59 2012	(r240370)
+++ head/sys/geom/raid3/g_raid3.c	Tue Sep 11 20:20:13 2012	(r240371)
@@ -3448,6 +3448,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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209112020.q8BKKDZB024939>