| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r270004
Convert devd's client socket to type SOCK_SEQPACKET.
This change consists of two merges from projects/zfsd/head along with the
addition of an ATF test case for the new functionality.
sbin/devd/tests/Makefile
sbin/devd/tests/client_test.c
Add ATF test cases for reading events from both devd socket types.
r266519:
sbin/devd/devd.8
sbin/devd/devd.cc
Create a new socket, of type SOCK_SEQPACKET, for communicating with
clients. SOCK_SEQPACKET sockets preserve record boundaries,
simplying code in the client. The old SOCK_STREAM socket is retained
for backwards-compatibility with existing clients.
r269993:
sbin/devd/devd.8
Fix grammar bug.
r270019 (from bz)
Remove bogus ; at the end of the if condition in order to unbreak gcc builds
after r270004.
MFC after: 4 days
X-MFX with: r270004
|
|
|
|
|
|
| |
Update userspace users of hw.bus.devctl_disable.
This switches the code to use hw.bus.devctl_queue instead.
|
|
|
|
|
|
|
|
| |
Revert r263694, and apply a better fix to squelch unnecessary warnings
from clang about possible keywords being treated as identifiers for the
remainder of the translation unit (a.k.a. -Wkeyword-compat), when using
libstdc++ in combination with -Wsystem-headers. This will not only fix
devd, but any C++ program using libstdc++.
|
|
|
|
|
|
|
| |
sbin/devd/devd.8
sbin/devd/devd.cc
Add a -q flag to devd that will suppress syslog logging at
LOG_NOTICE or below.
|
|
|
|
|
|
|
| |
Apply a temporary band-aid for building devd with clang 3.4, libstdc++
and -Wsystem-headers enabled (which is the default for any non-zero
WARNS level, crazily enough!). This is primarily meant to be MFC'd as
soon as possible.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sbin/devd/devd.cc
Increase the size of devd's client socket's send buffer from the
default (8k) to 128k. This prevents clients from getting
POLLHUPped during event storms. For example, during zpool creation,
the kernel emits a resource.fs.zfs.statechange event for every vdev
in the pool. A 128k buffer is large enough to hold the statechange
events for a pool with nearly 800 drives.
MFC 259362
sbin/devd/devd.cc
Promoting the SIGINFO handler's log message from LOG_INFO to
LOG_NOTICE, and promoting the "Processing event ..." message from
LOG_DEBUG to LOG_INFO. Setting the logfile to LOG_NOTICE with this
change will have the same result as setting it to LOG_INFO without
this change. Setting it to LOG_INFO with this change will include
the useful "Processing event ..." messages that were previously at
LOG_DEBUG, without including useless messages like "Pushing table".
The intent of this change is that one can log "Processing event ..."
without logging "Pushing table" and related messages that are sent
for every event. The number of lines actually logged is reduced by
about 75% by making this change and setting syslog to LOG_INFO vs
setting syslog to LOG_DEBUG.
etc/syslog.conf
Changing the recommended loglevel to notice instead of info.
|
|
|
|
|
|
|
| |
Add __printflike argument checking for devdlog().
Reported by: pjd
Approved by: gibbs (co-mentor)
|
|
|
|
|
|
|
| |
included by libstdc++.
Reported By: Oliver Hartmann
Approved by: gibbs (co-mentor, implicit)
|
|
|
|
|
|
| |
changes.
Approved by: gibbs (co-mentor)
|
|
|
|
|
|
|
|
| |
stderr as appropriate. Currently, the only statistic printed is the number of
events received.
Reviewed by: eadler
Approved by: gibbs (co-mentor)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sbin/devd/devd.cc
All output will now go to syslog(3) if devd is daemonized, or stderr
if it's running in the foreground.
sbin/devd/devd.8
Remove the "-D" flag. Filtering messages by priority now
happens in the usual syslog way. For performance reasons, a few
extra-verbose debugging statements are now conditional on the "-d" (do
not daemonize) flag.
etc/syslog.conf
etc/newsyslog.conf
Direct messages from devd(8) to /var/log/devd.log, but leave it
disabled by default
Reviewed by: eadler
Approved by: gibbs (co-mentor)
MFC after: never (removed a command-line option from devd)
|
| |
|
|
|
|
|
|
|
|
| |
names within the std namespace (and possibly within the global
namespace).
The main advantage is that the C++ versions can provide optimized
versions or simplified interfaces.
|
|
|
|
|
|
|
|
|
|
|
|
| |
piece them together from multiple reads(). It's as if /dev/devctl is
a datagram device instead of a stream device. However, devd's
internal buffer was too small (1025 bytes) to read an entire
ereport.fs.zfs.checksum event (variable, up to ~1300 bytes). This
commit enlarges the buffer to 8k.
Reviewed by: imp
Approved by: ken (mentor)
MFC after: 2 weeks
|
|
|
|
|
| |
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
Approved by: cperciva (mentor)
|
|
|
|
|
| |
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
Approved by: cperciva (mentor)
|
|
|
|
|
| |
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
Approved by: cperciva (mentor)
|
|
|
|
|
| |
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
Approved by: cperciva (mentor)
|
|
|
|
|
| |
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
Approved by: cperciva (mentor)
|
|
|
|
|
|
|
| |
handling std::string.
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
Approved by: cperciva (mentor)
|
|
|
|
|
| |
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
Approved by: cperciva (mentor)
|
|
|
|
|
| |
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
Approved by: cperciva (mentor)
|
|
|
|
|
| |
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
Approved by: cperciva (mentor)
|
|
|
|
|
| |
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
Approved by: cperciva (mentor)
|
|
|
|
| |
Approved by: cperciva (mentor)
|
|
|
|
| |
X-MFC after: never
|
| |
|
|
|
|
| |
Approved by: joel (mentor)
|
|
|
|
|
|
|
|
|
|
|
|
| |
heavily used when parsing config files. Mostly these changes avoid making
temporary copies of the strings, and avoid doing byte at a time append
operations, on the most-used code path.
On a 1.2 GHz ARM processor this reduces the time to parse the config files
from 13 to 6 seconds.
Reviewed by: imp
Approved by: cognet (mentor)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
their socket connection any time, and devd only notices that when it gets an
error trying to write an event to the client. On a system with no device
change activity, clients could connect and disappear repeatedly without devd
noticing, leading to an ever-growing list of open socket descriptors in devd.
Now devd uses poll(2) looking for POLLHUP on all existing clients every time
a new client connection is established, and also periodically (once a minute)
to proactively find zombie clients and reap the socket descriptors. It also
now has a connection limit, configurable with a new -l <num> command line arg.
When the maximum number of connections is reached it stops accepting new
connections until some current clients drop off.
Reviewed by: imp
Approved by: cognet (mentor)
|
|
|
|
|
| |
Approved by: cperciva
MFC after: 2 weeks
|
|
|
|
|
|
|
| |
for non-primitive types.
Approved by: cperciva
MFC after: 2 weeks
|
|
|
|
|
| |
Approved by: cperciva
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
lists it reads from its configuration files on the priority field.
Because some items in the lists have the same priority, and std::sort()
is not stable, the exact order in which the items are enumerated does
not have to correspond to the order they appear in the configuration
files.
Apparently this was never noticed with libstdc++, but with libc++ it
could cause the "uhid" entry from /etc/devd/usb.conf to be used instead
of the "ums" entry (which is earlier in the file). This caused the
problem described in the PR: the USB mouse module was never loaded, and
the other actions (such as starting moused) were not executed.
To fix the problem, make devd use std:stable_sort() instead.
Reported by: Jan Beich <jbeich@tormail.org>
PR: bin/172958
MFC after: 2 weeks
|
|
|
|
|
|
| |
Based on prodding and a submission by Lars Engels <lars.engels@0x20.net>.
MFC after: 5 days
|
| |
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
|
|
|
| |
- old yacc(1) use to magicially append stdlib.h, while new one don't
- new yacc(1) do declare yyparse by itself, fix redundant declaration of
'yyparse'
Approved by: des (mentor)
|
| |
|
| |
|
|
|
|
|
|
| |
devd.hh, there are redeclared as classes. Fix the inconsistency.
MFC after: 1 week
|
|
|
|
| |
Pointy hat to: glebius
|
| |
|
|
|
|
|
|
|
|
|
| |
the logic (true/false) of the matching.
- Add "!usbus[0-9]+" to IFNET ATTACH notification handler in the default
devd.conf to prevent rc.d/netif from running when usbus[0-9]+ is attached.
Reviewed by: imp
|
|
|
|
| |
See sys/dev/usb/usb_device.c for what devctl_notify() gets.
|
| |
|
|
|
|
| |
Reviewed by: imp
|
|
|
|
|
|
|
|
| |
cope. Skip multiple spaces in a few contexts.
PR: 96854
Submitted by: Shin'ya Kumabuchi
MFC after: 1 week
|
|
|
|
| |
They have no effect when coming in pairs, or before .Bl/.Bd
|
|
|
|
|
|
| |
translating these manual pages. Minor corrections by me.
Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
|