head	1.18;
access;
symbols
	RELENG_8_4:1.16.0.2
	RELENG_9_1_0_RELEASE:1.13.2.3.2.2
	RELENG_9_1:1.13.2.3.0.2
	RELENG_9_1_BP:1.13.2.3
	RELENG_8_3_0_RELEASE:1.3.2.9.2.1
	RELENG_8_3:1.3.2.9.0.2
	RELENG_8_3_BP:1.3.2.9
	RELENG_9_0_0_RELEASE:1.13.2.1.2.1
	RELENG_9_0:1.13.2.1.0.2
	RELENG_9_0_BP:1.13.2.1
	RELENG_9:1.13.0.2
	RELENG_9_BP:1.13
	RELENG_8_2_0_RELEASE:1.3.2.5.2.1
	RELENG_8_2:1.3.2.5.0.2
	RELENG_8_2_BP:1.3.2.5
	RELENG_8_1_0_RELEASE:1.3.2.4.2.1
	RELENG_8_1:1.3.2.4.0.2
	RELENG_8_1_BP:1.3.2.4
	RELENG_8:1.3.0.2;
locks; strict;
comment	@# @;


1.18
date	2013.05.12.00.26.22;	author svnexp;	state Exp;
branches;
next	1.17;

1.17
date	2013.04.20.00.35.20;	author svnexp;	state Exp;
branches;
next	1.16;

1.16
date	2012.11.17.01.50.21;	author svnexp;	state Exp;
branches
	1.16.2.1;
next	1.15;

1.15
date	2011.12.19.15.46.15;	author dim;	state Exp;
branches;
next	1.14;

1.14
date	2011.12.18.20.41.58;	author pjd;	state Exp;
branches;
next	1.13;

1.13
date	2011.06.27.09.15.41;	author pjd;	state Exp;
branches
	1.13.2.1;
next	1.12;

1.12
date	2011.05.20.11.09.02;	author pjd;	state Exp;
branches;
next	1.11;

1.11
date	2011.05.20.11.06.17;	author pjd;	state Exp;
branches;
next	1.10;

1.10
date	2011.03.22.16.21.11;	author pjd;	state Exp;
branches;
next	1.9;

1.9
date	2011.03.07.10.38.18;	author pjd;	state Exp;
branches;
next	1.8;

1.8
date	2011.03.06.23.09.33;	author pjd;	state Exp;
branches;
next	1.7;

1.7
date	2011.03.06.22.56.14;	author pjd;	state Exp;
branches;
next	1.6;

1.6
date	2010.11.22.14.16.22;	author brucec;	state Exp;
branches;
next	1.5;

1.5
date	2010.08.30.23.26.10;	author pjd;	state Exp;
branches;
next	1.4;

1.4
date	2010.04.22.19.18.10;	author pjd;	state Exp;
branches;
next	1.3;

1.3
date	2010.03.02.18.44.08;	author uqs;	state Exp;
branches
	1.3.2.1;
next	1.2;

1.2
date	2010.02.26.09.41.16;	author ru;	state Exp;
branches;
next	1.1;

1.1
date	2010.02.18.23.16.19;	author pjd;	state Exp;
branches;
next	;

1.16.2.1
date	2012.11.17.01.50.21;	author svnexp;	state dead;
branches;
next	1.16.2.2;

1.16.2.2
date	2013.03.28.13.03.33;	author svnexp;	state Exp;
branches;
next	;

1.13.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.13.2.1.2.1;
next	1.13.2.2;

1.13.2.2
date	2012.01.01.19.19.48;	author dim;	state Exp;
branches;
next	1.13.2.3;

1.13.2.3
date	2012.01.04.17.22.10;	author trociny;	state Exp;
branches
	1.13.2.3.2.1;
next	1.13.2.4;

1.13.2.4
date	2012.11.17.11.36.31;	author svnexp;	state Exp;
branches;
next	1.13.2.5;

1.13.2.5
date	2013.05.26.19.02.32;	author svnexp;	state Exp;
branches;
next	;

1.13.2.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.13.2.1.2.2;

1.13.2.1.2.2
date	2012.11.17.08.36.31;	author svnexp;	state Exp;
branches;
next	;

1.13.2.3.2.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.13.2.3.2.2;

1.13.2.3.2.2
date	2012.11.17.08.47.21;	author svnexp;	state Exp;
branches;
next	;

1.3.2.1
date	2010.04.18.21.14.49;	author pjd;	state dead;
branches;
next	1.3.2.2;

1.3.2.2
date	2010.04.18.21.14.49;	author pjd;	state Exp;
branches;
next	1.3.2.3;

1.3.2.3
date	2010.04.19.14.23.15;	author pjd;	state Exp;
branches;
next	1.3.2.4;

1.3.2.4
date	2010.05.01.19.16.08;	author pjd;	state Exp;
branches
	1.3.2.4.2.1;
next	1.3.2.5;

1.3.2.5
date	2010.09.23.09.02.10;	author pjd;	state Exp;
branches
	1.3.2.5.2.1;
next	1.3.2.6;

1.3.2.6
date	2011.01.12.14.13.50;	author pjd;	state Exp;
branches;
next	1.3.2.7;

1.3.2.7
date	2011.03.29.20.58.25;	author trociny;	state Exp;
branches;
next	1.3.2.8;

1.3.2.8
date	2011.06.27.20.04.13;	author trociny;	state Exp;
branches;
next	1.3.2.9;

1.3.2.9
date	2012.01.04.17.25.41;	author trociny;	state Exp;
branches
	1.3.2.9.2.1;
next	1.3.2.10;

1.3.2.10
date	2012.11.17.10.36.15;	author svnexp;	state Exp;
branches;
next	1.3.2.11;

