Commit Graph

377 Commits

Author SHA1 Message Date
Mikolaj Golub
31b81dd333 Fix comments.
Approved by:	re (marius)
MFC after:	3 days
2013-09-19 20:20:59 +00:00
Mikolaj Golub
a818a4ff09 When updating the map of dirty extents, most recently used extents are
kept dirty to reduce the number of on-disk metadata updates. The
sequence of operations is:

1) acquire the activemap lock;
2) update in-memory map;
3) if the list of keepdirty extents is changed, update on-disk metadata;
4) release the lock.

On-disk updates are not frequent in comparison with in-memory updates,
while require much more time. So situations are possible when one
thread is updating on-disk metadata and another one is waiting for the
activemap lock just to update the in-memory map.

Improve this by introducing additional, on-disk map lock: when
in-memory map is updated and it is detected that the on-disk map needs
update too, the on-disk map lock is acquired and the on-memory lock is
released before flushing the map.

Reported by:	Yamagi Burmeister yamagi.org
Tested by:	Yamagi Burmeister yamagi.org
Reviewed by:	pjd
Approved by:	re (marius)
MFC after:	2 weeks
2013-09-19 20:19:08 +00:00
Mikolaj Golub
1c1310eed7 Use cv_broadcast() instead of cv_signal() when waking up threads
waiting on an empty queue as the queue may have several consumers.

Before the fix the following scenario was possible: 2 threads are
waiting on empty queue, 2 threads are inserting simultaneously. The
first inserting thread detects that the queue is empty and is going to
send the signal, but before it sends the second thread inserts
too. When the first sends the signal only one of the waiting threads
receive it while the other one may wait forever.

The scenario above is is believed to be the cause of the observed
cases, when ggate_recv_thread() was getting stuck on taking free
request, while the free queue was not empty.

Reviewed by:	pjd
Tested by:	Yamagi Burmeister yamagi.org
Approved by:	re (marius)
MFC after:	2 weeks
2013-09-19 20:15:24 +00:00
Simon J. Gerraty
d1d0158641 Merge from head 2013-09-05 20:18:59 +00:00
Pawel Jakub Dawidek
7008be5bd7 Change the cap_rights_t type from uint64_t to a structure that we can extend
in the future in a backward compatible (API and ABI) way.

The cap_rights_t represents capability rights. We used to use one bit to
represent one right, but we are running out of spare bits. Currently the new
structure provides place for 114 rights (so 50 more than the previous
cap_rights_t), but it is possible to grow the structure to hold at least 285
rights, although we can make it even larger if 285 rights won't be enough.

The structure definition looks like this:

	struct cap_rights {
		uint64_t	cr_rights[CAP_RIGHTS_VERSION + 2];
	};

The initial CAP_RIGHTS_VERSION is 0.

The top two bits in the first element of the cr_rights[] array contain total
number of elements in the array - 2. This means if those two bits are equal to
0, we have 2 array elements.

The top two bits in all remaining array elements should be 0.
The next five bits in all array elements contain array index. Only one bit is
used and bit position in this five-bits range defines array index. This means
there can be at most five array elements in the future.

To define new right the CAPRIGHT() macro must be used. The macro takes two
arguments - an array index and a bit to set, eg.

	#define	CAP_PDKILL	CAPRIGHT(1, 0x0000000000000800ULL)

We still support aliases that combine few rights, but the rights have to belong
to the same array element, eg:

	#define	CAP_LOOKUP	CAPRIGHT(0, 0x0000000000000400ULL)
	#define	CAP_FCHMOD	CAPRIGHT(0, 0x0000000000002000ULL)

	#define	CAP_FCHMODAT	(CAP_FCHMOD | CAP_LOOKUP)

There is new API to manage the new cap_rights_t structure:

	cap_rights_t *cap_rights_init(cap_rights_t *rights, ...);
	void cap_rights_set(cap_rights_t *rights, ...);
	void cap_rights_clear(cap_rights_t *rights, ...);
	bool cap_rights_is_set(const cap_rights_t *rights, ...);

	bool cap_rights_is_valid(const cap_rights_t *rights);
	void cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src);
	void cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src);
	bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little);

Capability rights to the cap_rights_init(), cap_rights_set(),
cap_rights_clear() and cap_rights_is_set() functions are provided by
separating them with commas, eg:

	cap_rights_t rights;

	cap_rights_init(&rights, CAP_READ, CAP_WRITE, CAP_FSTAT);

