summaryrefslogtreecommitdiffstats
path: root/sbin/hastd
Commit message (Collapse)AuthorAgeFilesLines
...
* Use NO_WCAST_ALIGN for usr.bin/hastctl and usr.bin/hastd; the alignmentdim2011-12-191-0/+1
| | | | | | | warnings in sbin/hastd/lzf.c are only emitted for i386 and amd64, and there they can be safely ignored. MFC after: 1 week
* Use lex's standard way of not generating unused function.pjd2011-12-182-3/+3
| | | | | Inspired by: r228555 MFC after: 1 week
* Don't use function name as format string.pjd2011-12-181-1/+1
| | | | | Detected by: clang MFC after: 1 week
* Remove redundant assignment.pjd2011-12-151-2/+0
| | | | | Found by: Clang Static Analyzer MFC after: 1 week
* Simplify code by changing functions types from int to avoid, as the functionspjd2011-12-151-15/+6
| | | | | | | always return 0. Found by: Clang Static Analyzer MFC after: 1 week
* Remove redundant setting of the error variable.pjd2011-12-151-2/+0
| | | | | Found by: Clang Static Analyzer MFC after: 1 week
* Remove redundant space.pjd2011-10-271-1/+1
| | | | MFC after: 3 days
* Implement 'async' mode for HAST.pjd2011-10-273-55/+81
| | | | MFC after: 3 days
* Minor cleanups.pjd2011-10-271-1/+2
| | | | MFC after: 3 days
* Reduce indentation.pjd2011-10-271-24/+24
| | | | MFC after: 3 days
* Improve comment so it doesn't suggest race is possible, but that we handlepjd2011-10-271-1/+1
| | | | | | the race. MFC after: 3 days
* - Eliminate the need for hio_nv.pjd2011-10-271-25/+55
| | | | | | | - Introduce hio_clear() function for clearing hio before returning it onto free queue. MFC after: 3 days
* Monor cleanups.pjd2011-10-271-6/+7
| | | | MFC after: 3 days
* Delay resuid generation until first connection to secondary, not until firstpjd2011-10-271-6/+3
| | | | | | | 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
* Correct comments.pjd2011-10-271-3/+3
| | | | MFC after: 3 days
* Allow to specify pidfile in HAST configuration file.pjd2011-10-175-14/+116
| | | | MFC after: 1 week
* Remove redundant space.pjd2011-10-171-1/+1
| | | | MFC after: 1 week
* When path to the configuration file is relative, obtain full path,pjd2011-10-171-0/+16
| | | | | | | so we can always find the file, even after daemonizing and changing working directory to /. MFC after: 1 week
* Correct typo.pjd2011-09-281-1/+1
| | | | MFC after: 3 days
* If the underlying provider doesn't support BIO_FLUSH, log it only oncepjd2011-09-284-4/+24
| | | | | | and don't bother trying in the future. MFC after: 3 days
* Break a bit earlier.pjd2011-09-281-0/+1
| | | | MFC after: 3 days
* After every activemap change flush disk's write cache, so that writepjd2011-09-286-7/+118
| | | | | | | | | | | | 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
* Use PJDLOG_ASSERT() and PJDLOG_ABORT() everywhere instead of assert().pjd2011-09-279-161/+192
| | | | MFC after: 3 days
* No need to wrap pjdlog functions around with KEEP_ERRNO() macro.pjd2011-09-271-2/+1
| | | | MFC after: 3 days
* - Convert some impossible conditions into assertions.pjd2011-09-271-11/+10
| | | | | | - Add missing 'if' in comment. MFC after: 3 days
* Correct two mistakes when converting asserts to PJDLOG_ASSERT()/PJDLOG_ABORT().pjd2011-09-271-4/+2
| | | | MFC after: 3 days
* Prefer PJDLOG_ASSERT() and PJDLOG_ABORT() over assert() and abort().pjd2011-09-273-33/+31
| | | | | | | pjdlog versions will log problem to syslog when application is running in background. MFC after: 3 days
* No need to use KEEP_ERRNO() macro around pjdlog functions, as they don'tpjd2011-09-272-23/+20
| | | | | | modify errno. MFC after: 3 days
* Ensure that pjdlog functions don't modify errno.pjd2011-09-271-0/+25
| | | | MFC after: 3 days
* Fix indentation.trociny2011-07-131-1/+1
| | | | Approved by: pjd (mentor)
* Remove useless initialization.trociny2011-07-051-2/+1
| | | | | Approved by: pjd (mentor) MFC after: 3 days
* Check the returned value of activemap_write_complete() and update matadata ontrociny2011-06-281-2/+5
| | | | | | | | 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)
* Make activemap_write_start/complete check the keepdirty list, whentrociny2011-06-281-5/+8
| | | | | | | | 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)
* Compile hastd and hastctl with capsicum support.pjd2011-06-271-1/+2
| | | | X-MFC after: capsicum merge
* Compile capsicum support only if HAVE_CAPSICUM is defined.pjd2011-06-271-0/+4
| | | | MFC after: 3 days
* Log a warning if we cannot sandbox using capsicum, but only under debug level 1.pjd2011-06-271-2/+6
| | | | | | | 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
* In HAST we use two sockets - one for only sending the data and one fortrociny2011-06-172-0/+6
| | | | | | | | | | | | | | | | | | 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
* Revert r222688.sobomax2011-06-161-14/+2
| | | | Requested by: Mikolaj Golub
* Read from the socket using the same max buffer size as we use whilesobomax2011-06-041-2/+14
| | | | | | | | | | | | | | | | | 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
* If READ from the local node failed we send the request to the remotetrociny2011-05-291-1/+1
| | | | | | | node. There is no use in doing this for synchronization requests. Approved by: pjd (mentor) MFC after: 1 week
* Keep statistics on number of BIO_READ, BIO_WRITE, BIO_DELETE and BIO_FLUSHpjd2011-05-234-0/+53
| | | | | | | | | | | 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
* To handle BIO_FLUSH and BIO_DELETE requests in secondary worker we needpjd2011-05-231-1/+7
| | | | | | | 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
* Recognize HIO_FLUSH requests.pjd2011-05-211-0/+1
| | | | MFC after: 1 week
* Document IPv6 support.pjd2011-05-201-8/+22
| | | | MFC after: 3 weeks
* If no listen address is specified, bind by default to:pjd2011-05-201-2/+0
| | | | | | | tcp4://0.0.0.0:8457 tcp6://[::]:8457 MFC after: 3 weeks
* Rename ipv4/ipv6 to tcp4/tcp6.pjd2011-05-202-10/+10
| | | | MFC after: 3 weeks
* Now that hell is fully frozen it is good time to add IPv6 support to HAST.pjd2011-05-201-75/+116
| | | | MFC after: 3 weeks
* Allow [ ] characters in strings. They might be used in IPv6 addresses.pjd2011-05-201-1/+1
| | | | MFC after: 3 weeks
* Rename tcp4 to tcp in preparation for IPv6 support.pjd2011-05-202-93/+93
| | | | MFC after: 3 weeks
* Rename proto_tcp4.c to proto_tcp.c in preparation for IPv6 support.pjd2011-05-202-1/+1
| | | | MFC after: 2 weeks
OpenPOWER on IntegriCloud