Commit Graph

244248 Commits

Author SHA1 Message Date
Kyle Evans
490e13c140 bectl(8): Add a "check" command
This command simply returns 0 at the moment and explicitly takes no
arguments. This should be used by utilities wanting to see if bectl can
operate on the system they're running, or with a specific root (`bectl -r`).
It may grow more checks than "will libbe successfully init" in the future,
but for now this is enough as that checks for the dataset mounted at "/" and
that it looks capable of being a BE root (e.g. it's not a top-level dataset)

bectl commands can now specify if they want to be silent, and this will turn
off libbe_print_on_error so they can control the output as needed. This is
already used in `bectl check`, and may be turned on in the future for some
other commands where libbe errors are better suppressed as the failure mode
may be obvious.

Requested by:	David Fullard
MFC after:	3 days
2019-09-11 13:27:10 +00:00
Ed Maste
2eb6ef203a linux: add trivial renameat2 implementation
Just return EINVAL if flags != 0.  The Linux man page documents one
case of EINVAL as "The filesystem does not support one of the flags in
flags."

After r351723 userland binaries will try using new system calls.

Reported by:	mjg
Reviewed by:	mjg, trasz
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D21590
2019-09-11 13:01:59 +00:00
Ed Maste
65ab1fdd21 regen linuxulator sysent after r352208 2019-09-11 12:58:53 +00:00
Ed Maste
427b1baec0 make linux_renameat2 args consistent with linux_renameat
Use 'dfd' consistently for a directory fd.
2019-09-11 12:58:06 +00:00
Hans Petter Selasky
4c8ba7d94f Use true and false when dealing with bool type in the LinuxKPI.
No functional change.

MFC after:		1 week
Sponsored by:		Mellanox Technologies
2019-09-11 08:24:47 +00:00
Hans Petter Selasky
16732c193c Fix synchronous work drain issue in the LinuxKPI.
A work callback may restart itself. Loop in the drain function to see if the
work has been rescheduled and stop the subsequent reschedules, if any.

MFC after:		1 week
Sponsored by:		Mellanox Technologies
2019-09-11 08:20:13 +00:00
Hans Petter Selasky
6575da5eef Fix broken DECLARE_TASKLET() macro after r347852.
MFC after:		1 week
Sponsored by:		Mellanox Technologies
2019-09-11 07:53:49 +00:00
Baptiste Daroussin
96c81c97e4 Readd _el_fn_sh_complete for backward compatibility
This function is not needed anymore, it allows old sh binary to continue
to run and avoid breaking backward compatibility.
Note that is now just calls the regular _el_fn_complete which does a proper
job at quoting.

Discussed with:	jilles
2019-09-11 07:03:17 +00:00
Alexander Motin
07f7e4c8b0 Fix assumptions of only one device per SES slot.
It is typical to have one, but no longer true for multi-actuator HDDs
with separate LUN for each actuator.

MFC after:	4 days
Sponsored by:	iXsystems, Inc.
2019-09-11 03:25:30 +00:00
Alexander Motin
5b7145c6d4 Remove struct ata_res_pass16, unneeded after r352082.
MFC after:	4 days
2019-09-10 23:51:46 +00:00
Jason Helfman
9ecaaee305 - fix a minor typo
PR:		240447
Submitted by:	brigadir15@gmail.com
MFC after:	1 week
2019-09-10 22:44:09 +00:00
Jung-uk Kim
d010d1fb82 Remove unnecessary entries from the previous commit. 2019-09-10 22:24:42 +00:00
Ian Lepore
192122bd62 In am335x_dmtpps, use a spin mutex to interlock between PPS capture and PPS
ioctl(2) handling.  This allows doing the pps_event() work in the polling
routine, instead of using a taskqueue task to do that work.

Also, add PNPINFO, and switch to using make_dev_s() to create the cdev.

Using a spin mutex and calling pps_event() from the polling function works
around the situation which requires more than 2 sets of timecounter
timehands in a single-core system to get reliable PPS capture.  That problem
would happen when a single-core system is idle in cpu_idle() then gets woken
up with an event timer event which was scheduled to handle a hardclock tick.
That processing path would end up calling tc_windup 3 or 4 times between
when the tc polling function was called and when the taskqueue task would
eventually run, and with only two sets of timehands, the th_generation count
would always be too old to allow the captured PPS data to be used.
2019-09-10 22:08:34 +00:00
Toomas Soome
e7da26b6ca loader: vidconsole should set LINES and COLUMNS
Set LINES and COLUMNS based on terminal dimensions.
2019-09-10 21:53:42 +00:00
Kyle Evans
90a2541772 lualoader: Revert to ASCII menu frame for serial console
The box drawing characters we use aren't necessarily safe with a serial
console; for instance, in the report by npn@, these were causing his xterm
to send back a sequence that lua picked up as input and halted the boot.
This is less than ideal.

Fallback to ASCII frames for console with 'comconsole' in it.  This is a
partial revert r338108 by imp@ -- instead of removing the menu entirely and
disabling color/cursor sequences, just reverting the default frame to ASCII
is enough to not break in this setup.

Reported by:	npn
Triaged and recommended by:	tsoome
2019-09-10 21:30:38 +00:00
Jung-uk Kim
da327cd22e Merge OpenSSL 1.1.1d. 2019-09-10 21:08:17 +00:00
Mariusz Zaborski
a0ddf79987 gnop: Fix initial value for the wdelayprob
Reported by:	Chuck Silvers <chuq@chuq.com>
2019-09-10 20:27:44 +00:00
Mateusz Guzik
b088a4d6f9 cache: avoid excessive relocking on entry removal during lookup
Due to lock ordering issues (bucket lock held, vnode locks wanted) the code
starts with trylocking which in face of contention often fails. Prior to
the change it would loop back with a possible yield.

Instead note we know what locks are needed and can take them in the right
order, avoiding retries. Then we can safely re-lookup and see if the entry
we are looking for is still there.

On a 104-way box poudriere would result in constant retries during an 11h
run as seen in the vfs.cache.zap_and_exit_bucket_fail counter.

before: 408866592
after :         0

However, a new stat reports:
vfs.cache.zap_and_exit_bucket_relock_success: 32638

Note this is only a bandaid over current design issues.

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
2019-09-10 20:19:29 +00:00
Mateusz Guzik
a6cacb0dca cache: change the formula for calculating lock array sizes
It used to be mp_ncpus * 64, but this gives unnecessarily big values for small
machines and at the same time constraints bigger ones. In particular this helps
on a 104-way box for which the count is now doubled.

While here make cache_purgevfs less likely. Currently it is not efficient in
face of contention due to lock ordering issues. These are fixable but not worth
it at the moment.

Sponsored by:	The FreeBSD Foundation
2019-09-10 20:11:00 +00:00
Mateusz Guzik
1214618c05 cache: assorted cleanups
Sponsored by:	The FreeBSD Foundation
2019-09-10 20:08:24 +00:00
Jeff Roberson
c75757481f Replace redundant code with a few new vm_page_grab facilities:
- VM_ALLOC_NOCREAT will grab without creating a page.
 - vm_page_grab_valid() will grab and page in if necessary.
 - vm_page_busy_acquire() automates some busy acquire loops.

Discussed with:	alc, kib, markj
Tested by:	pho (part of larger branch)
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D21546
2019-09-10 19:08:01 +00:00
Leandro Lupori
8024ba45db Add powerpc support to libkvm probe function
PowerPC kernels are of DYN type, instead of EXEC.

Reviewed by:	jhibbits
Differential Revision:	https://reviews.freebsd.org/D21583
2019-09-10 18:46:32 +00:00
Jeff Roberson
4cdea4a853 Use the sleepq lock rather than the page lock to protect against wakeup
races with page busy state.  The object lock is still used as an interlock
to ensure that the identity stays valid.  Most callers should use
vm_page_sleep_if_busy() to handle the locking particulars.

Reviewed by:	alc, kib, markj
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D21255
2019-09-10 18:27:45 +00:00
Warner Losh
d461d3e760 Remove dirs (and their now-empty parents) empty since r344779 2019-09-10 17:51:22 +00:00
Warner Losh
6c755cc965 Remove dir empty since r327952 2019-09-10 17:50:00 +00:00
Warner Losh
860d07ca8c Remove dir empty since r314564 2019-09-10 17:49:18 +00:00
Warner Losh
5924bae58a Remove dirs empty since r280031 2019-09-10 17:47:38 +00:00
Warner Losh
05ab952439 Remove dir empty since r276851 2019-09-10 17:46:30 +00:00
Jung-uk Kim
fbc3ad1ae1 Import OpenSSL 1.1.1d. 2019-09-10 17:40:53 +00:00
Warner Losh
25f0912629 Remove empty directory after r297894 2019-09-10 17:31:06 +00:00
Warner Losh
6e59adfc69 Remove empty dir after r342815 (pt 2, oops) 2019-09-10 17:30:05 +00:00
Warner Losh
7739455701 Remove empty dir after r288683 2019-09-10 17:26:46 +00:00
Warner Losh
5ee86a55ab Remove empty dir after r342815 2019-09-10 17:26:20 +00:00
Warner Losh
549c42974c Remove dir empty since r214734 2019-09-10 17:20:24 +00:00
Warner Losh
afec47a165 Remove dirs empty since r336203 2019-09-10 17:19:43 +00:00
Warner Losh
3b22b506a8 Remove directory empty after r266735 2019-09-10 16:58:19 +00:00
Warner Losh
c1cbf34577 Remove empty directory after r215937 2019-09-10 16:57:35 +00:00
Warner Losh
378bae1108 Remove empty directory after r342871 2019-09-10 16:56:43 +00:00
Warner Losh
6e4e1edcd3 Remove empty directory imported with r342935 2019-09-10 16:53:16 +00:00
Warner Losh
ce722c43b8 Remove empty directory imported with r238438 2019-09-10 16:51:52 +00:00
Warner Losh
1c0024964e Remove now-empty directory after r288337 2019-09-10 16:50:38 +00:00
Warner Losh
74db7f684e Remove now-empty directories after r272458 2019-09-10 16:48:49 +00:00
Warner Losh
f30470c0d5 Remove gateworks directories left over from r336136 2019-09-10 16:43:05 +00:00
Warner Losh
c8507dc49a Remove empty tap/tun modules directories after r347241 2019-09-10 16:41:00 +00:00
Warner Losh
51af865e84 Remove leftover usr.bin/send-pr after r338042 2019-09-10 16:40:00 +00:00
Warner Losh
074b27b765 Remove empty directory after r342256 2019-09-10 16:38:52 +00:00
Warner Losh
9cfd6d607c Remove empty directory aftre r336532 2019-09-10 16:37:32 +00:00
Warner Losh
3bc8cf0273 Remove more directories left over from nand removal 2019-09-10 16:36:09 +00:00
Warner Losh
ceca434baa Remove empty directories after drm removal 2019-09-10 16:35:31 +00:00
Warner Losh
68156f9d2a Remove empty directories left over from nand removal 2019-09-10 16:30:06 +00:00