Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Apr 2011 19:13:10 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r220573 - head/sbin/hastd
Message-ID:  <201104121913.p3CJDAgs033116@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Tue Apr 12 19:13:10 2011
New Revision: 220573
URL: http://svn.freebsd.org/changeset/base/220573

Log:
  The replication mode that is currently support is fullsync, not memsync.
  Correct this and print a warning if different replication mode is
  configured.
  
  MFC after:	1 week

Modified:
  head/sbin/hastd/parse.y

Modified: head/sbin/hastd/parse.y
==============================================================================
--- head/sbin/hastd/parse.y	Tue Apr 12 17:02:40 2011	(r220572)
+++ head/sbin/hastd/parse.y	Tue Apr 12 19:13:10 2011	(r220573)
@@ -169,7 +169,7 @@ yy_config_parse(const char *config, bool
 	lineno = 0;
 
 	depth0_timeout = HAST_TIMEOUT;
-	depth0_replication = HAST_REPLICATION_MEMSYNC;
+	depth0_replication = HAST_REPLICATION_FULLSYNC;
 	depth0_checksum = HAST_CHECKSUM_NONE;
 	depth0_compression = HAST_COMPRESSION_HOLE;
 	strlcpy(depth0_control, HAST_CONTROL, sizeof(depth0_control));
@@ -228,6 +228,13 @@ yy_config_parse(const char *config, bool
 			 */
 			curres->hr_replication = depth0_replication;
 		}
+		if (curres->hr_replication == HAST_REPLICATION_MEMSYNC ||
+		    curres->hr_replication == HAST_REPLICATION_ASYNC) {
+			pjdlog_warning("Replication mode \"%s\" is not implemented, falling back to \"%s\".",
+			    curres->hr_replication == HAST_REPLICATION_MEMSYNC ?
+			    "memsync" : "async", "fullsync");
+			curres->hr_replication = HAST_REPLICATION_FULLSYNC;
+		}
 		if (curres->hr_checksum == -1) {
 			/*
 			 * Checksum is not set at resource-level.



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