There is no need to terminate the list of rights, as those functions are
actually macros that take care of the termination, eg:

	#define	cap_rights_set(rights, ...)				\
		__cap_rights_set((rights), __VA_ARGS__, 0ULL)
	void __cap_rights_set(cap_rights_t *rights, ...);

Thanks to using one bit as an array index we can assert in those functions that
there are no two rights belonging to different array elements provided
together. For example this is illegal and will be detected, because CAP_LOOKUP
belongs to element 0 and CAP_PDKILL to element 1:

	cap_rights_init(&rights, CAP_LOOKUP | CAP_PDKILL);

Providing several rights that belongs to the same array's element this way is
correct, but is not advised. It should only be used for aliases definition.

This commit also breaks compatibility with some existing Capsicum system calls,
but I see no other way to do that. This should be fine as Capsicum is still
experimental and this change is not going to 9.x.

Sponsored by:	The FreeBSD Foundation
2013-09-05 00:09:56 +00:00
Mikolaj Golub
14f200d97e Make hastctl(1) ('list' command) output a worker pid.
Reviewed by:	pjd
MFC after:	3 days
2013-07-01 18:41:07 +00:00
Jens Schweikhardt
1862d13b8a Correct some grammar. 2013-06-30 17:59:40 +00:00
Ed Schouten
f758648022 Don't let hastd use C11 atomics.
Due to possible concerns about the stability of C11 atomics, use our
existing atomics API instead.

Requested by:	pjd
2013-06-29 20:13:39 +00:00
Ed Schouten
87f02f6f89 Let hastd use C11 atomics.
C11 atomics now work on all the architectures. Have at least a single
piece of software in our base system that uses C11 atomics. This
somewhat makes it less likely that we break it because of LLVM imports,
etc.
2013-06-15 22:17:59 +00:00
Jung-uk Kim
eb8b73d6ae Improve compatibility with old flex and fix build with GCC. 2013-05-22 17:47:45 +00:00
Mikolaj Golub
1df892f44c Get rid of libl dependency. We needed it only to provide yywrap. But
yywrap is not necessary when parsing a single hast.conf file.

Suggested by:	kib
Reviewed by:	pjd
2013-05-11 09:51:44 +00:00
Ed Schouten
24084cdd91 Partially revert my last change.
I forgot that I still had a locally applied patch to my copy of Clang
that needs to be pushed in before we should use C11 atomics.
2013-04-27 05:06:25 +00:00
Ed Schouten
6e87c1514b Use C11 <stdatomic.h> instead of our non-standard <machine/atomic.h>.
Reviewed by:	pjd
2013-04-27 05:01:29 +00:00
Ed Schouten
7e659f9491 Add the Clang specific -Wmissing-variable-declarations to WARNS=6.
This compiler flag enforces that that people either mark variables
static or use an external declarations for the variable, similar to how
-Wmissing-prototypes works for functions.

Due to the fact that Yacc/Lex generate code that cannot trivially be
changed to not warn because of this (lots of yy* variables), add a
NO_WMISSING_VARIABLE_DECLARATIONS that can be used to turn off this
specific compiler warning.

Announced on:	toolchain@
2013-04-19 19:45:00 +00:00
Simon J. Gerraty
69e6d7b75e sync from head 2013-04-12 20:48:55 +00:00
Pawel Jakub Dawidek
51ea07d722 Now that ioctl(2) is allowed in capability mode and we can limit ioctls for the
given descriptors, use Capsicum sandboxing for hastd in primary and secondary
modes. Allow for DIOCGDELETE and DIOCGFLUSH ioctls on provider descriptor and
for G_GATE_CMD_MODIFY, G_GATE_CMD_START, G_GATE_CMD_DONE and G_GATE_CMD_DESTROY
on GEOM Gate descriptor.

Sponsored by:	The FreeBSD Foundation
2013-03-14 23:14:47 +00:00
Pawel Jakub Dawidek
9cb0633b1c Minor corrections. 2013-03-14 23:11:52 +00:00
Pawel Jakub Dawidek
9bb2b7f535 Delete requests can be larger than MAXPHYS. 2013-03-14 23:03:48 +00:00
Simon J. Gerraty
7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Mikolaj Golub
2adbba660d Add i/o error counters to hastd(8) and make hastctl(8) display
them.  This may be useful for detecting problems with HAST disks.