1.3.2.11
date	2013.05.26.19.21.41;	author svnexp;	state Exp;
branches;
next	;

1.3.2.4.2.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.3.2.5.2.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.3.2.9.2.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.3.2.9.2.2;

1.3.2.9.2.2
date	2012.11.17.08.24.56;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.18
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/250503
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@# $FreeBSD: head/sbin/hastd/Makefile 250503 2013-05-11 09:51:44Z trociny $

.include <bsd.own.mk>

PROG=	hastd
SRCS=	activemap.c
SRCS+=	control.c crc32.c
SRCS+=	ebuf.c event.c
SRCS+=	hast_checksum.c hast_compression.c hast_proto.c hastd.c hooks.c
SRCS+=	lzf.c
SRCS+=	metadata.c
SRCS+=	nv.c
SRCS+=	secondary.c
SRCS+=	parse.y pjdlog.c primary.c
SRCS+=	proto.c proto_common.c proto_socketpair.c proto_tcp.c proto_uds.c
SRCS+=	rangelock.c
SRCS+=	subr.c
SRCS+=	token.l
SRCS+=	y.tab.h
MAN=	hastd.8 hast.conf.5

NO_WFORMAT=
NO_WCAST_ALIGN=
NO_WMISSING_VARIABLE_DECLARATIONS=
CFLAGS+=-I${.CURDIR}
CFLAGS+=-DHAVE_CAPSICUM
CFLAGS+=-DPROTO_TCP_DEFAULT_PORT=8457
CFLAGS+=-DINET
.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+=-DINET6
.endif

DPADD=	${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} ${LIBPTHREAD} ${LIBUTIL}
LDADD=	-lgeom -lbsdxml -lsbuf -lpthread -lutil
.if ${MK_OPENSSL} != "no"
DPADD+=	${LIBCRYPTO}
LDADD+=	-lcrypto
CFLAGS+=-DHAVE_CRYPTO
.endif

YFLAGS+=-v

CLEANFILES=y.tab.c y.tab.h y.output

.include <bsd.prog.mk>
@


1.17
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/249657
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
# $FreeBSD: head/sbin/hastd/Makefile 249657 2013-04-19 19:45:00Z ed $
d34 1
a34 1
LDADD=	-lgeom -lbsdxml -lsbuf -ll -lpthread -lutil
@


1.16
log
@Switching exporter and resync
@
text
@d1 1
a1 1
# $FreeBSD: head/sbin/hastd/Makefile 228712 2011-12-19 15:46:15Z dim $
d24 1
@


1.16.2.1
log
@file Makefile was added on branch RELENG_8_4 on 2013-03-28 13:03:33 +0000
@
text
@d1 44
@


1.16.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 43
# $FreeBSD: releng/8.4/sbin/hastd/Makefile 229510 2012-01-04 17:25:41Z trociny $

.include <bsd.own.mk>

PROG=	hastd
SRCS=	activemap.c
SRCS+=	control.c crc32.c
SRCS+=	ebuf.c event.c
SRCS+=	hast_checksum.c hast_compression.c hast_proto.c hastd.c hooks.c
SRCS+=	lzf.c
SRCS+=	metadata.c
SRCS+=	nv.c
SRCS+=	secondary.c
SRCS+=	parse.y pjdlog.c primary.c
SRCS+=	proto.c proto_common.c proto_socketpair.c proto_tcp.c proto_uds.c
SRCS+=	rangelock.c
SRCS+=	subr.c
SRCS+=	token.l
SRCS+=	y.tab.h
WARNS?=	6
MAN=	hastd.8 hast.conf.5

NO_WFORMAT=
CFLAGS+=-DPROTO_TCP_DEFAULT_PORT=8457
CFLAGS+=-I${.CURDIR}
CFLAGS+=-DINET
.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+=-DINET6
.endif

DPADD=	${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} ${LIBPTHREAD} ${LIBUTIL}
LDADD=	-lgeom -lbsdxml -lsbuf -ll -lpthread -lutil
.if ${MK_OPENSSL} != "no"
DPADD+=	${LIBCRYPTO}
LDADD+=	-lcrypto
CFLAGS+=-DHAVE_CRYPTO
.endif

YFLAGS+=-v

CLEANFILES=y.tab.c y.tab.h y.output

.include <bsd.prog.mk>
@


1.15
log
@SVN rev 228712 on 2011-12-19 15:46:15Z by dim

Use NO_WCAST_ALIGN for usr.bin/hastctl and usr.bin/hastd; the alignment
warnings in sbin/hastd/lzf.c are only emitted for i386 and amd64, and
there they can be safely ignored.

MFC after:	1 week
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.14
log
@SVN rev 228696 on 2011-12-18 20:41:58Z by pjd

Use lex's standard way of not generating unused function.

Inspired by:	r228555
MFC after:	1 week
@
text
@d23 1
@


1.13
log
@SVN rev 223586 on 2011-06-27 09:15:41Z by pjd

Compile hastd and hastctl with capsicum support.

X-MFC after:	capsicum merge
@
text
@a29 3
# This is needed to have WARNS > 1.
CFLAGS+=-DYY_NO_UNPUT
CFLAGS+=-DYY_NO_INPUT
@


1.13.2.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.13.2.2
log
@SVN rev 229193 on 2012-01-01 19:19:48Z by dim

MFC r228712:

Use NO_WCAST_ALIGN for usr.bin/hastctl and usr.bin/hastd; the alignment
warnings in sbin/hastd/lzf.c are only emitted for i386 and amd64, and
there they can be safely ignored.
@
text
@a22 1
NO_WCAST_ALIGN=
@


1.13.2.3
log
@SVN rev 229509 on 2012-01-04 17:22:10Z by trociny

