summaryrefslogtreecommitdiffstats
path: root/sbin/hastd/hast.h
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2013-02-17 21:12:34 +0000
committerpjd <pjd@FreeBSD.org>2013-02-17 21:12:34 +0000
commit0bf19fd81213327b0ddfd5708b76528fbdb507af (patch)
tree583fbe402107b2dad647b0a09363284f8a367ac2 /sbin/hastd/hast.h
parente5238fcb15d4fbacf835cb112ac49dcb28ff894d (diff)
downloadFreeBSD-src-0bf19fd81213327b0ddfd5708b76528fbdb507af.zip
FreeBSD-src-0bf19fd81213327b0ddfd5708b76528fbdb507af.tar.gz
- Add support for 'memsync' mode. This is the fastest replication mode that's
why it will now be the default. - Bump protocol version to 2 and add backward compatibility for version 1. - Allow to specify hosts by kern.hostid as well (in addition to hostname and kern.hostuuid) in configuration file. Sponsored by: Panzura Tested by: trociny
Diffstat (limited to 'sbin/hastd/hast.h')
-rw-r--r--sbin/hastd/hast.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/sbin/hastd/hast.h b/sbin/hastd/hast.h
index 263e984..c7a6b49 100644
--- a/sbin/hastd/hast.h
+++ b/sbin/hastd/hast.h
@@ -53,8 +53,9 @@
* Version history:
* 0 - initial version
* 1 - HIO_KEEPALIVE added
+ * 2 - "memsync" and "received" attributes added for memsync mode
*/
-#define HAST_PROTO_VERSION 1
+#define HAST_PROTO_VERSION 2
#define EHAST_OK 0
#define EHAST_NOENTRY 1
@@ -142,8 +143,10 @@ struct hastd_config {
struct hast_resource {
/* Resource name. */
char hr_name[NAME_MAX];
- /* Replication mode (HAST_REPLICATION_*). */
+ /* Negotiated replication mode (HAST_REPLICATION_*). */
int hr_replication;
+ /* Configured replication mode (HAST_REPLICATION_*). */
+ int hr_original_replication;
/* Provider name that will appear in /dev/hast/. */
char hr_provname[NAME_MAX];
/* Synchronization extent size. */
@@ -156,6 +159,8 @@ struct hast_resource {
int hr_compression;
/* Checksum algorithm. */
int hr_checksum;
+ /* Protocol version. */
+ int hr_version;
/* Path to local component. */
char hr_localpath[PATH_MAX];
OpenPOWER on IntegriCloud