History log of /freebsd-current/sbin/ggate/ggated/ggated.c
Revision Date Author Comments
# b3e76948 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# 6226477a 02-Jan-2022 Alan Somers <asomers@FreeBSD.org>

Various fixes for ggatec and ggated

Dynamically size buffers in ggatec. Instead of static size on the stack.
Add flush support.

Submitted by: Johannes Totz <jo@bruelltuete.com>
MFC after: 2 weeks
Reviewed by: asomers
Differential Revision: https://reviews.freebsd.org/D31722


# 278847ae 08-Sep-2020 Mark Johnston <markj@FreeBSD.org>

ggate: Fix ggated/ggatec debug print of offsets.

The request offset and length are always unsigned, so print them as
such.

Submitted by: Yoshihiro Ota <ota@j.email.ne.jp>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D21388


# 0a01415e 31-Aug-2020 Mark Johnston <markj@FreeBSD.org>

ggated(8): Avoid doubly opening the requested disk device.

- Initialize the disk device fd field in connection_new().
- Close the disk device after handing the connection over
to a child worker.
- Avoid re-opening a disk device for each connection from
the same client, avoiding an fd leak.

PR: 132845
Submitted by: Yoshihiro Ota <ota@j.email.ne.jp>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D26168


# 133f9fcf 04-Dec-2018 Ed Maste <emaste@FreeBSD.org>

ggated: do not expose stack data in sendfail()

admbugs: 590
Submitted by: Fabian Keil <fk@fabiankeil.de>
Obtained from: ElectroBSD


# 1de7b4b8 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

various: general adoption of SPDX licensing ID tags.

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.


# fc7e71c5 27-Jan-2016 Enji Cooper <ngie@FreeBSD.org>

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


# b4a355e2 14-Jul-2015 Christian Brueffer <brueffer@FreeBSD.org>

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


# ae824d80 18-Oct-2012 Ed Schouten <ed@FreeBSD.org>

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.


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 1d908ad7 18-Apr-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

MFC r204075:

Style nits.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d44dbcbb 18-Feb-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Style nits.


# e2b36efd 29-Jan-2010 Antoine Brodin <antoine@FreeBSD.org>

MFC r201145 to stable/8:
(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)


# 13e403fd 28-Dec-2009 Antoine Brodin <antoine@FreeBSD.org>

(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


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 186f2eea 26-Jun-2008 Mike Makonnen <mtm@FreeBSD.org>

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


# 032de3f9 20-Jun-2008 Oleksandr Tymoshenko <gonzo@FreeBSD.org>

Fix spelling

PR: kern/124723
Event: Bugathon#5


# 15c7f46b 18-Dec-2006 Pawel Jakub Dawidek <pjd@FreeBSD.org>

For consistency use 'unsigned' instead of 'u_int'.


# 905cd667 15-Dec-2006 Pawel Jakub Dawidek <pjd@FreeBSD.org>

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


# 7be67fe3 08-Jul-2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>

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)


# 122abe03 08-Sep-2004 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Fix/clean up return values checking.


# 59ee11bb 02-Jun-2004 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Remove extra semicolon.

Inspired by: fjoe


# b34d2de0 04-May-2004 Bruce Evans <bde@FreeBSD.org>

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...


# 86bfa454 02-May-2004 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Fix compiling on 64-bit architectures.


# d1d669bd 30-Apr-2004 Pawel Jakub Dawidek <pjd@FreeBSD.org>

GEOM Gate network daemon.