MFC r225773, r225781, r225782, r225783, r225784, 225785, r225786, r225787,
  r225830, r225831, r225832, r225835, r226461, r226462, r226463, r226842,
  r226851, r226852, r226854, r226855, r226856, r226857, r226859, r226861,
  r228542, r228542, r228543, r228544, r228695, r228696:

r225773 (pjd):

Ensure that pjdlog functions don't modify errno.

r225781 (pjd):

No need to use KEEP_ERRNO() macro around pjdlog functions, as they don't
modify errno.

r225782 (pjd):

Prefer PJDLOG_ASSERT() and PJDLOG_ABORT() over assert() and abort().
pjdlog versions will log problem to syslog when application is running in
background.

r225783 (pjd):

Correct two mistakes when converting asserts to PJDLOG_ASSERT()/PJDLOG_ABORT().

r225784 (pjd):

- Convert some impossible conditions into assertions.
- Add missing 'if' in comment.

r225785 (pjd):

Prefer PJDLOG_ASSERT()/PJDLOG_ABORT() over assert().

r225786 (pjd):

No need to wrap pjdlog functions around with KEEP_ERRNO() macro.

r225787 (pjd):

Use PJDLOG_ASSERT() and PJDLOG_ABORT() everywhere instead of assert().

r225830 (pjd):

After every activemap change flush disk's write cache, so that write
reordering won't make the actual write to be committed before marking
the coresponding extent as dirty.

It can be disabled in configuration file.

If BIO_FLUSH is not supported by the underlying file system we log a warning
and never send BIO_FLUSH again to that GEOM provider.

r225831 (pjd):

Break a bit earlier.

r225832 (pjd):

If the underlying provider doesn't support BIO_FLUSH, log it only once
and don't bother trying in the future.

r225835 (pjd):

Correct typo.

r226461 (pjd):

When path to the configuration file is relative, obtain full path,
so we can always find the file, even after daemonizing and changing
working directory to /.

r226462 (pjd):

Remove redundant space.

r226463 (pjd):

Allow to specify pidfile in HAST configuration file.

r226842 (pjd):

Correct comments.

r226851 (pjd):

Delay resuid generation until first connection to secondary, not until first
write. This way on first connection we will synchronize only the extents that
were modified during the lifetime of primary node, not entire GEOM provider.

r226852 (pjd):

Minor cleanups.

r226854 (pjd):

- Eliminate the need for hio_nv.
- Introduce hio_clear() function for clearing hio before returning it
  onto free queue.

r226855 (pjd):

Improve comment so it doesn't suggest race is possible, but that we handle
the race.

r226856 (pjd):

Reduce indentation.

r226857 (pjd):

Minor cleanups.

r226859 (pjd):

Implement 'async' mode for HAST.

r226861 (pjd):

Remove redundant space.

r228542 (pjd):

Remove redundant setting of the error variable.

Found by:       Clang Static Analyzer

r228543 (pjd):

Simplify code by changing functions types from int to avoid, as the functions
always return 0.

Found by:       Clang Static Analyzer

r228544 (pjd):

Remove redundant assignment.

Found by:       Clang Static Analyzer

r228695 (pjd):

Don't use function name as format string.

Detected by:    clang

r228696 (pjd):

Use lex's standard way of not generating unused function.

Inspired by:    r228555
@
text
@d31 3
@


1.13.2.4
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/sbin/hastd/Makefile 229509 2012-01-04 17:22:10Z trociny $
@


1.13.2.5
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/251004
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/sbin/hastd/Makefile 251004 2013-05-26 18:28:36Z trociny $
d33 1
a33 1
LDADD=	-lgeom -lbsdxml -lsbuf -lpthread -lutil
@


1.13.2.3.2.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.13.2.3.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.1/sbin/hastd/Makefile 229509 2012-01-04 17:22:10Z trociny $
@


1.13.2.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.13.2.1.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.0/sbin/hastd/Makefile 223586 2011-06-27 09:15:41Z pjd $
@


1.12
log
@SVN rev 222116 on 2011-05-20 11:09:02Z by pjd

Rename tcp4 to tcp in preparation for IPv6 support.

MFC after:	3 weeks
@
text
@d23 2
a25 1
CFLAGS+=-I${.CURDIR}
@


1.11
log
@SVN rev 222115 on 2011-05-20 11:06:17Z by pjd

Rename proto_tcp4.c to proto_tcp.c in preparation for IPv6 support.

MFC after:	2 weeks
@
text
@d23 1
a23 1
CFLAGS+=-DPROTO_TCP4_DEFAULT_PORT=8457
@


1.10
log
@SVN rev 219873 on 2011-03-22 16:21:11Z by pjd

The proto API is a general purpose API, so don't use 'hast' in structures or
function names. It can now be used outside of HAST.

MFC after:	1 week
@
text
@d15 1
a15 1
SRCS+=	proto.c proto_common.c proto_socketpair.c proto_tcp4.c proto_uds.c
@


1.9
log
@SVN rev 219370 on 2011-03-07 10:38:18Z by pjd

- Turn on printf extentions.
- Load support for %T for pritning time.
- Add support for %N for printing number in human readable form.
- Add support for %S for printing sockaddr structure (currently only AF_INET
  family is supported, as this is all we need in HAST).
- Disable gcc compile-time format checking as this will no longer work.

MFC after:	2 weeks
@
text
@d23 1
@


1.8
log
@SVN rev 219354 on 2011-03-06 23:09:33Z by pjd

Allow to compress on-the-wire data using two algorithms:
- HOLE - it simply turns all-zero blocks into few bytes header;
	it is extremely fast, so it is turned on by default;
	it is mostly intended to speed up initial synchronization
	where we expect many zeros;
