aboutsummaryrefslogtreecommitdiff
path: root/sbin/hastd
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo in hastd.8 manual page.Kirk McKusick2019-12-221-2/+2
| | | | | | | | Reported by: Steve Kargl <sgk at troutmask dot apl dot washington dot edu> MFC after: 3 days Notes: svn path=/head/; revision=355995
* Drop "All rights reserved" from my copyright statements.John Baldwin2019-03-061-1/+0
| | | | | | | | | Reviewed by: rgrimes MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D19485 Notes: svn path=/head/; revision=344855
* Revert 335888 ("Ensure va_list is declared by including stdarg.h.")Ruslan Bukin2018-07-031-1/+1
| | | | | | | | | | | | | The issue was caused by header pollution brought by GCC 8.1. We now have to remove include-fixed headers in the GCC installation directory. Sponsored by: DARPA, AFRL Pointed out by: jhb Notes: svn path=/head/; revision=335893
* o Ensure va_list is declared by including stdarg.h.Ruslan Bukin2018-07-031-1/+1
| | | | | | | | | | | | o Also move printf.h to go after it since it does require declaration of va_list. This fixes build with latest RISC-V GNU Toolchain with GCC 8.1 Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=335888
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-2744-2/+90
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-05-091-1/+1
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=318000
* Switch hastctl and hastd to libmd instead of openssl for sha256Allan Jude2017-02-043-23/+2
| | | | | | | | | | Reviewed by: bapt, brnrd, pjd Approved by: pjd (maintainer) Sponsored by: ScaleEngine Inc., FOSDEM DevSummit Differential Revision: https://reviews.freebsd.org/D9423 Notes: svn path=/head/; revision=313192
* Add missing history sections to a number of storage related man pagesAllan Jude2016-09-161-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gmultipath.8: Add HISTORY Adjust sentences with bad phrases picked up by igor ggatec.8: Add HISTORY ggated.8: Add HISTORY ggatel.8: Add HISTORY Seperate out sentence as advised by igor. hastctl.8: Add HISTORY hastd.8: Add HISTORY Fix sentence highlighted by igor. iscontrol.8: Add HISTORY mdmfs.8: Add HISTORY Address issues raised by igor mount_nfs.8: Add HISTORY Not sure where mount_nfs first showed up, but the verison used in the BSD's originates from 4.4BSD according to CSRG archive. Though commercial offerings from Sun and others covers older systems, eg https://groups.google.com/forum/#!topic/net.unix-wizards/lMe7aQikqJI nandfs.8: Add HISTORY Adjust sentence in description to address bad phrase highlighted by igor. nvmecontrol.8: Add HISTORY PR: 212491 PR: 212498 PR: 212499 PR: 212500 PR: 212501 PR: 212502 PR: 212505 PR: 212508 PR: 212540 PR: 212543 PR: 212546 Submitted by: Sevan Janiyan <venture37@geeklan.co.uk> Notes: svn path=/head/; revision=305861
* Define hastd's STRICT_ALIGN macro in a defined and portable way.Dimitry Andric2016-08-281-1/+5
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=304969
* Improve performance and functionality of the bitstring(3) apiAlan Somers2016-05-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two new functions are provided, bit_ffs_at() and bit_ffc_at(), which allow for efficient searching of set or cleared bits starting from any bit offset within the bit string. Performance is improved by operating on longs instead of bytes and using ffsl() for searches within a long. ffsl() is a compiler builtin in both clang and gcc for most architectures, converting what was a brute force while loop search into a couple of instructions. All of the bitstring(3) API continues to be contained in the header file. Some of the functions are large enough that perhaps they should be uninlined and moved to a library, but that is beyond the scope of this commit. sys/sys/bitstring.h: Convert the majority of the existing bit string implementation from macros to inline functions. Properly protect the implementation from inadvertant macro expansion when included in a user's program by prefixing all private macros/functions and local variables with '_'. Add bit_ffs_at() and bit_ffc_at(). Implement bit_ffs() and bit_ffc() in terms of their "at" counterparts. Provide a kernel implementation of bit_alloc(), making the full API usable in the kernel. Improve code documenation. share/man/man3/bitstring.3: Add pre-exisiting API bit_ffc() to the synopsis. Document new APIs. Document the initialization state of the bit strings allocated/declared by bit_alloc() and bit_decl(). Correct documentation for bitstr_size(). The original code comments indicate the size is in bytes, not "elements of bitstr_t". The new implementation follows this lead. Only hastd assumed "elements" rather than bytes and it has been corrected. etc/mtree/BSD.tests.dist: tests/sys/Makefile: tests/sys/sys/Makefile: tests/sys/sys/bitstring.c: Add tests for all existing and new functionality. include/bitstring.h Include all headers needed by sys/bitstring.h lib/libbluetooth/bluetooth.h: usr.sbin/bluetooth/hccontrol/le.c: Include bitstring.h instead of sys/bitstring.h. sbin/hastd/activemap.c: Correct usage of bitstr_size(). sys/dev/xen/blkback/blkback.c Use new bit_alloc. sys/kern/subr_unit.c: Remove hard-coded assumption that sizeof(bitstr_t) is 1. Get rid of unrb.busy, which caches the number of bits set in unrb.map. When INVARIANTS are disabled, nothing needs to know that information. callapse_unr can be adapted to use bit_ffs and bit_ffc instead. Eliminating unrb.busy saves memory, simplifies the code, and provides a slight speedup when INVARIANTS are disabled. sys/net/flowtable.c: Use the new kernel implementation of bit-alloc, instead of hacking the old libc-dependent macro. sys/sys/param.h Update __FreeBSD_version to indicate availability of new API Submitted by: gibbs, asomers Reviewed by: gibbs, ngie MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D6004 Notes: svn path=/head/; revision=299090
* Remove useless calls to basename().Ed Schouten2016-05-011-2/+1
| | | | | | | | | | | | | | | | | There are a couple of places in the source three where we call basename() on constant strings. This is bad, because the prototype standardized by POSIX allows the implementation to use its argument as a storage buffer. This change eliminates some of these unportable calls to basename() in cases where it was only added for cosmetical reasons, namely to trim argv[0]. There's nothing wrong with setting argv[0] to the full path. Reviewed by: jilles Differential Revision: https://reviews.freebsd.org/D6093 Notes: svn path=/head/; revision=298876
* Use MAX() from sys/param.h.Marcelo Araujo2016-04-211-3/+3
| | | | | | | MFC after: 2 weeks. Notes: svn path=/head/; revision=298393
* Use nitems() from sys/param.h.Marcelo Araujo2016-04-201-2/+2
| | | | | | | MFC after: 2 weeks. Notes: svn path=/head/; revision=298317
* MFHGlen Barber2016-03-021-6/+0
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296318
| * DIRDEPS_BUILD: Regenerate without local dependencies.Bryan Drewery2016-02-241-6/+0
| | | | | | | | | | | | | | | | | | | | | | These are no longer needed after the recent 'beforebuild: depend' changes and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports skipping 'make depend'. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=295989
* | Create a package for HAST.Glen Barber2016-02-081-0/+1
|/ | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295415
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+32
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-273-13/+4
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge from head@274682Simon J. Gerraty2014-11-193-14/+14
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=274683
| * \ Merge head from 7/28Simon J. Gerraty2014-08-192-2/+2
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | | Updated dependenciesSimon J. Gerraty2014-05-161-0/+1
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | | Merge from headSimon J. Gerraty2014-05-081-1/+1
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265720
| * \ \ \ Merge headSimon J. Gerraty2014-04-2810-155/+157
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044
| * \ \ \ \ Merge head@256284Simon J. Gerraty2013-10-133-15/+30
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=256424
| * | | | | | Updated dependenciesSimon J. Gerraty2013-10-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=256419
| * | | | | | Merge from headSimon J. Gerraty2013-09-059-33/+51
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=255263
| * \ \ \ \ \ \ sync from headSimon J. Gerraty2013-04-1211-65/+452
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=249429
| * | | | | | | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | | | | | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | | | | | | Sync with HEAD.David E. O'Brien2013-02-082-2/+2
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246555
| * \ \ \ \ \ \ \ \ Sync from headSimon J. Gerraty2012-11-044-34/+61
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | | | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | | | | | | | mdoc: paragraph improvements.Joel Dahl2015-01-041-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=276659
* | | | | | | | | | | Convert sbin/ to LIBADDBaptiste Daroussin2014-11-251-4/+2
| |_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275030
* | | | | | | | | | Add lock annotations to the threading API used by hastd.Ed Schouten2014-09-012-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Approved by: pjd@ Notes: svn path=/head/; revision=270944
* | | | | | | | | | Garbage collect libl dependencyEnji Cooper2014-08-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The application links and runs without libl Approved by: rpaulo (mentor) Phabric: D673 X-MFC with: r270117 Submitted by: trociny Notes: svn path=/head/; revision=270433
* | | | | | | | | | Add -ll to LDADD to fix "make checkdpadd"Enji Cooper2014-08-181-1/+1
| |_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Phabric: D622 MFC after: 2 weeks Approved by: rpaulo (mentor) Notes: svn path=/head/; revision=270117
* | | | | | | | | use .Mt to mark up email addresses consistently (part1)Baptiste Daroussin2014-06-202-2/+2
| |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco@lastsummer.de> Notes: svn path=/head/; revision=267667
* | | | | | | | Use src.opts.mk in preference to bsd.own.mk except where we need stuffWarner Losh2014-05-061-1/+1
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from the latter. Notes: svn path=/head/; revision=265420
* | | | | | | Update most userspace consumers of capability.h to use capsicum.h instead.Robert Watson2014-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | auditdistd is not updated as I will make the change upstream and then do a vendor import sometime in the next week or two. MFC after: 3 weeks Notes: svn path=/head/; revision=263234
* | | | | | | Drop the 3rd clause from all 3 clause BSD licenses where I am the soleJohn Baldwin2014-02-051-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | holder to convert them to 2 clause BSD licenses. MFC after: 1 week Notes: svn path=/head/; revision=261520
* | | | | | | Check remote protocol version only for the first connection (when itMikolaj Golub2013-12-101-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is actually sent by the remote node). Otherwise it generated confusing "Negotiated protocol version 1" debug messages when processing the second connection. MFC after: 2 weeks Notes: svn path=/head/; revision=259196
* | | | | | | Send wakeup to threads waiting on empty queue before releasing theMikolaj Golub2013-12-102-16/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lock to decrease spurious wakeups. Submitted by: davidxu MFC after: 2 weeks Notes: svn path=/head/; revision=259195
* | | | | | | In remote_send_thread, if sending a request fails don't take theMikolaj Golub2013-12-101-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | request back from the receive queue -- it might already be processed by remote_recv_thread, which lead to crashes like below: (primary) Unable to receive reply header: Connection reset by peer. (primary) Unable to send request (Connection reset by peer): WRITE(954662912, 131072). (primary) Disconnected from kopusha:7772. (primary) Increasing localcnt to 1. (primary) Assertion failed: (old > 0), function refcnt_release, file refcnt.h, line 62. Taking the request back was not necessary (it would properly be processed by the remote_recv_thread) and only complicated things. MFC after: 2 weeks Notes: svn path=/head/; revision=259194
* | | | | | | Fix compiler warnings.Mikolaj Golub2013-12-102-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=259193
* | | | | | | Add some macros to make the code more readable (no functional chages).Mikolaj Golub2013-12-101-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=259192
* | | | | | | For memsync replication, hio_countdown is used not only as anMikolaj Golub2013-12-101-111/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | indication when a request can be moved to done queue, but also for detecting the current state of memsync request. This approach has problems, e.g. leaking a request if memsynk ack from the secondary failed, or racy usage of write_complete, which should be called only once per write request, but for memsync can be entered by local_send_thread and ggate_send_thread simultaneously. So the following approach is implemented instead: 1) Use hio_countdown only for counting components we waiting to complete, i.e. initially it is always 2 for any replication mode. 2) To distinguish between "memsync ack" and "memsync fin" responses from the secondary, add and use hio_memsyncacked field. 3) write_complete() in component threads is called only before releasing hio_countdown (i.e. before the hio may be returned to the done queue). 4) Add and use hio_writecount refcounter to detect when write_complete() can be called in memsync case. Reported by: Pete French petefrench ingresso.co.uk Tested by: Pete French petefrench ingresso.co.uk MFC after: 2 weeks Notes: svn path=/head/; revision=259191
* | | | | | | Correct alignment.Pawel Jakub Dawidek2013-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=257582