Deleted Added
full compact
hast.h (218218) hast.h (219351)
1/*-
2 * Copyright (c) 2009-2010 The FreeBSD Foundation
1/*-
2 * Copyright (c) 2009-2010 The FreeBSD Foundation
3 * Copyright (c) 2011 Pawel Jakub Dawidek <pawel@dawidek.net>
3 * All rights reserved.
4 *
5 * This software was developed by Pawel Jakub Dawidek under sponsorship from
6 * the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:

--- 10 unchanged lines hidden (view full) ---

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
4 * All rights reserved.
5 *
6 * This software was developed by Pawel Jakub Dawidek under sponsorship from
7 * the FreeBSD Foundation.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:

--- 10 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 *
29 * $FreeBSD: head/sbin/hastd/hast.h 218218 2011-02-03 11:39:49Z pjd $
30 * $FreeBSD: head/sbin/hastd/hast.h 219351 2011-03-06 22:56:14Z pjd $
30 */
31
32#ifndef _HAST_H_
33#define _HAST_H_
34
35#include <sys/queue.h>
36#include <sys/socket.h>
37

--- 73 unchanged lines hidden (view full) ---

111 /* List of resources. */
112 TAILQ_HEAD(, hast_resource) hc_resources;
113};
114
115#define HAST_REPLICATION_FULLSYNC 0
116#define HAST_REPLICATION_MEMSYNC 1
117#define HAST_REPLICATION_ASYNC 2
118
31 */
32
33#ifndef _HAST_H_
34#define _HAST_H_
35
36#include <sys/queue.h>
37#include <sys/socket.h>
38

--- 73 unchanged lines hidden (view full) ---

112 /* List of resources. */
113 TAILQ_HEAD(, hast_resource) hc_resources;
114};
115
116#define HAST_REPLICATION_FULLSYNC 0
117#define HAST_REPLICATION_MEMSYNC 1
118#define HAST_REPLICATION_ASYNC 2
119
120#define HAST_CHECKSUM_NONE 0
121#define HAST_CHECKSUM_CRC32 1
122#define HAST_CHECKSUM_SHA256 2
123
119/*
120 * Structure that describes single resource.
121 */
122struct hast_resource {
123 /* Resource name. */
124 char hr_name[NAME_MAX];
125 /* Replication mode (HAST_REPLICATION_*). */
126 int hr_replication;
127 /* Provider name that will appear in /dev/hast/. */
128 char hr_provname[NAME_MAX];
129 /* Synchronization extent size. */
130 int hr_extentsize;
131 /* Maximum number of extents that are kept dirty. */
132 int hr_keepdirty;
133 /* Path to a program to execute on various events. */
134 char hr_exec[PATH_MAX];
124/*
125 * Structure that describes single resource.
126 */
127struct hast_resource {
128 /* Resource name. */
129 char hr_name[NAME_MAX];
130 /* Replication mode (HAST_REPLICATION_*). */
131 int hr_replication;
132 /* Provider name that will appear in /dev/hast/. */
133 char hr_provname[NAME_MAX];
134 /* Synchronization extent size. */
135 int hr_extentsize;
136 /* Maximum number of extents that are kept dirty. */
137 int hr_keepdirty;
138 /* Path to a program to execute on various events. */
139 char hr_exec[PATH_MAX];
140 /* Checksum algorithm. */
141 int hr_checksum;
135
136 /* Path to local component. */
137 char hr_localpath[PATH_MAX];
138 /* Descriptor to access local component. */
139 int hr_localfd;
140 /* Offset into local component. */
141 off_t hr_localoff;
142 /* Size of usable space. */

--- 66 unchanged lines hidden ---
142
143 /* Path to local component. */
144 char hr_localpath[PATH_MAX];
145 /* Descriptor to access local component. */
146 int hr_localfd;
147 /* Offset into local component. */
148 off_t hr_localoff;
149 /* Size of usable space. */

--- 66 unchanged lines hidden ---