- LZF - very fast algorithm by Marc Alexander Lehmann, which shows
	very decent compression ratio and has BSD license.

MFC after:	2 weeks
@
text
@d22 1
@


1.7
log
@SVN rev 219351 on 2011-03-06 22:56:14Z by pjd

Allow to checksum on-the-wire data using either CRC32 or SHA256.

MFC after:	2 weeks
@
text
@d9 2
a10 1
SRCS+=	hast_checksum.c hast_proto.c hastd.c hooks.c
@


1.6
log
@SVN rev 215676 on 2010-11-22 14:16:22Z by brucec

Don't generate input() since it's not used.
@
text
@d7 1
a7 1
SRCS+=	control.c
d9 1
a9 1
SRCS+=	hast_proto.c hastd.c hooks.c
@


1.5
log
@SVN rev 212038 on 2010-08-30 23:26:10Z by pjd

Because it is very hard to make fork(2) from threaded process safe (we are
limited to async-signal safe functions in the child process), move all hooks
execution to the main (non-threaded) process.

Do it by maintaining connection (socketpair) between child and parent
and sending events from the child to parent, so it can execute the hook.

This is step in right direction for others reasons too. For example there is
one less problem to drop privs in worker processes.

MFC after:	2 weeks
Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com
@
text
@d28 1
@


1.4
log
@SVN rev 207070 on 2010-04-22 19:18:10Z by pjd

Fix compilation with WITHOUT_CRYPT or WITHOUT_OPENSSL options.

Reported by:	Andrei V. Lavreniyuk <andy.lavr@@reactor-xg.kiev.ua>
MFC after:	3 days
@
text
@d8 1
a8 1
SRCS+=	ebuf.c
@


1.3
log
@SVN rev 204596 on 2010-03-02 18:44:08Z by uqs

Remove redundant WARNS?=6 overrides and inherit the WARNS setting from
the toplevel directory.

This does not change any WARNS level and survives a make universe.

Approved by:        ed (co-mentor)
@
text
@d29 7
a35 3
DPADD=	${LIBCRYPTO} ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} \
	${LIBPTHREAD} ${LIBUTIL}
LDADD=	-lcrypto -lgeom -lbsdxml -lsbuf -ll -lpthread -lutil
@


1.3.2.1
log
@file Makefile was added on branch RELENG_8 on 2010-04-18 21:19:33 +0000
@
text
@d1 37
@


1.3.2.2
log
@SVN rev 206810 on 2010-04-18 21:14:49Z by pjd

MFC r204076,r204077,r204083,r205279:

r204076:

Please welcome HAST - Highly Avalable Storage.

HAST allows to transparently store data on two physically separated machines
connected over the TCP/IP network. HAST works in Primary-Secondary
(Master-Backup, Master-Slave) configuration, which means that only one of the
cluster nodes can be active at any given time. Only Primary node is able to
handle I/O requests to HAST-managed devices. Currently HAST is limited to two
cluster nodes in total.

HAST operates on block level - it provides disk-like devices in /dev/hast/
directory for use by file systems and/or applications. Working on block level
makes it transparent for file systems and applications. There in no difference
between using HAST-provided device and raw disk, partition, etc. All of them
are just regular GEOM providers in FreeBSD.

For more information please consult hastd(8), hastctl(8) and hast.conf(5)
manual pages, as well as http://wiki.FreeBSD.org/HAST.

Sponsored by:	FreeBSD Foundation
Sponsored by:	OMCnet Internet Service GmbH
Sponsored by:	TransIP BV

r204077:

Remove some lines left over by accident.

r204083:

Add missing KEYWORD line.

Pointed out by:	dougb

r205279 sys:

Simplify loops.
@
text
@a0 37
# $FreeBSD$

.include <bsd.own.mk>

PROG=	hastd
SRCS=	activemap.c
SRCS+=	control.c
SRCS+=	ebuf.c
SRCS+=	hast_proto.c hastd.c hooks.c
SRCS+=	metadata.c
SRCS+=	nv.c
SRCS+=	secondary.c
SRCS+=	parse.y pjdlog.c primary.c
SRCS+=	proto.c proto_common.c proto_socketpair.c proto_tcp4.c proto_uds.c
SRCS+=	rangelock.c
SRCS+=	subr.c
SRCS+=	token.l
SRCS+=	y.tab.h
WARNS?=	6
MAN=	hastd.8 hast.conf.5

CFLAGS+=-I${.CURDIR}
CFLAGS+=-DINET
.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+=-DINET6
.endif
# This is needed to have WARNS > 1.
CFLAGS+=-DYY_NO_UNPUT

DPADD=	${LIBCRYPTO} ${LIBGEOM} ${LIBL} ${LIBPTHREAD} ${LIBUTIL}
LDADD=	-lcrypto -lgeom -ll -lpthread -lutil

YFLAGS+=-v

CLEANFILES=y.tab.c y.tab.h y.output

.include <bsd.prog.mk>
@


1.3.2.3
log
@SVN rev 206841 on 2010-04-19 14:23:15Z by pjd

MFC r204352:

Fixed static linkage.
@
text
@d30 2
a31 3
DPADD=	${LIBCRYPTO} ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} \
	${LIBPTHREAD} ${LIBUTIL}
LDADD=	-lcrypto -lgeom -lbsdxml -lsbuf -ll -lpthread -lutil
@


1.3.2.4
log
@SVN rev 207479 on 2010-05-01 19:16:08Z by pjd

MFC r207070,r207343,r207345,r207347,r207348,r207371,r207372,r207390:

r207070:

Fix compilation with WITHOUT_CRYPT or WITHOUT_OPENSSL options.

Reported by:	Andrei V. Lavreniyuk <andy.lavr@@reactor-xg.kiev.ua>

