trociny
5780d99776
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
trociny
4eba690e91
Fix typo.
...
MFC after: 3 days
2012-03-23 20:18:48 +00:00
pjd
3e86e21237
Nice range comparison.
...
MFC after: 3 days
2012-02-11 16:41:52 +00:00
trociny
1d510ea553
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
trociny
d2786f0a2c
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
pjd
306b4958cf
Fix typo in comment.
...
MFC after: 3 days
2012-02-04 07:59:12 +00:00
pjd
538ff2e745
- 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
pjd
983cddf8a6
Free memory that won't be used in child.
...
MFC after: 1 week
2012-01-22 11:20:42 +00:00
pjd
bf37868a59
Fix minor memory leak.
...
MFC after: 3 days
2012-01-21 20:13:37 +00:00
pjd
62f2fd64bb
Remove another unused token.
...
MFC after: 3 days
2012-01-20 21:49:56 +00:00
pjd
8e6c8deb43
Remove unused token 'port'.
...
MFC after: 3 days
2012-01-20 21:45:24 +00:00
pjd
b07aec8b25
Style cleanups.
...
MFC after: 3 days
2012-01-13 23:25:35 +00:00
pjd
e437b28043
- 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
pjd
c5fe5a76f2
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
pjd
29f76d890e
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
uqs
5f1ca9b982
Spelling fixes for sbin/
2012-01-07 16:09:33 +00:00
pjd
cbcf1832ad
fork(2) returns -1 on failure, not some random negative number.
...
MFC after: 3 days
2012-01-06 23:44:26 +00:00
pjd
a272071bf0
Constify argument.
...
MFC after: 3 days
2012-01-06 12:27:17 +00:00
dim
9d35683411
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
pjd
0283ff3e72
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
pjd
509e6459e0
Don't use function name as format string.
...
Detected by: clang
MFC after: 1 week
2011-12-18 20:40:19 +00:00
pjd
8d73b322fa
Remove redundant assignment.
...
Found by: Clang Static Analyzer
MFC after: 1 week
2011-12-15 22:05:23 +00:00
pjd
91f3438889
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
pjd
a852ec0ef9
Remove redundant setting of the error variable.
...
Found by: Clang Static Analyzer
MFC after: 1 week
2011-12-15 22:01:34 +00:00
pjd
f13dc0df13
Remove redundant space.
...
MFC after: 3 days
2011-10-27 20:36:35 +00:00
pjd
14cf798458
Implement 'async' mode for HAST.
...
MFC after: 3 days
2011-10-27 20:32:57 +00:00
pjd
c017e98c55
Minor cleanups.
...
MFC after: 3 days
2011-10-27 20:15:37 +00:00
pjd
739f931164
Reduce indentation.
...
MFC after: 3 days
2011-10-27 20:13:39 +00:00
pjd
986d3757ae
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
pjd
72922c3d6b
- 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
pjd
fcce680c47
Monor cleanups.
...
MFC after: 3 days
2011-10-27 18:49:16 +00:00
pjd
c2e715af70
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
pjd
315841e3ac
Correct comments.
...
MFC after: 3 days
2011-10-27 16:22:17 +00:00
pjd
ed683cf8c0
Allow to specify pidfile in HAST configuration file.
...
MFC after: 1 week
2011-10-17 12:22:09 +00:00
pjd
06a2c15f45
Remove redundant space.
...
MFC after: 1 week
2011-10-17 09:59:04 +00:00
pjd
cc73b6a041
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
pjd
ae2bc06327
Correct typo.
...
MFC after: 3 days
2011-09-28 13:25:27 +00:00
pjd
25b3d91c28
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
pjd
3fbe0df4ff
Break a bit earlier.
...
MFC after: 3 days
2011-09-28 13:13:43 +00:00
pjd
374501b495
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
pjd
2c59e5d543
Use PJDLOG_ASSERT() and PJDLOG_ABORT() everywhere instead of assert().
...
MFC after: 3 days
2011-09-27 08:50:37 +00:00
pjd
1f93bdc27f
No need to wrap pjdlog functions around with KEEP_ERRNO() macro.
...
MFC after: 3 days
2011-09-27 08:26:09 +00:00
pjd
ac89e4145a
- Convert some impossible conditions into assertions.
...
- Add missing 'if' in comment.
MFC after: 3 days
2011-09-27 08:04:01 +00:00
pjd
b294ac14be
Correct two mistakes when converting asserts to PJDLOG_ASSERT()/PJDLOG_ABORT().
...
MFC after: 3 days
2011-09-27 07:59:10 +00:00
pjd
26b0e1eedd
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
pjd
ff11c3069e
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
pjd
e0053a0ea2
Ensure that pjdlog functions don't modify errno.
...
MFC after: 3 days
2011-09-27 06:43:51 +00:00
trociny
ec6755c2ee
Fix indentation.
...
Approved by: pjd (mentor)
2011-07-13 05:32:55 +00:00
trociny
3628e4b620
Remove useless initialization.
...
Approved by: pjd (mentor)
MFC after: 3 days
2011-07-05 06:12:28 +00:00
trociny
82faa3e641
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