Discussed with and reviewed by:	pjd
MFC after:	1 week
2013-02-25 20:09:07 +00:00
Pawel Jakub Dawidek
d6e636c988 - 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
2013-02-17 21:12:34 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
David E. O'Brien
d9a447559b Sync with HEAD. 2013-02-08 16:10:16 +00:00
Kevin Lo
a5752d55e0 Fix socket calls on error post-r243965.
Submitted by:	Garrett Cooper
2012-12-21 15:54:13 +00:00
Pawel Jakub Dawidek
771a67330f Revert r228695. We use __func__ here as a format to distinguish between
abort and assert. It would be cleaner to use NULL or "" here, but gcc
complains in both cases.
2012-11-05 00:38:14 +00:00
Simon J. Gerraty
23090366f7 Sync from head 2012-11-04 02:52:03 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Mikolaj Golub
cfbd0d18bb Metaflush on/off values don't need quotes.
Reviewed by:	pjd
MFC after:	3 days
2012-07-16 20:43:28 +00:00
Pawel Jakub Dawidek
c66ee1b31e Make use of GEOM Gate direct reads feature. This allows HAST to serve
reads with native speed of the underlying provider.
There are three situations when direct reads are not used:
1. Data is being synchronized and synchronization source is the secondary
   node, which means secondary node has more recent data and we should read
   from it.
2. Local read failed and we have to try to read from the secondary node.
3. Local component is unavailable and all I/O requests are served from the
   secondary node.

Sponsored by:	Panzura, http://www.panzura.com
MFC after:	1 month
2012-07-04 20:20:48 +00:00
Pawel Jakub Dawidek
4c13f63cba Check if there is cmsg at all.
MFC after:	3 days
2012-07-01 16:26:07 +00:00
Hans Petter Selasky
4f2380c0cf Revert: r236909
Pointyhat: me
2012-06-11 20:27:52 +00:00
Hans Petter Selasky
9ae652f11f Use the correct clock source when computing timeouts.
MFC after:	1 week
2012-06-11 19:20:59 +00:00
Pawel Jakub Dawidek
4c71d26341 Simplify the code by using snprlcat().
MFC after:	3 days
2012-06-03 10:50:46 +00:00
Warren Block
344c81a166 Fixes to man8 groff mandoc style, usage mistakes, or typos.
PR:		168016
Submitted by:	Nobuyuki Koganemaru
Approved by:	gjb
MFC after:	3 days
2012-05-24 02:24:03 +00:00
Baptiste Daroussin
5e2a209a27 Fix world after byacc import:
- old yacc(1) use to magicially append stdlib.h, while new one don't
- new yacc(1) do declare yyparse by itself, fix redundant declaration of
  'yyparse'

Approved by:	des (mentor)
2012-05-22 16:33:10 +00:00
Glen Barber
7b1d17a1bc General mdoc(7) and typo fixes.
PR:		167804
Submitted by:	Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after:	3 days
2012-05-12 15:08:22 +00:00
Mikolaj Golub
7f995f6907 If hastd is invoked with "-P pidfile" option always create pidfile
regardless of whether -F (foreground) option is set or not.

Also, if -P option is specified, ignore pidfile setting from configuration
not only on start but on reload too. This fixes the issue when for hastd
run with -P option reload caused the pidfile change.

Reviewed by:	pjd
MFC after:	1 week
2012-03-29 20:11:16 +00:00
Mikolaj Golub
f9c5a09cfe Fix typo.
MFC after:	3 days
2012-03-23 20:18:48 +00:00
Pawel Jakub Dawidek
86b914642c Nice range comparison.
MFC after:	3 days
2012-02-11 16:41:52 +00:00
Mikolaj Golub
f737157838 If a local write request is from the synchronization thread, when it
is synchronizing data that is out of date on the local component, we
should not send G_GATE_CMD_DONE acknowledge to the kernel.

This fixes the issue, observed in async mode, when on synchronization
from the remote component the worker terminated with "G_GATE_CMD_DONE
failed" error.