r207343:

Don't assume that "resource" property is in metadata.

Reported by:	Mikolaj Golub <to.my.trociny@@gmail.com>

r207345:

Use WEXITSTATUS() to obtain real exit code.

r207347:

Mark temporary issues as such.

r207348:

Restart worker thread only if the problem was temporary.
In case of persistent problem we don't want to loop forever.

r207371:

Fix a problem where hastd will stuck in recv(2) after sending request to
secondary, which died between send(2) and recv(2). Do it by adding timeout
to recv(2) for primary incoming and outgoing sockets and secondary outgoing
socket.

Reported by:	Mikolaj Golub <to.my.trociny@@gmail.com>
Tested by:	Mikolaj Golub <to.my.trociny@@gmail.com>

r207372:

- Check if the worker process was killed by signal and restart it.
- Improve logging.

Pointed out by:	Garrett Cooper <yanefbsd@@gmail.com>

r207390:

Default connection timeout is way too long. To make it shorter we have to
make socket non-blocking, connect() and if we get EINPROGRESS, we have to
wait using select(). Very complex, but I know no other way to define
connection timeout for a given socket.

Reported by:	hiroshi@@soupacific.com
@
text
@d30 3
a32 7
DPADD=	${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} ${LIBPTHREAD} ${LIBUTIL}
LDADD=	-lgeom -lbsdxml -lsbuf -ll -lpthread -lutil
.if ${MK_OPENSSL} != "no"
DPADD+=	${LIBCRYPTO}
LDADD+=	-lcrypto
CFLAGS+=-DHAVE_CRYPTO
.endif
@


1.3.2.5
log
@SVN rev 213049 on 2010-09-23 09:02:10Z by pjd

MFC r208028,r210368,r210702,r210869,r210870,r210872,r210873,r210875,r210876,
  r210879,r210880,r210881,r210882,r210883,r210886,r210892,r211397,r211407,
  r211452,r211875,r211876,r211877,r211878,r211879,r211880,r211881,r211882,
  r211883,r211884,r211885,r211886,r211887,r211895,r211896,r211897,r211898,
  r211899,r211975,r211976,r211977,r211978,r211979,r211981,r211982,r211983,
  r211984,r212033,r212034,r212036,r212037,r212038,r212046,r212049,r212051,
  r212052,r212899,r213003,r213004,r213006,r213007,r213008,r213009:

r208028:

mdoc: move remaining sections into consistent order

This pertains mostly to FILES, HISTORY, EXIT STATUS and AUTHORS sections.

Found by:	mdocml lint run
Reviewed by:	ru

r210368:

Actually, only the fullsync mode is implemented, not memsync mode.
Correct manual page.

r210702:

Spelling fixes.

r210869:

Add an argument to the proto_register() function which allows protocol to
declare it is the default and be placed at the end of the queue so it is
checked last.

r210870:

Now that TCP will be checked last we don't need any knowledge about other
protocols.

r210872:

Mark two more places that we won't reach.

r210873:

Keep $FreeBSD$ in __FBSDID() only for C files.

r210875:

Problem with assertion is that it logs on stderr. Add two macros:
PJDLOG_ASSERT() and PJDLOG_VERIFY() that will check the given condition
and log the problem where appropriate. The difference between those
two is that PJDLOG_VERIFY() always work and PJDLOG_ASSERT() can be
turned off by defining NDEBUG.

r210876:

Assert that various buffers we are large enough.

r210879:

- Use pjdlog_exitx() to log errors and exit instead of errx().
- Use 'unable to' (instead of 'cannot') consistently.

r210880:

Reset signal handlers after fork().

r210881:

Allow to use 'none' keywork as remote address in case second cluster node
is not setup yet.

r210882:

Make control_set_role() more public. We will need it soon.

r210883:

Prepare configuration parsing code to be called multiple times:
- Don't exit on errors if not requested.
- Don't keep configuration in global variable, but allocate memory for
  configuration.
- Call yyrestart() before yyparse() so that on error in configuration file
  we will start from the begining next time and not from the place we left of.

r210886:

Implement configuration reload on SIGHUP. This includes:
- Load added resources.
- Stop and forget removed resources.
- Update modified resources in least intrusive way, ie. don't touch
  /dev/hast/<name> unless path to local component or provider name were
  modified.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r210892:

Document 'none' value for remote.

Reviewed by:	dougb

r211397:

Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki while
translating these manual pages.  Minor corrections by me.

Submitted by:	Nobuyuki Koganemaru <n-kogane@@syd.odn.ne.jp>

r211407:

The 'size' variable is there to limit how many bytes we want to copy from
'addr'. It is very likely that size of 'addr' is larger than 'size', so checking
strlcpy() return value is bogus.

r211452:

For some setups sending data in 128kB chunks makes communication very slow. No
idea why. 32kB on the other hand seems to work properly everywhere.

Reported by:	Thomas Steen Rasmussen <thomas@@gibfest.dk>

r211875:

Make comment more readable.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211876:

Add mtx_owned() implementation.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211877:

Add QUEUE_INSERT() and QUEUE_TAKE() macros that simplify the code a bit.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211878:

We have sync_start() function to start synchronization, introduce sync_stop()
function to stop it.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211879:

Log that synchronization was interrupted in a proper place.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211880:

Don't increase number synchronized bytes in case of an error.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211881:

- Remove redundant and incorrect 'old' word from debug message.
- Log disconnects as warnings.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211882:

Implement keepalive mechanism inside HAST protocol so we can detect secondary
node failures quickly for HAST resources that are rarely modified.

Remove XXX from a comment now that the guard thread never sleeps infinitely.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211883:

Reduce indent where possible.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211884:

