hast.h (235789) | hast.h (246922) |
---|---|
1/*- 2 * Copyright (c) 2009-2010 The FreeBSD Foundation 3 * Copyright (c) 2011 Pawel Jakub Dawidek <pawel@dawidek.net> 4 * All rights reserved. 5 * 6 * This software was developed by Pawel Jakub Dawidek under sponsorship from 7 * the FreeBSD Foundation. 8 * --- 13 unchanged lines hidden (view full) --- 22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 * | 1/*- 2 * Copyright (c) 2009-2010 The FreeBSD Foundation 3 * Copyright (c) 2011 Pawel Jakub Dawidek <pawel@dawidek.net> 4 * All rights reserved. 5 * 6 * This software was developed by Pawel Jakub Dawidek under sponsorship from 7 * the FreeBSD Foundation. 8 * --- 13 unchanged lines hidden (view full) --- 22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 * |
30 * $FreeBSD: head/sbin/hastd/hast.h 235789 2012-05-22 16:33:10Z bapt $ | 30 * $FreeBSD: head/sbin/hastd/hast.h 246922 2013-02-17 21:12:34Z pjd $ |
31 */ 32 33#ifndef _HAST_H_ 34#define _HAST_H_ 35 36#include <sys/queue.h> 37#include <sys/socket.h> 38 --- 9 unchanged lines hidden (view full) --- 48#include <activemap.h> 49 50#include "proto.h" 51 52/* 53 * Version history: 54 * 0 - initial version 55 * 1 - HIO_KEEPALIVE added | 31 */ 32 33#ifndef _HAST_H_ 34#define _HAST_H_ 35 36#include <sys/queue.h> 37#include <sys/socket.h> 38 --- 9 unchanged lines hidden (view full) --- 48#include <activemap.h> 49 50#include "proto.h" 51 52/* 53 * Version history: 54 * 0 - initial version 55 * 1 - HIO_KEEPALIVE added |
56 * 2 - "memsync" and "received" attributes added for memsync mode |
|
56 */ | 57 */ |
57#define HAST_PROTO_VERSION 1 | 58#define HAST_PROTO_VERSION 2 |
58 59#define EHAST_OK 0 60#define EHAST_NOENTRY 1 61#define EHAST_INVALID 2 62#define EHAST_NOMEMORY 3 63#define EHAST_UNIMPLEMENTED 4 64 65#define HASTCTL_CMD_UNKNOWN 0 --- 71 unchanged lines hidden (view full) --- 137#define HAST_CHECKSUM_SHA256 2 138 139/* 140 * Structure that describes single resource. 141 */ 142struct hast_resource { 143 /* Resource name. */ 144 char hr_name[NAME_MAX]; | 59 60#define EHAST_OK 0 61#define EHAST_NOENTRY 1 62#define EHAST_INVALID 2 63#define EHAST_NOMEMORY 3 64#define EHAST_UNIMPLEMENTED 4 65 66#define HASTCTL_CMD_UNKNOWN 0 --- 71 unchanged lines hidden (view full) --- 138#define HAST_CHECKSUM_SHA256 2 139 140/* 141 * Structure that describes single resource. 142 */ 143struct hast_resource { 144 /* Resource name. */ 145 char hr_name[NAME_MAX]; |
145 /* Replication mode (HAST_REPLICATION_*). */ | 146 /* Negotiated replication mode (HAST_REPLICATION_*). */ |
146 int hr_replication; | 147 int hr_replication; |
148 /* Configured replication mode (HAST_REPLICATION_*). */ 149 int hr_original_replication; |
|
147 /* Provider name that will appear in /dev/hast/. */ 148 char hr_provname[NAME_MAX]; 149 /* Synchronization extent size. */ 150 int hr_extentsize; 151 /* Maximum number of extents that are kept dirty. */ 152 int hr_keepdirty; 153 /* Path to a program to execute on various events. */ 154 char hr_exec[PATH_MAX]; 155 /* Compression algorithm. */ 156 int hr_compression; 157 /* Checksum algorithm. */ 158 int hr_checksum; | 150 /* Provider name that will appear in /dev/hast/. */ 151 char hr_provname[NAME_MAX]; 152 /* Synchronization extent size. */ 153 int hr_extentsize; 154 /* Maximum number of extents that are kept dirty. */ 155 int hr_keepdirty; 156 /* Path to a program to execute on various events. */ 157 char hr_exec[PATH_MAX]; 158 /* Compression algorithm. */ 159 int hr_compression; 160 /* Checksum algorithm. */ 161 int hr_checksum; |
162 /* Protocol version. */ 163 int hr_version; |
|
159 160 /* Path to local component. */ 161 char hr_localpath[PATH_MAX]; 162 /* Descriptor to access local component. */ 163 int hr_localfd; 164 /* Offset into local component. */ 165 off_t hr_localoff; 166 /* Size of usable space. */ --- 82 unchanged lines hidden --- | 164 165 /* Path to local component. */ 166 char hr_localpath[PATH_MAX]; 167 /* Descriptor to access local component. */ 168 int hr_localfd; 169 /* Offset into local component. */ 170 off_t hr_localoff; 171 /* Size of usable space. */ --- 82 unchanged lines hidden --- |