Commit Graph

33 Commits

Author SHA1 Message Date
Enji Cooper
fc7e71c52d Add pidfile support to ggated(8)
The tests will manipulate the system daemon today, which can cause undesired
service interruption when the tests are run.

This change allows the geom_gate tests to be run with an arbitrary ggated(8)
daemon / geom_gate(4) device pairing.

Other changes:
- Sort #includes
- Use a more common idiom for parsing options with getopt(3)

Differential Revision: https://reviews.freebsd.org/D4836
MFC after: 2 weeks
Reviewed by: bjk (manpages), pjd (maintainer timeout)
Sponsored by: EMC / Isilon Storage Division
2016-01-28 03:24:06 +00:00
Christian Brueffer
b29fdbd8ea Cleanup; mostly language with a little bit of mdoc style.
MFC after:	1 week
2015-07-14 14:01:33 +00:00
Christian Brueffer
b4a355e2f3 If ggated's exports_find() fails, the connection is removed before
(trying to) report the problem to the client.

sendfail() is called with an already closed socket and thus it
fails to inform the client about the problem.

Fix this by calling sendfail() before connection_remove().

PR:		195944
Submitted by:	Fabian Keil
Reviewed by:	pjd
MFC after:	1 week
2015-07-14 09:25:10 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
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
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Baptiste Daroussin
13eb765f2d Convert sbin/ to LIBADD
Reduce overlinking
2014-11-25 11:23:12 +00:00
Simon J. Gerraty
ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Baptiste Daroussin
bd0891ceb3 use .Mt to mark up email addresses consistently (part1)
PR:		191174
Submitted by:	Franco Fichtner  <franco@lastsummer.de>
2014-06-20 09:40:43 +00:00
Simon J. Gerraty
fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty
76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty
7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Simon J. Gerraty
23090366f7 Sync from head 2012-11-04 02:52:03 +00:00
Ed Schouten
ae824d80f2 Fix warnings found by -Wmising-variable-declarations.
This self-written compiler warning, which is hopefully going to be
committed into LLVM sources soon, warns about potentially missing
`static' keywords, similar to -Wmissing-prototypes.

- bin/pax: Move external declaration of chdname and s_mask into extern.h.
- bin/setfacl: Move setfacl.c-specific stuff out of setfacl.h.
- sbin/mount_fusefs: Remove char *progname; use getprogname().
- others: add `static' where possible.
2012-10-19 05:43:38 +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
Pawel Jakub Dawidek
d44dbcbb33 Style nits. 2010-02-18 23:04:01 +00:00
Antoine Brodin
13e403fdea (S)LIST_HEAD_INITIALIZER takes a (S)LIST_HEAD as an argument.
Fix some wrong usages.
Note: this does not affect generated binaries as this argument is not used.

PR:		137213
Submitted by:	Eygene Ryabinkin (initial version)
MFC after:	1 month
2009-12-28 22:56:30 +00:00
Mike Makonnen
186f2eea49 The signature for a pthread function requires that it
return a pointer to a void. The send_thread() and disk_thread()
funtions; however, do not have a return value because they run for
the duration of the daemon's lifetime. This causes gcc to barf when
running with -O3. Make these functions return a null pointer to quiet it.

PR:	bin/124342
Submitted by:	Garrett Cooper <gcooper@FreeBSD.org> (minus his comments)
MFC after:	1 week
2008-06-26 07:05:35 +00:00
Oleksandr Tymoshenko
032de3f930 Fix spelling
PR:	kern/124723
Event:	Bugathon#5
2008-06-20 21:41:44 +00:00
Pawel Jakub Dawidek
15c7f46bcf For consistency use 'unsigned' instead of 'u_int'. 2006-12-18 11:12:00 +00:00
Pawel Jakub Dawidek
905cd66703 Fix ggated for platforms with 64bit size_t. The DIOCGSECTORSIZE ioctl
returns u_int.

Reported by:	Javier Martín Rueda <jmrueda@diatel.upm.es>
PR:		amd64/91799
MFC after:	3 days
2006-12-15 18:16:47 +00:00
Pawel Jakub Dawidek
7be67fe3d1 Reimplement ggatec/ggated applications.
Change communication protocol to be much more resistant on network
problems and to allow for much better performance.

Better performance is achieved by creating two connections between
ggatec and ggated one for sending the data and one for receiving it.
Every connection is handled by separeted thread, so there is no more
synchronous data flow (send and wait for response), now one threads
sends all requests and another receives the data.

Use two threads in ggatec(8):
- sendtd, which takes I/O requests from the kernel and sends them to the
  ggated daemon on the other end;
- recvtd, which waits for ggated responses and forwards them to the kernel.

Use three threads in ggated(8):
- recvtd, which waits for I/O requests and puts them onto incoming queue;
- disktd, which takes requests from the incoming queue, does disk operations
  and puts finished requests onto outgoing queue;
- sendtd, which takes finished requests from the outgoing queue and sends
  responses back to ggatec.

Because there were major changes in communication protocol, there is no
backward compatibility, from now on, both client and server has to run
on 5.x or 6.x (or at least ggated should be from the same FreeBSD version
on which ggatec is running).

For Gbit networks some buffers need to be increased. I use those settings:
kern.ipc.maxsockbuf=16777216
net.inet.tcp.sendspace=8388608
net.inet.tcp.recvspace=8388608
and I use '-S 4194304 -R 4194304' options for both, ggatec and ggated.

Approved by:	re (scottl)
2005-07-08 21:28:26 +00:00
Ruslan Ermilov
6087df9e8b Sort sections. 2005-01-18 10:09:38 +00:00
Ruslan Ermilov
a866e17077 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
Pawel Jakub Dawidek
122abe0385 Fix/clean up return values checking. 2004-09-08 07:57:14 +00:00
Pawel Jakub Dawidek
59ee11bbbe Remove extra semicolon.
Inspired by:	fjoe
2004-06-02 21:21:10 +00:00
Pawel Jakub Dawidek
7046bb7442 Various style.Makefile(5) improvements.
Provoked by:	ru
2004-05-20 20:05:05 +00:00
Ruslan Ermilov
5660800632 Polish the mdoc(7) markup. 2004-05-12 07:34:05 +00:00
Bruce Evans
b34d2de031 Include <sys/time.h> for the declaration of struct bintime instead of
depending on namespace pollution in <sys/stat.h>.  struct bintime is
only needed to satisfy leakage of kernel interfaces to userland and
namespace bugs in those interfaces...
2004-05-04 07:08:04 +00:00
Pawel Jakub Dawidek
7ee7f482a7 Paths correction.
Pointed out by:	ache, make buildworld
2004-05-03 07:21:59 +00:00
Pawel Jakub Dawidek
86bfa45446 Fix compiling on 64-bit architectures. 2004-05-02 17:59:49 +00:00
Pawel Jakub Dawidek
d1d669bd76 GEOM Gate network daemon. 2004-04-30 16:19:50 +00:00