When logging to stdout/stderr don't close those descriptors after fork().

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211885:

- Run hooks in background - don't block waiting for them to finish.
- Keep all hooks we're running in a global list, so we can report when
  they finish and also report when they are running for too long.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211886:

Allow to execute specified program on various HAST events.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211887:

Document new 'exec' parameter.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211895:

Add hooks execution.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211896:

Check if no signals were delivered just before going to sleep.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211897:

Correct when we log interrupted synchronization.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211898:

When logging to stdout/stderr, flush after each log.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211899:

When SIGTERM or SIGINT is received, terminate worker processes.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211975:

Implement mtx_destroy() and rw_destroy().

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211976:

- Add hook_fini() which should be called after fork() from the main hastd
  process, once it start to use hooks.
- Add hook_check_one() in case the caller expects different child processes
  and once it can recognize it, it will pass pid and status to hook_check_one().

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211977:

Allow to run hooks from the main hastd process.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211978:

- Call hook on role change.
- Document new event.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211979:

Disconnect after logging errors.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211981:

- Move functionality responsible for checking one connection to separate
  function to make code more readable.
- Be sure not to reconnect too often in case of signal delivery, etc.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211982:

Use sigtimedwait(2) for signals handling in primary process.
This fixes various races and eliminates use of pthread* API in signal handler.

Pointed out by:	kib
With help from:	jilles
Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211983:

Execute hook when split-brain is detected.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r211984:

Execute hook when connection between the nodes is established or lost.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r212033:

Constify arguments we can constify.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r212034:

Use pjdlog_exit() before fork().

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r212036:

When someone gives NULL as data, assume this is because he want to declare
connection side only.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r212037:

We only want to know if descriptors are ready for reading.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r212038:

Because it is very hard to make fork(2) from threaded process safe (we are
limited to async-signal safe functions in the child process), move all hooks
execution to the main (non-threaded) process.

Do it by maintaining connection (socketpair) between child and parent
and sending events from the child to parent, so it can execute the hook.

This is step in right direction for others reasons too. For example there is
one less problem to drop privs in worker processes.

Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r212046:

Mask only those signals that we want to handle.

Suggested by:	jilles
Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r212049:

Forgot to add event.c and event.h in r212038.

Pointed out by:	pluknet <pluknet@@gmail.com>
Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r212051:

Correct error message.

Submitted by:	Mikolaj Golub <to.my.trociny@@gmail.com>

r212052:

Include process PID in log messages.

Submitted by:	Mikolaj Golub <to.my.trociny@@gmail.com>

r212899:

Add __dead2 to functions that we know they are going to exit.

r213003:

Sort includes.

r213004:

If we are unable to receive control message is most likely because the main
process died. Instead of entering infinite loop, terminate.

r213006:

Fix descriptor leaks: when child exits, we have to close control and event
socket pairs. We did that only in one case out of three.

r213007:

Fix possible deadlock where worker process sends an event to the main process
while the main process sends control message to the worker process, but worker
process hasn't started control thread yet, because it waits for reply from the
main process.

The fix is to start the control thread before sending any events.

Reported and fix suggested by:	Mikolaj Golub <to.my.trociny@@gmail.com>

r213008:

Assert that descriptor numbers are sane.

r213009:

Switch to sigprocmask(2) API also in the main process and secondary process.
This way the primary process inherits signal mask from the main process,
which fixes a race where signal is delivered to the primary process before
configuring signal mask.

Reported by:	Mikolaj Golub <to.my.trociny@@gmail.com>
@
text
@d8 1
a8 1
SRCS+=	ebuf.c event.c
@


1.3.2.6
log
@SVN rev 217306 on 2011-01-12 14:13:50Z by pjd

svn merge -c215331,215332,215676 svn+ssh://svn.freebsd.org/base/head/sbin/hastd sbin/hastd

MFC r215331,r215332,r215676:

r215676 (by brucec):

Don't generate input() since it's not used.

r215332:

Move timeout.tv_sec initialization outside the loop - sigtimedwait(2) won't
modify it.

Submitted by:	Mikolaj Golub <to.my.trociny@@gmail.com>

r215331:

1. Exit when we cannot create incoming connection.
2. Improve logging to inform which connection can't be created.

Submitted by:	[1] Mikolaj Golub <to.my.trociny@@gmail.com>
@
text
@a28 1
CFLAGS+=-DYY_NO_INPUT
@


1.3.2.7
log
@SVN rev 220151 on 2011-03-29 20:58:25Z by trociny

MFC r219351, r219354, r219369, r219370, r219371, r219372, r219373,
  r219385, r219482, r219620, r219669, r219721, r219813, r219814,
  r219815, r219816, r219817, r219818, r219821, r219830, r219831,
  r219832, r219833, r219837, r219844, r219864, r219873, r219879,
  r219882, r219884, r219887, r219900:

r219351 (pjd):

Allow to checksum on-the-wire data using either CRC32 or SHA256.

r219354 (pjd):

Allow to compress on-the-wire data using two algorithms:
- HOLE - it simply turns all-zero blocks into few bytes header;
        it is extremely fast, so it is turned on by default;
        it is mostly intended to speed up initial synchronization
        where we expect many zeros;
- LZF - very fast algorithm by Marc Alexander Lehmann, which shows
        very decent compression ratio and has BSD license.

r219369 (pjd):

Provides three states for pjdlog_initialized, so we can also tell that
this is fist initialization ever.

r219370 (pjd), r219385 (pjd):

- Turn on printf extentions.
- Load support for %T for pritning time.
- Add support for %N for printing number in human readable form.
- Add support for %S for printing sockaddr structure (currently only AF_INET
  family is supported, as this is all we need in HAST).
- Disable gcc compile-time format checking as this will no longer work.

