Commit graph

37 commits

Author SHA1 Message Date
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
Ruslan Ermilov 8af480aec1 - When building world WITHOUT_LIBPTHREAD, link libthr to libpthread.
- Don't build ngctl(8) and cached(8) if threading libs aren't built.
- Fix various issues in a cached(8) makefile.
2006-11-26 14:36:34 +00:00
Pawel Jakub Dawidek a930f272de - Handle timeouts from recv(2) properly.
- Increase timeout to 8 seconds (should be made configurable).

Reported by:	Ulrich Spoerlein <uspoerlein@gmail.com>
Reported by:	Christian Laursen <xi@borderworlds.dk>
PR:		kern/104829
MFC after:	1 week
2006-10-30 18:29:24 +00:00
Ruslan Ermilov 8266d47670 Markup fixes. 2006-09-18 11:55:10 +00:00
Ruslan Ermilov 2b46c64c9c Remove alpha left-overs. 2006-08-22 08:03:01 +00:00
Tom Rhodes 98d3f2b20b Fix a typo s/Made/Make. Use .Pp for a line break, it will quiet the
mdoc(7) warning.
2006-06-10 09:45:26 +00:00
Ruslan Ermilov 295c5dea2c libc_r is no longer provided, and on alpha and sparc64, libthr
is (sym)linked to libpthread.  Account for this change and
check for MK_LIBTHR instead of MK_LIBC_R where appropriate.
2006-04-12 19:52:34 +00:00
Ruslan Ermilov a50767eb92 Unbreak WITHOUT_LIBPHREAD/WITHOUT_LIBC_R option support, depending
on platform.
2006-03-21 11:00:54 +00:00
Ruslan Ermilov e1fe3dba5c Reimplementation of world/kernel build options. For details, see:
http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by:	imp, jhb, kris, phk, ru (all bugs are mine)
2006-03-17 18:54:44 +00:00
Pawel Jakub Dawidek 2d97ef7a3c Flush stdout after printing name of created device, so it can be properly
read when 'ggatec create' is used in backticks or its output is piped to
another command.

Submitted by:	Paul Schenkeveld
MFC after:	3 days
2006-03-12 09:27:51 +00:00
Ruslan Ermilov 4e9e907d63 -mdoc sweep. 2005-11-18 10:36:29 +00:00
Pawel Jakub Dawidek 16a563e2b4 Update manual page after ggate rewrite.
MFC after:	1 day
2005-07-29 11:22:13 +00:00
Pawel Jakub Dawidek c68cb3f674 Don't compile ggatec/ggated in NO_LIBPTHREAD case.
Reported by:	Andrea Campi <andrea+freebsd_cvs_all@webcom.it>
Approved by:	re (scottl)
2005-07-10 15:16:49 +00:00
Pawel Jakub Dawidek 15e088eeb2 Sync which ggate changes.
Approved by:	re (scottl)
2005-07-08 21:29:17 +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
Xin LI 263d6a7ece include stdarg.h for va_list 2005-05-02 10:04:16 +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 0618f3dcba Fix a deadlock in ggatel(8) simlar to one which was fixed some time
ago in md(4).

Submitted by:	Ivan Voras <ivoras@fer.hr>
2004-10-02 16:58:33 +00:00
Pawel Jakub Dawidek 122abe0385 Fix/clean up return values checking. 2004-09-08 07:57:14 +00:00
Pawel Jakub Dawidek 71ae6999b6 Print mediasize in human readable form as well. 2004-06-21 09:20:06 +00:00
Pawel Jakub Dawidek 59ee11bbbe Remove extra semicolon.
Inspired by:	fjoe
2004-06-02 21:21:10 +00:00
Pawel Jakub Dawidek 967d731f98 style.Makefile(5). 2004-05-22 10:33:18 +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 9db1cbd1cf Add missing command. 2004-05-03 21:31:19 +00:00
Pawel Jakub Dawidek 881a65c479 Add missing commands. 2004-05-03 21:29:22 +00:00
Pawel Jakub Dawidek b42b646004 Don't repeat handshake.
This little thing can cause a deadlock, because taste mechanism start
to work after creation of ggate provider and I/O requests are sent from
other classes from the g_event thread, so number of pending events isn't 0.
Now ggatec(8) start second handshake and ggated(8) is trying to open
GEOM provider (for example md(4)) and it can't, because it hangs on
g_waitidle() in g_dev_open(). g_waitidle() cannot finish because
there is a pending read on event queue, and this read can't be
finished, because ggated(8) can't open target device.
GEOM Gate will recover from this deadlock, because requests will
timeout, but it of course isn't the best solution and I don't know
better one for now, so we should avoid opening GEOM providers while
there are pending requests in event queue.
2004-05-03 18:24:41 +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
Pawel Jakub Dawidek 2041034c3d GEOM Gate network client and control utility. 2004-04-30 16:18:01 +00:00
Pawel Jakub Dawidek 72a840f9a6 GEOM Gate local control utility. 2004-04-30 16:15:13 +00:00
Pawel Jakub Dawidek 6ac5fe4854 Stuff shared between ggate utilities. 2004-04-30 16:13:45 +00:00
Pawel Jakub Dawidek af4f788a94 Makefile for building ggate utilities: ggatel(8), ggatec(8), ggated(8). 2004-04-30 16:12:20 +00:00