History log of /freebsd-10-stable/sbin/devd/devd.cc
Revision Date Author Comments
# 321827 31-Jul-2017 asomers

MFC r320165-r320166

r320165:
devd(8): Remove pidfile on shutdown

Sponsored by: Spectra Logic Corp

r320166:
Require devd to be running for its ATF tests to run

The ATF tests communicate with the system's running devd

PR: 220169
Reported by: gjb
Sponsored by: Spectra Logic Corp


# 314425 28-Feb-2017 asomers

MFC r311572, r311895, r311928, r311985, r312395, r312417

r311572:
Fix file descriptor leaks in cmp(1)

Also, add a few test cases

Reported by: Coverity
CID: 271624 275338
Reviewed by: ngie
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D9074

r311895:
Fix memory leaks during "tail -r" of an irregular file

* Rewrite r_buf to use standard tail queues instead of a hand-rolled
circular linked list. Free dynamic allocations when done.
* Remove an optimization for the case where the file is a multiple of 128KB
in size and there is a scarcity of memory.
* Add ATF tests for "tail -r" and its variants.

Reported by: Valgrind
Reviewed by: ngie
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D9067

r311928:
Fix build of usr.bin/tail with GCC

Submitted by: pluknet
Reported by: pluknet
MFC after: 27 days
X-MFC-with: 311895
Sponsored by: Spectra Logic Corp

r311985:
Fix uninitialized variable CIDs in route6d

The variables in question are actually return arguments, but it's still good
form to initialize them.

Reported by: Coverity
CID: 979679 979680
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

r312395:
Fix several Coverity CIDs in devd

CID 1362055, 1362054: File descriptor leaks during shutdown
CID 1362013: Potential null-termination fail with long network device names
CID 1362097: Uncaught exception during memory pressure
CID 1362017, 1362016: Unchecked errors, possibly resulting in weird behavior
if two devd instances start at the same time.
CID 1362015: Unchecked error that will probably never fail

Reported by: Coverity
CID: 1362055 1362054 1362013 1362097 1362017 1362016 1362015
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

r312417:
Fix build of devd with GCC 4.2

Reported by: olivier
Pointy-hat-to: asomers
MFC after: 27 days
X-MFC-with: 312395
Sponsored by: Spectra Logic Corp


# 293695 11-Jan-2016 asomers

MFC r292020

Increase devd's client socket buffer size to 256KB. This is not as large as
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.


# 293290 06-Jan-2016 bdrewery

MFC r289677:

Fix a ton of speelling errors


# 270242 20-Aug-2014 asomers

MFC devd-related changes

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


# 263963 31-Mar-2014 mjg

MFC r263758:
Update userspace users of hw.bus.devctl_disable.

This switches the code to use hw.bus.devctl_queue instead.


# 263880 28-Mar-2014 asomers

MFC r262914

sbin/devd/devd.8
sbin/devd/devd.cc
Add a -q flag to devd that will suppress syslog logging at
LOG_NOTICE or below.


# 260519 10-Jan-2014 asomers

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


# 270242 20-Aug-2014 asomers

MFC devd-related changes

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


# 263963 31-Mar-2014 mjg

MFC r263758:
Update userspace users of hw.bus.devctl_disable.

This switches the code to use hw.bus.devctl_queue instead.


# 263880 28-Mar-2014 asomers

MFC r262914

sbin/devd/devd.8
sbin/devd/devd.cc
Add a -q flag to devd that will suppress syslog logging at
LOG_NOTICE or below.


# 260519 10-Jan-2014 asomers

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