r219371 (pjd):

Use %S to print IP address and port number.

r219372 (pjd):

- Log size of data to synchronize in human readable form (using %N).
- Log synchronization time (using %T).
- Log synchronization speed in human readable form (using %N).

r219373 (pjd):

Print some of the numbers in human readable form (using %N).

r219482:

Make workers inherit debug level from the main process.

r219620 (pjd):

In command line options allow size to be specified using k/M/G/T
suffixes.

r219669 (pjd):

Remove #include needed for debugging.

r219721:

For secondary, set 2 * HAST_KEEPALIVE seconds timeout for incoming
connection so the worker will exit if it does not receive packets from
the primary during this interval.

Reported by:    Christian Vogt <Christian.Vogt@@haw-hamburg.de>
Tested by:      Christian Vogt <Christian.Vogt@@haw-hamburg.de>

r219813 (pjd):

If there is any traffic on one of out descriptors, we were not checking for
long running hooks. Fix it by not using select(2) timeout to decide if we want
to check hooks or not.

r219814 (pjd):

When creating connection on behalf of primary worker, set pjdlog prefix
to resource name and role, so that any logs related to that can be identified
properly.

r219815 (pjd):

Add snprlcat() and vsnprlcat() - the functions I'm always missing.
They work as a combination of snprintf(3) and strlcat(3) - the caller
can append a string build based on the given format.

r219816 (pjd):

Use snprlcat() instead of two strlcat(3)s.

r219817 (pjd):

Log when we start hooks checking and when we execute a hook.

r219818 (pjd), r219821 (pjd):

In hast.conf we define the other node's address in 'remote' variable.
This way we know how to connect to secondary node when we are primary.
The same variable is used by the secondary node - it only accepts
connections from the address stored in 'remote' variable.
In cluster configurations it is common that each node has its individual
IP address and there is one addtional shared IP address which is assigned
to primary node. It seems it is possible that if the shared IP address is
from the same network as the individual IP address it might be choosen by
the kernel as a source address for connection with the secondary node.
Such connection will be rejected by secondary, as it doesn't come from
primary node individual IP.

Add 'source' variable that allows to specify source IP address we want to
bind to before connecting to the secondary node.

r219821 (pjd):

Forgot to commit this as a part of r219818.

r219830 (pjd):

Detect situation where resource internal identifier differs.
This means that both nodes have separately managed resources that don't
have the same data.

r219831 (pjd):

Be pedantic and free nvout before exiting.

r219832 (pjd):

Increase debug level of "Checking hooks." message.

r219833 (pjd):

Remove stale comment. Yes, it is valid to set role back to init.

r219837 (pjd):

Before handling any events on descriptors check signals so we can update
our info about worker processes if any of them was terminated in the meantime.

This fixes the problem with 'hastctl status' running from a hook called on
split-brain:
1. Secondary calls a hooks and terminates.
2. Hook asks for resource status via 'hastctl status'.
3. The main hastd handles the status request by sending it to the secondary
   worker who is already dead, but because signals weren't checked yet he
   doesn't know that and we get EPIPE.

r219843 (pjd):

Fix typo.

r219844 (pjd):

Initialize localcnt on first write. This fixes assertion when we create
resource, set role to primary, do no writes, then sent it to secondary
and accept connection from primary.

r219864 (pjd):

White space cleanups.

r219873 (pjd), r219873 (pjd):

The proto API is a general purpose API, so don't use 'hast' in structures or
function names. It can now be used outside of HAST.

r219879:

For requests that are sent only to remote component use the
error from remote.

r219882:

After synchronization is complete we should make primary counters be
equal to secondary counters:

  primary_localcnt = secondary_remotecnt
  primary_remotecnt = secondary_localcnt

Previously it was done wrong and split-brain was observed after
primary had synchronized up-to-date data from secondary.

r219887 (pjd):

Add pjd copyright.

r219900 (pjd):

Don't create socketpair for connection forwarding between parent and secondary.
Secondary doesn't need to connect anywhere.

Approved by:	pjd (mentor)
@
text
@d7 1
a7 1
SRCS+=	control.c crc32.c
d9 1
a9 2
SRCS+=	hast_checksum.c hast_compression.c hast_proto.c hastd.c hooks.c
SRCS+=	lzf.c
a21 2
NO_WFORMAT=
CFLAGS+=-DPROTO_TCP4_DEFAULT_PORT=8457
@


1.3.2.8
log
@SVN rev 223603 on 2011-06-27 20:04:13Z by trociny

MFC r222087, r222108, r222115, r222116, r222117, r222118, r222119,
  r222120, r222121:

r222087 (pjd):

- Add support for AF_INET6 sockets for %S format character.
- Use inet_ntop(3) instead of reimplementing it.
- Use %hhu for unsigned char instead of casting it to unsigned int and
  using %u.

r222108 (pjd):

In preparation for IPv6 support allow to specify multiple addresses to
listen on.

r222115 (pjd):

Rename proto_tcp4.c to proto_tcp.c in preparation for IPv6 support.

r222116 (pjd):

Rename tcp4 to tcp in preparation for IPv6 support.

r222117 (pjd):

Allow [ ] characters in strings. They might be used in IPv6 addresses.

r222118 (pjd):

Now that hell is fully frozen it is good time to add IPv6 support to HAST.

r222119 (pjd):

Rename ipv4/ipv6 to tcp4/tcp6.

r222120 (pjd):

If no listen address is specified, bind by default to:

        tcp4://0.0.0.0:8457
        tcp6://[::]:8457

r222121 (pjd):

Document IPv6 support.

