summaryrefslogtreecommitdiffstats
path: root/sbin/devd
Commit message (Collapse)AuthorAgeFilesLines
* Increase devd's client socket buffer size to 256KB. This is not as large asasomers2015-12-091-6/+17
| | | | | | | | | | it looks, because we'll hit the sockbuf's mbuf limit long before hitting its data limit. A 256KB data limit allows creating a ZFS pool on about 450 drives without overflowing the client socket buffers. MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D4476
* Fix a ton of speelling errorseadler2015-10-211-1/+1
| | | | | | | arc lint is helpful Reviewed By: allanjude, wblock, #manpages, chris@bsdjunk.com Differential Revision: https://reviews.freebsd.org/D3337
* Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) andngie2015-10-121-2/+0
| | | | | | | | | | | | netbsd-tests.test.mk (r289151) - Eliminate explicit OBJTOP/SRCTOP setting - Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk - Remove unnecessary TESTSDIR setting - Use SRCTOP where possible for clarity MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Divison
* Document suspend/resume notification in devd.conf(5).trasz2015-07-181-0/+4
| | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
* Add CARP events description to devd.conf(5).trasz2015-07-181-1/+21
| | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
* new dependssjg2015-06-161-0/+1
|
* Add META_MODE support.sjg2015-06-131-0/+28
|\ | | | | | | | | | | | | | | | | | | | | 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
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge sync of headsjg2015-05-273-3/+52
| |\ | |/ |/|
| * Merge from head@274682sjg2014-11-195-38/+282
| |\
| * | Updated dependenciessjg2014-05-161-2/+2
| | |
| * | Merge headsjg2014-04-282-22/+47
| |\ \
| * \ \ Merge from headsjg2013-09-054-63/+110
| |\ \ \
| * \ \ \ sync from headsjg2013-04-123-26/+23
| |\ \ \ \
| * | | | | Updated dependenciessjg2013-03-111-0/+2
| | | | | |
| * | | | | Updated dependenciessjg2013-02-161-2/+0
| | | | | |
| * | | | | Sync with HEAD.obrien2013-02-083-57/+144
| |\ \ \ \ \
| * | | | | | Updated/new Makefile.dependsjg2012-11-081-0/+1
| | | | | | |
| | | | | | |
| | \ \ \ \ \
| *-. \ \ \ \ \ Sync from headsjg2012-11-042-3/+3
| |\ \ \ \ \ \ \
| * | | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+27
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | | | | Document RCTL events in devd.conf(5).trasz2015-05-131-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* | | | | | | | Add devd(8) notifications for creation and destruction of GEOM devices.trasz2015-01-141-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Differential Revision: https://reviews.freebsd.org/D1211 MFC after: 1 month Sponsored by: The FreeBSD Foundation
* | | | | | | | Convert sbin/ to LIBADDbapt2014-11-251-2/+1
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | Reduce overlinking
* | | | | | | Misc fixes suggested by Coverity.asomers2014-08-201-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sbin/devd/tests/client_test.c * In the event that popen fails, don't dereference its return value. * Fix array overwrite in the stream and seqpacket tests. * Close sockets at the end of successful ATF tests. Reported by: Coverity scan CID: 1232019, 1232020, 1232029, 1232030 MFC after: 1 week Sponsored by: Spectra Logic
* | | | | | | Remove bogus ; at the end of the if condition in order to unbreak gcc buildsbz2014-08-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after r270004. MFC after: 4 days X-MFX with: r270004
* | | | | | | Convert devd's client socket to type SOCK_SEQPACKET.asomers2014-08-145-38/+276
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. CR: https://reviews.freebsd.org/rS266519 MFC after: 5 days Sponsored by: Spectra Logic
* | | | | | Revert r263694, and apply a better fix to squelch unnecessary warningsdim2014-03-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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++. MFC after: 3 days X-MFC-With: r263694
* | | | | | Update userspace users of hw.bus.devctl_disable.mjg2014-03-261-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes breakage resulting from r263754. Reported by: AN <andy@neu.net> Reviewed by: imp Pointy hat to: me
* | | | | | Apply a temporary band-aid for building devd with clang 3.4, libstdc++dim2014-03-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. MFC after: 3 days
* | | | | | sbin/devd/devd.8asomers2014-03-072-13/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sbin/devd/devd.cc Add a -q flag to devd that will suppress syslog logging at LOG_NOTICE or below. Requested by: ian@ and imp@ MFC after: 3 weeks Sponsored by: Spectra Logic Corporation
* | | | | | sbin/devd/devd.ccasomers2013-12-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Sponsored by: Spectra Logic Corp MFC after: 4 weeks
* | | | | | sbin/devd/devd.ccasomers2013-12-131-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Reviewed by: ian, imp Approved by: ken (mentor) Sponsored by: Spectra Logic Corp MFC after: 4 weeks
* | | | | | devd: lower priority of action execution logging to infoavg2013-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Reviewed by: asomers
* | | | | | devd: fix a typo in a commentavg2013-11-071-1/+1
| |_|_|_|/ |/| | | | | | | | | | | | | | Reviewed by: asomers
* | | | | Correct the printf format specifier for total_events.asomers2013-07-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add __printflike argument checking for devdlog(). Reported by: pjd Approved by: gibbs (co-mentor)
* | | | | Explicitly include <cstdarg> to fix compilation with libc++. It is implicitlyasomers2013-07-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | included by libstdc++. Reported By: Oliver Hartmann Approved by: gibbs (co-mentor, implicit)
* | | | | style(9) fixes, including the removal of page break characters. No functionalasomers2013-07-011-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | changes. Approved by: gibbs (co-mentor)
* | | | | Add a SIGINFO handler to devd. It will send useful statistics to syslog orasomers2013-07-011-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stderr as appropriate. Currently, the only statistic printed is the number of events received. Reviewed by: eadler Approved by: gibbs (co-mentor)
* | | | | Add syslog(3) support to devd(8).asomers2013-07-012-36/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* | | | | Improve compatibility with recent flex from flex.sourceforge.net.jkim2013-05-031-2/+3
| | | | |
* | | | | Prefer using the C++ version of the standard headers. These place theeadler2013-05-021-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | According to devctl(4), clients must read events whole; they may notasomers2013-04-261-1/+1
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | devd: Correct typo in comment.eadler2013-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> Approved by: cperciva (mentor)
* | | | devd: Use simpler dst += *x instead of str.append(x, 1).eadler2013-03-041-6/+6
| | | | | | | | | | | | | | | | | | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> Approved by: cperciva (mentor)
* | | | devd: Use string::empty() instea of string::length() == 0.eadler2013-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> Approved by: cperciva (mentor)
* | | | devd: Remove unnecessary empty default constructors.eadler2013-03-041-2/+0
| | | | | | | | | | | | | | | | | | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> Approved by: cperciva (mentor)
* | | | devd: Remove empty virtual destructor from class, which has noch subclasses.eadler2013-03-041-1/+0
| | | | | | | | | | | | | | | | | | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> Approved by: cperciva (mentor)
* | | | devd: Avoid unnecessary temporary objects (and simplify the code) when ↵eadler2013-03-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | handling std::string. Submitted by: Christoph Mallon <christoph.mallon@gmx.de> Approved by: cperciva (mentor)
* | | | devd: Use the standard constructor of std::string instead of string("").eadler2013-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> Approved by: cperciva (mentor)
* | | | devd: Simplify while (1) { if (x) break; } to while (!x) {}.eadler2013-03-041-3/+1
| | | | | | | | | | | | | | | | | | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> Approved by: cperciva (mentor)
OpenPOWER on IntegriCloud