Reported by:	Artem Kajalainen <artem kayalaynen ru>
Reviewed by:	pjd
MFC after:	1 week
2012-02-05 15:23:32 +00:00
Mikolaj Golub
2b2cb41812 Fix the regression introduced in r226859: if the local component is
out of date BIO_READ requests got lost instead of being sent to the
remote component.

Reviewed by:	pjd
MFC after:	1 week
2012-02-05 15:21:08 +00:00
Pawel Jakub Dawidek
e0a8ef9d47 Fix typo in comment.
MFC after:	3 days
2012-02-04 07:59:12 +00:00
Pawel Jakub Dawidek
f17b67e14b - Fix documentation to note that /etc/hast.conf is the default configuration
file for hastd(8) and hastctl(8) and not hast.conf.
- In copyright statement correct that this file is documentation, not software.
- Bump date.

MFC after:	3 days
2012-01-24 23:43:13 +00:00
Pawel Jakub Dawidek
4ed472a1cc Free memory that won't be used in child.
MFC after:	1 week
2012-01-22 11:20:42 +00:00
Pawel Jakub Dawidek
2ce9c023fd Fix minor memory leak.
MFC after:	3 days
2012-01-21 20:13:37 +00:00
Pawel Jakub Dawidek
ba1fa0f17e Remove another unused token.
MFC after:	3 days
2012-01-20 21:49:56 +00:00
Pawel Jakub Dawidek
77213228fd Remove unused token 'port'.
MFC after:	3 days
2012-01-20 21:45:24 +00:00
Pawel Jakub Dawidek
3ab1c5a619 Style cleanups.
MFC after:	3 days
2012-01-13 23:25:35 +00:00
Pawel Jakub Dawidek
4bbeefbb07 - Fix a bug where pidfile was removed in SIGHUP when it hasn't changed in
configuration file.
- Log the fact that pidfile has changed.

MFC after:	3 days
2012-01-10 22:41:09 +00:00
Pawel Jakub Dawidek
2b1b224d24 For functions that return -1 on failure check exactly for -1 and not for
any negative number.

MFC after:	3 days
2012-01-10 22:39:07 +00:00
Pawel Jakub Dawidek
45bd093cb0 Don't touch pidfiles when running in foreground. Before that change we
would create an empty pidfile on start and check if it changed on SIGHUP.

MFC after:	3 days
2012-01-10 22:24:57 +00:00
Ulrich Spörlein
4b85a12f71 Spelling fixes for sbin/ 2012-01-07 16:09:33 +00:00
Pawel Jakub Dawidek
dfb1aece41 fork(2) returns -1 on failure, not some random negative number.
MFC after:	3 days
2012-01-06 23:44:26 +00:00
Pawel Jakub Dawidek
f78fe2608a Constify argument.
MFC after:	3 days
2012-01-06 12:27:17 +00:00
Dimitry Andric
6130c10567 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
2011-12-19 15:46:15 +00:00
Pawel Jakub Dawidek
8a605b3f64 Use lex's standard way of not generating unused function.
Inspired by:	r228555
MFC after:	1 week
2011-12-18 20:41:58 +00:00
Pawel Jakub Dawidek
b6afd24f2b Don't use function name as format string.
Detected by:	clang
MFC after:	1 week
2011-12-18 20:40:19 +00:00
Pawel Jakub Dawidek
f59936d642 Remove redundant assignment.
Found by:	Clang Static Analyzer
MFC after:	1 week
2011-12-15 22:05:23 +00:00
Pawel Jakub Dawidek
8c63ee4ff7 Simplify code by changing functions types from int to avoid, as the functions
always return 0.

Found by:	Clang Static Analyzer
MFC after:	1 week
2011-12-15 22:03:17 +00:00
Pawel Jakub Dawidek
b720f4aad0 Remove redundant setting of the error variable.
Found by:	Clang Static Analyzer
MFC after:	1 week
2011-12-15 22:01:34 +00:00
Pawel Jakub Dawidek
0ebcf9e6cb Remove redundant space.
MFC after:	3 days
2011-10-27 20:36:35 +00:00
Pawel Jakub Dawidek
07ebc3626e Implement 'async' mode for HAST.
MFC after:	3 days
2011-10-27 20:32:57 +00:00
Pawel Jakub Dawidek
3f5bce1822 Minor cleanups.
MFC after:	3 days
2011-10-27 20:15:37 +00:00
Pawel Jakub Dawidek
43b8675beb Reduce indentation.
MFC after:	3 days
2011-10-27 20:13:39 +00:00
Pawel Jakub Dawidek
5a58d22a84 Improve comment so it doesn't suggest race is possible, but that we handle
the race.