Approved by:	pjd (mentor)
@
text
@d15 1
a15 1
SRCS+=	proto.c proto_common.c proto_socketpair.c proto_tcp.c proto_uds.c
d24 1
a24 1
CFLAGS+=-DPROTO_TCP_DEFAULT_PORT=8457
@


1.3.2.9
log
@SVN rev 229510 on 2012-01-04 17:25:41Z by trociny

MFC r219843, r225773, r225781, r225782, r225783, r225784, 225785, r225786,
  r225787, r225830, r225831, r225832, r225835, r226461, r226462, r226463,
  r226842, r226851, r226852, r226854, r226855, r226856, r226857, r226859,
  r226861, r228542, r228542, r228543, r228544, r228695, r228696:

r219843 (pjd):

Fix typo.

r225773 (pjd):

Ensure that pjdlog functions don't modify errno.

r225781 (pjd):

No need to use KEEP_ERRNO() macro around pjdlog functions, as they don't
modify errno.

r225782 (pjd):

Prefer PJDLOG_ASSERT() and PJDLOG_ABORT() over assert() and abort().
pjdlog versions will log problem to syslog when application is running in
background.

r225783 (pjd):

Correct two mistakes when converting asserts to PJDLOG_ASSERT()/PJDLOG_ABORT().

r225784 (pjd):

- Convert some impossible conditions into assertions.
- Add missing 'if' in comment.

r225785 (pjd):

Prefer PJDLOG_ASSERT()/PJDLOG_ABORT() over assert().

r225786 (pjd):

No need to wrap pjdlog functions around with KEEP_ERRNO() macro.

r225787 (pjd):

Use PJDLOG_ASSERT() and PJDLOG_ABORT() everywhere instead of assert().

r225830 (pjd):

After every activemap change flush disk's write cache, so that write
reordering won't make the actual write to be committed before marking
the coresponding extent as dirty.

It can be disabled in configuration file.

If BIO_FLUSH is not supported by the underlying file system we log a warning
and never send BIO_FLUSH again to that GEOM provider.

r225831 (pjd):

Break a bit earlier.

r225832 (pjd):

If the underlying provider doesn't support BIO_FLUSH, log it only once
and don't bother trying in the future.

r225835 (pjd):

Correct typo.

r226461 (pjd):

When path to the configuration file is relative, obtain full path,
so we can always find the file, even after daemonizing and changing
working directory to /.

r226462 (pjd):

Remove redundant space.

r226463 (pjd):

Allow to specify pidfile in HAST configuration file.

r226842 (pjd):

Correct comments.

r226851 (pjd):

Delay resuid generation until first connection to secondary, not until first
write. This way on first connection we will synchronize only the extents that
were modified during the lifetime of primary node, not entire GEOM provider.

r226852 (pjd):

Minor cleanups.

r226854 (pjd):

- Eliminate the need for hio_nv.
- Introduce hio_clear() function for clearing hio before returning it
  onto free queue.

r226855 (pjd):

Improve comment so it doesn't suggest race is possible, but that we handle
the race.

r226856 (pjd):

Reduce indentation.

r226857 (pjd):

Minor cleanups.

r226859 (pjd):

Implement 'async' mode for HAST.

r226861 (pjd):

Remove redundant space.

r228542 (pjd):

Remove redundant setting of the error variable.

Found by:       Clang Static Analyzer

r228543 (pjd):

Simplify code by changing functions types from int to avoid, as the functions
always return 0.

Found by:       Clang Static Analyzer

r228544 (pjd):

Remove redundant assignment.

Found by:       Clang Static Analyzer

r228695 (pjd):

Don't use function name as format string.

Detected by:    clang

r228696 (pjd):

Use lex's standard way of not generating unused function.

Inspired by:    r228555
@
text
@d30 3
@


1.3.2.10
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/8/sbin/hastd/Makefile 229510 2012-01-04 17:25:41Z trociny $
@


1.3.2.11
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/251005
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
# $FreeBSD: stable/8/sbin/hastd/Makefile 251005 2013-05-26 18:30:07Z trociny $
d32 1
a32 1
LDADD=	-lgeom -lbsdxml -lsbuf -lpthread -lutil
@


1.3.2.9.2.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.3.2.9.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/8.3/sbin/hastd/Makefile 229510 2012-01-04 17:25:41Z trociny $
@


1.3.2.5.2.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.3.2.4.2.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.2
log
@SVN rev 204352 on 2010-02-26 09:41:16Z by ru

Fixed static linkage.
@
text
@a18 1
WARNS?=	6
@


1.1
log
@SVN rev 204076 on 2010-02-18 23:16:19Z by pjd

Please welcome HAST - Highly Avalable Storage.

HAST allows to transparently store data on two physically separated machines
connected over the TCP/IP network. HAST works in Primary-Secondary
(Master-Backup, Master-Slave) configuration, which means that only one of the
cluster nodes can be active at any given time. Only Primary node is able to
handle I/O requests to HAST-managed devices. Currently HAST is limited to two
cluster nodes in total.

HAST operates on block level - it provides disk-like devices in /dev/hast/
directory for use by file systems and/or applications. Working on block level
makes it transparent for file systems and applications. There in no difference
between using HAST-provided device and raw disk, partition, etc. All of them
are just regular GEOM providers in FreeBSD.

For more information please consult hastd(8), hastctl(8) and hast.conf(5)
manual pages, as well as http://wiki.FreeBSD.org/HAST.

Sponsored by:	FreeBSD Foundation
Sponsored by:	OMCnet Internet Service GmbH
Sponsored by:	TransIP BV
@
text
@d30 3
a32 2
DPADD=	${LIBCRYPTO} ${LIBGEOM} ${LIBL} ${LIBPTHREAD} ${LIBUTIL}
LDADD=	-lcrypto -lgeom -ll -lpthread -lutil
@

