r358192 mjg Feb. 21, 2020, 1:44 a.m.
Duplicating the work was putting an avoidable requirement that the filedesc
lock is held across the entire operation (otherwise by the time audit reads
vnode pointers another thread in the same process can chdir somewhere else,
making audit log things using different vnode than the one which will be
used for actual lookup).

Do the obvious thing and pass down vnodes which will be used.
ViewVC
r358191 mjg Feb. 21, 2020, 1:40 a.m.
r358190 mjg Feb. 21, 2020, 1:40 a.m.
r358189 mjg Feb. 21, 2020, 1:39 a.m.
r358187 vangyzen Feb. 20, 2020, 11:53 p.m.
If the configured compression level for kernel dumps
it outside the supported range, clamp it to the closest
supported level.  Previously, dumpon would fail.

zstd already does this internally, so the compressor
needs no change.

Reviewed by:	cem markj
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D23765
ViewVC
r358186 vangyzen Feb. 20, 2020, 11:47 p.m.
Update the man page to mention that extending a file with truncate(2)
is required by POSIX as of 2008.

Reviewed by:	bcr
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D23354
ViewVC
r358183 bcran Feb. 20, 2020, 9:29 p.m.
Since we don't set opterr to 0, getopt prints a message when it
encounters an unknown/invalid option. We therefore don't need to
print our own message in the default handler.

Reviewed by:	kevans, theraven
Differential Revision:	https://reviews.freebsd.org/D23662
ViewVC
r358182 kib Feb. 20, 2020, 9:25 p.m.
PR:	244250
Reported and tested by:	lwhsu
Sponsored by:	The FreeBSD Foundation
ViewVC
r358181 csjp Feb. 20, 2020, 9:12 p.m.
Currently, the size of the swap device is unconditionally reported using
  blocks, even if -h has been used.
- While here, switch to CONVERT_BLOCKS() instead of CONVERT() which will
  avoid overflowing size counters (in human readable form see: r196244)
- Update the column headers to reflect that a size is being reported instead
  of the block size units being used

Before:

$ swapinfo
Device          1K-blocks     Used    Avail Capacity
/dev/gpt/swapfs   1048576        0  1048576     0%
$

After:

$ swapinfo -h
Device           Size     Used    Avail Capacity
/dev/gpt/swapfs    1.0G       0B     1.0G     0%
$

Differential Revision:	https://reviews.freebsd.org/D23758
Reviewed by:	kevans
MFC after:	3 weeks
ViewVC
r358180 vmaffione Feb. 20, 2020, 9:07 p.m.
This patch adds a new netbe_peek_recvlen() function to the net
backend API. The new function allows the virtio-net receive code
to know in advance how many virtio descriptors chains will be
needed to receive the next packet. As a result, the implementation
of the virtio-net mergeable rx buffers feature becomes efficient,
so that we can enable it also with the tap(4) backend. For the
tap(4) backend, a bounce buffer is introduced to implement the
peeck_recvlen() callback, which implies an additional packet copy
on the receive datapath. In the future, it should be possible to
remove the bounce buffer (and so the additional copy), by
obtaining the length of the next packet from kevent data.

Reviewed by:    grehan, aleksandr.fedorov@itglobal.com
MFC after:      1 week
Differential Revision:	https://reviews.freebsd.org/D23472
ViewVC
r358178 kp Feb. 20, 2020, 5:26 p.m.
When we register an interrupt handler we need to pass the intr_type along in
bus_setup_intr().

The interrupt type matters because it is used to decide if we need to enter
NET_EPOCH. That meant that vtmmio-based if_vtnet did not, which led to panics
with INVARIANTS set.

Sponsored by:	Axiado
ViewVC
r358177 manu Feb. 20, 2020, 5:20 p.m.
This function test if the string str begins with the string pointed
at by prefix.

Reviewed by:	hselasky
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D23767
ViewVC
r358176 manu Feb. 20, 2020, 5:19 p.m.
This function just test if the element is the first of the list.

Reviewed by:	hselasky
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D23766
ViewVC
r358175 kib Feb. 20, 2020, 5:10 p.m.
r358174 kib Feb. 20, 2020, 5:08 p.m.