MFC after:	3 days
2011-10-27 20:10:21 +00:00
Pawel Jakub Dawidek
949350bb1f - Eliminate the need for hio_nv.
- Introduce hio_clear() function for clearing hio before returning it
  onto free queue.

MFC after:	3 days
2011-10-27 20:01:23 +00:00
Pawel Jakub Dawidek
1212a85c4a Monor cleanups.
MFC after:	3 days
2011-10-27 18:49:16 +00:00
Pawel Jakub Dawidek
8a34134ac2 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.

MFC after:	3 days
2011-10-27 18:45:01 +00:00
Pawel Jakub Dawidek
982369192e Correct comments.
MFC after:	3 days
2011-10-27 16:22:17 +00:00
Pawel Jakub Dawidek
bd738d630c Allow to specify pidfile in HAST configuration file.
MFC after:	1 week
2011-10-17 12:22:09 +00:00
Pawel Jakub Dawidek
89da1a23cd Remove redundant space.
MFC after:	1 week
2011-10-17 09:59:04 +00:00
Pawel Jakub Dawidek
6fea20e297 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 /.

MFC after:	1 week
2011-10-17 09:54:07 +00:00
Pawel Jakub Dawidek
e3feec94eb Correct typo.
MFC after:	3 days
2011-09-28 13:25:27 +00:00
Pawel Jakub Dawidek
12daf727f6 If the underlying provider doesn't support BIO_FLUSH, log it only once
and don't bother trying in the future.

MFC after:	3 days
2011-09-28 13:19:47 +00:00
Pawel Jakub Dawidek
39852ce89e Break a bit earlier.
MFC after:	3 days
2011-09-28 13:13:43 +00:00
Pawel Jakub Dawidek
518dd4c0d9 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.

MFC after:	3 days
2011-09-28 13:08:51 +00:00
Pawel Jakub Dawidek
adf8002bac Use PJDLOG_ASSERT() and PJDLOG_ABORT() everywhere instead of assert().
MFC after:	3 days
2011-09-27 08:50:37 +00:00
Pawel Jakub Dawidek
be1143efb9 No need to wrap pjdlog functions around with KEEP_ERRNO() macro.
MFC after:	3 days
2011-09-27 08:26:09 +00:00
Pawel Jakub Dawidek
7f46e21d82 - Convert some impossible conditions into assertions.
- Add missing 'if' in comment.

MFC after:	3 days
2011-09-27 08:04:01 +00:00
Pawel Jakub Dawidek
09c2e8431a Correct two mistakes when converting asserts to PJDLOG_ASSERT()/PJDLOG_ABORT().
MFC after:	3 days
2011-09-27 07:59:10 +00:00
Pawel Jakub Dawidek
571fdd7e47 Prefer PJDLOG_ASSERT() and PJDLOG_ABORT() over assert() and abort().
pjdlog versions will log problem to syslog when application is running in
background.

MFC after:	3 days
2011-09-27 07:57:15 +00:00
Pawel Jakub Dawidek
1ebc0407fc No need to use KEEP_ERRNO() macro around pjdlog functions, as they don't
modify errno.

MFC after:	3 days
2011-09-27 07:52:39 +00:00
Pawel Jakub Dawidek
80c9ebc27e Ensure that pjdlog functions don't modify errno.
MFC after:	3 days
2011-09-27 06:43:51 +00:00
Mikolaj Golub
adca96f861 Fix indentation.
Approved by:	pjd (mentor)
2011-07-13 05:32:55 +00:00
Mikolaj Golub
0687d71e40 Remove useless initialization.
Approved by:	pjd (mentor)
MFC after:	3 days
2011-07-05 06:12:28 +00:00
Mikolaj Golub
d9f039e0b3 Check the returned value of activemap_write_complete() and update matadata on
disk if needed. This should fix a potential case when extents are cleared in
activemap but metadata is not updated on disk.

Suggested by:	pjd
Approved by:	pjd (mentor)
2011-06-28 21:01:32 +00:00
Mikolaj Golub
aa64b2f494 Make activemap_write_start/complete check the keepdirty list, when
stating if we need to update activemap on disk. This makes keepdirty
serve its purpose -- to reduce number of metadata updates.

