diff options
author | pjd <pjd@FreeBSD.org> | 2011-04-12 19:13:10 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2011-04-12 19:13:10 +0000 |
commit | 8dd5170ed6669a28c48c7b913e1d0a969c66b6c6 (patch) | |
tree | 097ba394ebff10f646f0f6f7f8d7d53095a6fc63 /sbin | |
parent | 9f2652dbbc7b08fb7e12ddd0631c0ad892a0f808 (diff) | |
download | FreeBSD-src-8dd5170ed6669a28c48c7b913e1d0a969c66b6c6.zip FreeBSD-src-8dd5170ed6669a28c48c7b913e1d0a969c66b6c6.tar.gz |
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
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/hastd/parse.y | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sbin/hastd/parse.y b/sbin/hastd/parse.y index 3500fdf..3f34ff7 100644 --- a/sbin/hastd/parse.y +++ b/sbin/hastd/parse.y @@ -169,7 +169,7 @@ yy_config_parse(const char *config, bool exitonerror) 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 exitonerror) */ 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. |