Discussed with:	pjd
Approved by:	pjd (mentor)
2011-06-28 20:57:54 +00:00
Pawel Jakub Dawidek
a6de1e5c85 Compile hastd and hastctl with capsicum support.
X-MFC after:	capsicum merge
2011-06-27 09:15:41 +00:00
Pawel Jakub Dawidek
699b26bdce Compile capsicum support only if HAVE_CAPSICUM is defined.
MFC after:	3 days
2011-06-27 09:14:25 +00:00
Pawel Jakub Dawidek
133d75ed18 Log a warning if we cannot sandbox using capsicum, but only under debug level 1.
It would be too noisy to log it as a proper warning as CAPABILITIES are not
compiled into GENERIC by default.

MFC after:	3 days
2011-06-27 09:10:48 +00:00
Mikolaj Golub
ba2a822490 In HAST we use two sockets - one for only sending the data and one for
only receiving the data. In r220271 the unused directions were
disabled using shutdown(2).

Unfortunately, this broke automatic receive buffer sizing, which
currently works only for connections in ETASBLISHED state. It was a
root cause of the issue reported by users, when connection between
primary and secondary could get stuck.

Disable the code introduced in r220271 until the issue with automatic
buffer sizing is not resolved.

Reported by:	Daniel Kalchev <daniel@digsys.bg>, danger, sobomax
Tested by:	Daniel Kalchev <daniel@digsys.bg>, danger
Approved by:	pjd (mentor)
MFC after:	1 week
2011-06-17 07:07:26 +00:00
Maxim Sobolev
e0455434b4 Revert r222688.
Requested by:	Mikolaj Golub
2011-06-16 08:31:06 +00:00
Maxim Sobolev
98453c81af Read from the socket using the same max buffer size as we use while
sending. What happens otherwise is that the sender splits all the
traffic into 32k chunks, while the receiver is waiting for the whole
packet. Then for a certain packet sizes, particularly 66607 bytes in
my case, the communication stucks to secondary is expecting to
read one chunk of 66607 bytes, while primary is sending two chunks
of 32768 bytes and third chunk of 1071. Probably due to TCP windowing
and buffering the final chunk gets stuck somewhere, so neither server
not client can make any progress.

This patch also protect from short reads, as according to the manual
page there are some cases when MSG_WAITALL can give less data than
expected.

MFC after:	3 days
2011-06-04 16:01:30 +00:00
Mikolaj Golub
a01a750f32 If READ from the local node failed we send the request to the remote
node. There is no use in doing this for synchronization requests.

Approved by:	pjd (mentor)
MFC after:	1 week
2011-05-29 21:20:47 +00:00
Pawel Jakub Dawidek
3db86c39ae Keep statistics on number of BIO_READ, BIO_WRITE, BIO_DELETE and BIO_FLUSH
requests as well as number of activemap updates.

Number of BIO_WRITEs and activemap updates are especially interesting, because
if those two are too close to each other, it means that your workload needs
bigger number of dirty extents. Activemap should be updated as rarely as
possible.

MFC after:	1 week
2011-05-23 21:15:19 +00:00
Pawel Jakub Dawidek
1c6689d58d To handle BIO_FLUSH and BIO_DELETE requests in secondary worker we need
to use ioctl(2). This is why we can't use capsicum for now to sandbox
secondary. Capsicum is still used to sandbox hastctl.

MFC after:	1 week
2011-05-23 20:59:50 +00:00
Pawel Jakub Dawidek
aa27d9ef94 Recognize HIO_FLUSH requests.
MFC after:	1 week
2011-05-21 20:21:20 +00:00
Pawel Jakub Dawidek
588e8623d0 Document IPv6 support.
MFC after:	3 weeks
2011-05-20 11:21:39 +00:00
Pawel Jakub Dawidek
89bad89a59 If no listen address is specified, bind by default to:
tcp4://0.0.0.0:8457
	tcp6://[::]:8457

MFC after:	3 weeks
2011-05-20 11:16:25 +00:00
Pawel Jakub Dawidek
a87399ba7f Rename ipv4/ipv6 to tcp4/tcp6.
MFC after:	3 weeks
2011-05-20 11:15:27 +00:00