]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
6 years agoMFC r325386:
kib [Sat, 11 Nov 2017 12:08:07 +0000 (12:08 +0000)]
MFC r325386:
Convert explicit panic() call to assert.

6 years agoMFC r324795:
kib [Fri, 10 Nov 2017 13:17:40 +0000 (13:17 +0000)]
MFC r324795:
Move swapout code into vm/vm_swapout.c.

6 years agoMFC r303627 (by alc):
kib [Fri, 10 Nov 2017 12:54:33 +0000 (12:54 +0000)]
MFC r303627 (by alc):
Restore the historical behavior of "sysctl vm.swap_idle_enabled=1".

6 years agoMFC r324807:
kib [Fri, 10 Nov 2017 12:45:09 +0000 (12:45 +0000)]
MFC r324807:
Take the vm object lock in read mode in vnode_generic_putpages().

6 years agoMFC r324794:
kib [Fri, 10 Nov 2017 12:42:50 +0000 (12:42 +0000)]
MFC r324794:
Do not overwrite clean blocks on pageout.

6 years agoMFC r325567:
kib [Fri, 10 Nov 2017 12:28:43 +0000 (12:28 +0000)]
MFC r325567:
Zero whole struct ptrace_lwpinfo to not leak kernel stack data.

Security: CVE-2017-1086

6 years agoMFC r325355:
ae [Fri, 10 Nov 2017 11:19:33 +0000 (11:19 +0000)]
MFC r325355:
  Use correct pointer in key_updateaddresses() when updating NAT-T config.

  key_updateaddresses() is used to update SA addresses and NAT-T
  configuration in SADB_UPDATE message. This is done using cloning SA
  content from old SA into new one. But addresses and NAT-T configuration
  are taking from SADB_UPDATE message. Use newsa pointer to set NAT-T
  properties into cloned SA.

  PR: 223382

6 years agoMFC r325362:
hselasky [Fri, 10 Nov 2017 08:42:37 +0000 (08:42 +0000)]
MFC r325362:
Allow CUSE(3) to free all memory mapped memory by using regular SWAP objects
instead of malloc(). The SWAP objects are automagically freed when there are no
more consumers. This greatly simplifies the mmap logic inside CUSE(3) in the
kernel. This change fixes an issue where mmapped memory can accumulate and never
get freed, if many different mmap sizes are needed over time. Further this
change fixes memory leaks when the CUSE(3) kernel module is unloaded.

While at it make sure the CUSE_ALLOC_PAGES_MAX limit is treated as an exclusive
limit. CUSE(3) memory maps must be less than CUSE_ALLOC_PAGES_MAX number of pages.

Reviewed by: kib @
Differential Revision: https://reviews.freebsd.org/D11392
Sponsored by: Mellanox Technologies

6 years agoMerge r323509 and r324994 adding Cavium LiquidIO Driver (lio)
sbruno [Thu, 9 Nov 2017 19:52:56 +0000 (19:52 +0000)]
Merge r323509 and r324994 adding Cavium LiquidIO Driver (lio)
to stable/11.

Submitted by: pkanneganti@cavium.com ((Prasad V Kanneganti)
Sponsored by: Cavium Networks
Differential Revision: https://reviews.freebsd.org/D12425

6 years agoMFC r325278:
hselasky [Thu, 9 Nov 2017 19:08:30 +0000 (19:08 +0000)]
MFC r325278:
Unconditionally include "opt_inet6.h" in the LinuxKPI.
This makes sure the INET6 macro gets properly defined,
also for kernel module builds.

Sponsored by: Mellanox Technologies

6 years agoMFC r324792:
hselasky [Thu, 9 Nov 2017 17:58:57 +0000 (17:58 +0000)]
MFC r324792:
The remote DMA TCP portspace selector, RDMA_PS_TCP, is used for both
iWarp and RoCE in ibcore. The selection of RDMA_PS_TCP can not be used
to indicate iWarp protocol use. Backport the proper IB device
capabilities from Linux upstream to distinguish between iWarp and
RoCE. Only allocate the additional socket required for iWarp for RDMA
IDs when at least one iWarp device present. This resolves
interopability issues between iWarp and RoCE in ibcore

Reviewed by: np @
Differential Revision: https://reviews.freebsd.org/D12563
Sponsored by: Mellanox Technologies

6 years agoMFC r324491:
hselasky [Thu, 9 Nov 2017 17:54:00 +0000 (17:54 +0000)]
MFC r324491:
Use common rdma_ip2gid() function instead of custom mlx5_ip2gid() one.

Sponsored by: Mellanox Technologies

6 years agoMFC r324490:
hselasky [Thu, 9 Nov 2017 17:49:45 +0000 (17:49 +0000)]
MFC r324490:
Add support for parsing and using IPv6 addresses in krping.

Sponsored by: Mellanox Technologies

6 years agoMFC r324492:
hselasky [Thu, 9 Nov 2017 17:47:33 +0000 (17:47 +0000)]
MFC r324492:
Make sure the IPv6 scope ID gets zeroed inside the GID. Else searching for a
valid GID entry based on IPv6 addresses can fail.

Sponsored by: Mellanox Technologies

6 years agoMFC r325277:
kib [Wed, 8 Nov 2017 12:13:25 +0000 (12:13 +0000)]
MFC r325277:
Do not run pmclog_configure_log() without pmc_sx protection.

6 years agoMFC r325276:
kib [Wed, 8 Nov 2017 12:11:54 +0000 (12:11 +0000)]
MFC r325276:
Be protective and check the po_file validity before dropping the ref.

6 years agoMFC r325275:
kib [Wed, 8 Nov 2017 12:10:14 +0000 (12:10 +0000)]
MFC r325275:
In hwpmc, do not double-close the logging file.

6 years agoMFC r325274:
kib [Wed, 8 Nov 2017 12:07:01 +0000 (12:07 +0000)]
MFC r325274:
There is no use for dropping Giant in the pmc syscall.

6 years agoMFC r325273:
kib [Wed, 8 Nov 2017 12:03:11 +0000 (12:03 +0000)]
MFC r325273:
Minor style tweaks.

6 years agoMFC r325271:
kib [Wed, 8 Nov 2017 12:00:49 +0000 (12:00 +0000)]
MFC r325271:
Use designated initializers for pmc sysent and module data.

6 years agoMFC r324972:
kib [Wed, 8 Nov 2017 11:47:00 +0000 (11:47 +0000)]
MFC r324972:
Tweaks to the top swap size calculations.

PR: 223149

6 years agoMFC r325285, r325447:
kib [Wed, 8 Nov 2017 11:44:02 +0000 (11:44 +0000)]
MFC r325285, r325447:
Restore an optimization that was temporary disabled by r324665.

6 years agoMFC r325270:
kib [Wed, 8 Nov 2017 11:25:19 +0000 (11:25 +0000)]
MFC r325270:
Consistently ensure that we do not load MXCSR with reserved bits set.

6 years agoMFC r324195: MFV r323795: 8604 Avoid unnecessary work search in VFS when unmounting...
avg [Wed, 8 Nov 2017 09:36:59 +0000 (09:36 +0000)]
MFC r324195: MFV r323795: 8604 Avoid unnecessary work search in VFS when unmounting snapshots

6 years agoMFC r324757: remove spa_sync_on assert from spa_async_thread_vd
avg [Wed, 8 Nov 2017 09:25:32 +0000 (09:25 +0000)]
MFC r324757: remove spa_sync_on assert from spa_async_thread_vd

6 years agoMFC r324197: MFV r323913: 8600 ZFS channel programs - snapshot
avg [Wed, 8 Nov 2017 09:22:04 +0000 (09:22 +0000)]
MFC r324197: MFV r323913: 8600 ZFS channel programs - snapshot

6 years agoMFC r324196: MFV r323912: 8592 ZFS channel programs - rollback
avg [Wed, 8 Nov 2017 09:16:31 +0000 (09:16 +0000)]
MFC r324196: MFV r323912: 8592 ZFS channel programs - rollback

6 years agoMFC r324170: MFV r323794: 8605 zfs channel programs: zfs.exists undocumented and...
avg [Wed, 8 Nov 2017 09:15:09 +0000 (09:15 +0000)]
MFC r324170: MFV r323794: 8605 zfs channel programs: zfs.exists undocumented and non-working

6 years agoMFC r324168: MFV r323531: 8521 nvlist memory leak in get_clones_stat() and spa_load_b...
avg [Wed, 8 Nov 2017 09:11:49 +0000 (09:11 +0000)]
MFC r324168: MFV r323531: 8521 nvlist memory leak in get_clones_stat() and spa_load_best()

6 years agoMFC r324163: MFV r323530,r323533,r323534: 7431 ZFS Channel Programs, and followups
avg [Wed, 8 Nov 2017 08:53:44 +0000 (08:53 +0000)]
MFC r324163: MFV r323530,r323533,r323534: 7431 ZFS Channel Programs, and followups

Also MFC-ed are the following fixes:
- r324164 Add several new files to the files enabled by ZFS kernel option
- r324178 unbreak kernel builds on sparc64 and powerpc
- r324194 fix incorrect use of getzfsvfs_impl in r324163
- r324292 really unbreak kernel builds on sparc64 and powerpc64

6 years agoMFC r325420: lld: accept EINVAL to indicate posix_fallocate is unsupported
emaste [Wed, 8 Nov 2017 00:39:04 +0000 (00:39 +0000)]
MFC r325420: lld: accept EINVAL to indicate posix_fallocate is unsupported

As of r325320 posix_fallocate on a ZFS filesystem returns EINVAL to
indicate that the operation is not supported. (I think this is a strange
choice of errno on the part of POSIX.)

PR: 223383, 223440
Reported by: Mark Millard
Sponsored by: The FreeBSD Foundation

6 years agoMFC r325232
tijl [Tue, 7 Nov 2017 17:07:45 +0000 (17:07 +0000)]
MFC r325232

Set the return address for stack entry points to zero.

Stack unwinders treat zero as a stop condition.  The value on the stack can
be non-zero because thread stacks may be arbitrary memory provided via
pthread_attr_setstack(3) or may be recycled from previous threads.

Reference:
https://lists.freebsd.org/pipermail/freebsd-current/2017-August/066855.html
https://lists.freebsd.org/pipermail/freebsd-current/2017-October/067254.html

Discussed with: kib

6 years agoMFC r325397:
pfg [Tue, 7 Nov 2017 14:25:09 +0000 (14:25 +0000)]
MFC r325397:
ANSI-fy exec_shell_imgact().

Fix a stray space while here.

PR: 223317

6 years agoMFC r325371
ken [Mon, 6 Nov 2017 20:08:00 +0000 (20:08 +0000)]
MFC r325371
  ------------------------------------------------------------------------
  r325371 | ken | 2017-11-03 15:04:22 -0600 (Fri, 03 Nov 2017) | 19 lines

  Add the LTO-8 Type M density code (0x5d, LTO-8M) to libmt and the
  mt(1) man page.

  LTO-8 Type M (also known as M8) is a pristine LTO-7 cartridge
  formatted in a LTO-8 drive in a new, higher density format.  It
  has a separate density code, and is only readable in an LTO-8
  drive.

  lib/libmt/mtlib.c:
   Add the LTO-8 Type M density code to the density table
   in libmt.

  usr.bin/mt/mt.1:
   Add the LTO-8 Type M density code to the density
   table in the mt(1) man page.

  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------

6 years agoMFC r325156:
gjb [Mon, 6 Nov 2017 18:07:23 +0000 (18:07 +0000)]
MFC r325156:
 Set a default hostname for virtual machine images.

Sponsored by: The FreeBSD Foundation

6 years agoDocument issuing 'vagrant up' a second time will boot properly if the
gjb [Mon, 6 Nov 2017 17:27:50 +0000 (17:27 +0000)]
Document issuing 'vagrant up' a second time will boot properly if the
virtual machine does not yet have a MAC address.

PR: 223474 (related)
Sponsored by: The FreeBSD Foundation

6 years agoMFC r325157,325158:
eugen [Mon, 6 Nov 2017 13:56:03 +0000 (13:56 +0000)]
MFC r325157,325158:

  Fix ppp(8) to add RTF_HOST flag to created host route.

Reported by: Mike Tancsa <mike@sentex.net>
Approved by: mav (mentor)

6 years agoMFC r324212:
eugen [Mon, 6 Nov 2017 12:44:26 +0000 (12:44 +0000)]
MFC r324212:

  rsh: introduce new option -N disabling shutdown of socket sending path.

PR: 205144
Approved by: mav (mentor)

6 years agoMFC r324364: ftpd(8): fix user context handling
eugen [Mon, 6 Nov 2017 11:10:43 +0000 (11:10 +0000)]
MFC r324364: ftpd(8): fix user context handling

Apply authenticated user context after update of wtmp(5) at start of session,
so that ftpd process is not killed by kernel with SIGXFSZ when user has
"filesize" limit lower than size of system wtmp file. Same applies
to session finalization: revert to super-user context before update of wtmp.

If ftpd hits limit while writing a file at user request,
do not get killed with SIGXFSZ instantly but apparently ignore the signal,
process error and report it to the user, and continue with the session.

PR: 143570
Approved by: mav (mentor)

6 years agoMFC r324928,r324929:
ngie [Sun, 5 Nov 2017 22:36:02 +0000 (22:36 +0000)]
MFC r324928,r324929:

r324928:

Remove dead stores

The return value of various snprintf calls was stored in `len` and not used
in many functions.

r324929:

Clean up trailing whitespace

6 years agoMFC r324862:
ngie [Sun, 5 Nov 2017 22:33:41 +0000 (22:33 +0000)]
MFC r324862:

Clean up trailing whitespace in kdb_thr_ctx(..)

6 years agoMFC r318432:
bdrewery [Sat, 4 Nov 2017 22:23:41 +0000 (22:23 +0000)]
MFC r318432:

  Fix some nroff syntax in rtld.1.

PR: 223420

6 years agoMFC r325051:
markj [Sat, 4 Nov 2017 16:03:48 +0000 (16:03 +0000)]
MFC r325051:
Remove a stale and incorrect comment.

6 years agoMFC r325050:
markj [Sat, 4 Nov 2017 16:03:06 +0000 (16:03 +0000)]
MFC r325050:
Remove workqueue items after updating the workqueue tail pointer.

6 years agoMFC r325067:
pfg [Sat, 4 Nov 2017 14:49:22 +0000 (14:49 +0000)]
MFC r325067:
bsnmpd: Only refresh devtree if devd event is a new or removed device.

It makes sense to refresh the tree only when a device is inserted or
removed, otherwise bsnmpd needlessly wastes lots of CPU.

PR: 209368

6 years agoMFC r325066:
pfg [Sat, 4 Nov 2017 14:44:07 +0000 (14:44 +0000)]
MFC r325066:
Fix out-of-bounds read in libc/regex.

The bug is an out-of-bounds read detected with address sanitizer that
happens when 'sp' in p_b_coll_elems() includes NUL byte[s], e.g. if it's
equal to "GS\x00". In that case len will be equal to 4, and the
strncmp(cp->name, sp, len) call will succeed when cp->name is "GS" but the
cp->name[len] == '\0' comparison will cause the read to go out-of-bounds.

Checking the length using strlen() instead eliminates the issue.

The bug was found in LLVM with oss-fuzz:
https://reviews.llvm.org/D39380

Obtained from: Vlad Tsyrklevich through posting on openbsd-tech

6 years agoMFC r323547, r323598:
pfg [Sat, 4 Nov 2017 14:35:01 +0000 (14:35 +0000)]
MFC r323547, r323598:
libedit: add missing bracket.

We never hit this because we always build with widechar support.
Raise the warning level to 3.

6 years agoMFC r324824:
kib [Sat, 4 Nov 2017 10:10:34 +0000 (10:10 +0000)]
MFC r324824:
Check that the page which is freed as zeroed, indeed has all-zero content.

6 years agoMFC r325030:
cy [Sat, 4 Nov 2017 05:17:03 +0000 (05:17 +0000)]
MFC r325030:

Remove redundant sys/cdefs.h include.

6 years agoMFC r325017: libnv: Fix strict-aliasing violation with cookie
jilles [Fri, 3 Nov 2017 22:41:31 +0000 (22:41 +0000)]
MFC r325017: libnv: Fix strict-aliasing violation with cookie

In r323851 (MFC'ed to stable/11 as r324831), some casts were adjusted in
calls to nvlist_next() and nvlist_get_pararr() in order to make scan-build
happy. I think these changes just confused scan-build into not reporting
the strict-aliasing violation.

For example, nvlist_xdescriptors() is causing nvlist_next() to write to its
local variable nvp of type nvpair_t * using the lvalue *cookiep of type
void *, which is not allowed. Given the APIs of nvlist_next(),
nvlist_get_parent() and nvlist_get_pararr(), one possible fix is to create a
local void *cookie in nvlist_xdescriptors() and other places, and to convert
the value to nvpair_t * when necessary. This patch implements that fix.

6 years agoMFC: r324774
wulf [Thu, 2 Nov 2017 21:19:17 +0000 (21:19 +0000)]
MFC: r324774
psm(4): Add sanity checks to Synaptics touchpad driver resolution parser.

This fixes "Kernel has only x or y resolution, not both" libinput error.

Reported by: Ivan <bsd@abinet.ru>
Tested by: Ivan <bsd@abinet.ru>
Approved by: gonzo (mentor)

6 years agoMFC: r324770
wulf [Thu, 2 Nov 2017 21:17:05 +0000 (21:17 +0000)]
MFC: r324770
bthidd: Fix leds on multireport keyboards broken after r297217

Reviewed by: emax, gonzo
Approved by: gonzo (mentor)
Differential Revision: https://reviews.freebsd.org/D12214

6 years agoMFC: r324772
wulf [Thu, 2 Nov 2017 21:13:24 +0000 (21:13 +0000)]
MFC: r324772
ums(4): Unreverse evdev Tilt-axis reporting to match Linux.

sysmouse tilt to button mapping remained unchanged.

Reviewed by: hselasky
Approved by: gonzo (mentor)
Differential Revision: https://reviews.freebsd.org/D12671

6 years agoMFC: r324639
rmacklem [Thu, 2 Nov 2017 20:28:53 +0000 (20:28 +0000)]
MFC: r324639
Fix the client IP address reported by nfsdumpstate for 64bit arch and NFSv4.1.

The client IP address was not being reported for some NFSv4 mounts by
nfsdumpstate. Upon investigation, two problems were found for mounts
using IPv4. One was that the code (originally written and tested on i386)
assumed that a "u_long" was a "uint32_t" and would exactly store an
IPv4 host address. Not correct for 64bit arches.
Also, for NFSv4.1 mounts, the field was not being filled in. This was
basically correct, because NFSv4.1 does not use a callback address.
However, it meant that nfsdumpstate could not report the client IP addr.
This patch should fix both of these issues.
For IPv6, the address will still not be reported. The original NFSv4 RFC
only specified IPv4 callback addresses. I think this has changed and, if so,
a future commit to fix reporting of IPv6 addresses will be needed.

6 years agoMFC: r325328
jkim [Thu, 2 Nov 2017 18:30:41 +0000 (18:30 +0000)]
MFC: r325328

Merge OpenSSL 1.0.2m.

6 years agoMFC: r307977
jkim [Thu, 2 Nov 2017 18:27:32 +0000 (18:27 +0000)]
MFC: r307977

Prefer ACFLAGS over CFLAGS for compiling aarch64 assembly files.

6 years agoMFC: r318899
jkim [Thu, 2 Nov 2017 18:22:53 +0000 (18:22 +0000)]
MFC: r318899

Merge OpenSSL 1.0.2l.

6 years agoMFC: r316607 (andrew)
jkim [Thu, 2 Nov 2017 18:20:05 +0000 (18:20 +0000)]
MFC: r316607 (andrew)

Fix linking with lld by marking OPENSSL_armcap_P as hidden.

Linking with lld fails as it contains a relative address, however the data
this address is for may be relocated from the shared object to the main
executable.

Fix this by adding the hidden attribute. This stops moving this value to
the main executable. It seems this is implicit upstream as it uses a
version script.

6 years agoMFC: r307976
jkim [Thu, 2 Nov 2017 18:16:01 +0000 (18:16 +0000)]
MFC: r307976

Build OpenSSL assembly sources for aarch64.

6 years agoMFC r324752: Relax per-ifnet cif_vrs list double locking in carp(4).
mav [Thu, 2 Nov 2017 10:38:09 +0000 (10:38 +0000)]
MFC r324752: Relax per-ifnet cif_vrs list double locking in carp(4).

In all cases where cif_vrs list is modified, two locks are held: per-ifnet
CIF_LOCK and global carp_sx.  It means to read that list only one of them
is enough to be held, so we can skip CIF_LOCK when we already have carp_sx.

This fixes kernel panic, caused by attempts of copyout() to sleep while
holding non-sleepable CIF_LOCK mutex.

6 years agoMFC r325103:
mmel [Thu, 2 Nov 2017 07:09:38 +0000 (07:09 +0000)]
MFC r325103:

  Fix misleading comment.  Not a functional change.

6 years agoMFC r324660:
mmel [Thu, 2 Nov 2017 07:08:13 +0000 (07:08 +0000)]
MFC r324660:

  Save VFP state in getcontext(3) on ARM.  This is a last followup of r315974,
  which fixes userland part of VFP save/restore problems described in PR
  217611.

6 years agoMFC r324996:
kp [Wed, 1 Nov 2017 13:54:16 +0000 (13:54 +0000)]
MFC r324996:

Evaluate packet size after the firewall had its chance in the ip6 fast path

Defer the packet size check until after the firewall has had a look at it. This
means that the firewall now has the opportunity to (re-)fragment an oversized
packet.
This mirrors what the slow path does.

6 years agoMFC r324992:
markj [Wed, 1 Nov 2017 13:50:35 +0000 (13:50 +0000)]
MFC r324992:
Make drain_output() use bufobj_wwait().

6 years agoMFC r324681, r324738
cy [Wed, 1 Nov 2017 01:03:44 +0000 (01:03 +0000)]
MFC r324681, r324738

Anticongestion refinements for ntpd rc script. This checks if ntp
leapfile needs fetching before entering into the anticongestion sleep.

Unfortunately some ports still use their own sleeps so, this commit
doesn't address the complete problem which is compounded by every
port that uses its own anticongestion mechanism.

Discussed with: asomers, feld

6 years agoMFC r324920:
markj [Tue, 31 Oct 2017 15:06:26 +0000 (15:06 +0000)]
MFC r324920:
Fix the VM_NRESERVLEVEL == 0 build.

6 years agoMFC r324923:
markj [Tue, 31 Oct 2017 15:01:52 +0000 (15:01 +0000)]
MFC r324923:
Remove resource_set_*() declarations from sys/bus.h.

PR: 223189

6 years agoMFC r324947:
ae [Tue, 31 Oct 2017 10:31:47 +0000 (10:31 +0000)]
MFC r324947:
  Add IPv6 support for O_TCPDATALEN opcode.

  PR: 222746

6 years agoMFC r324957: iscsi_shutdown_post: do nothing if panic-ing
avg [Tue, 31 Oct 2017 09:58:19 +0000 (09:58 +0000)]
MFC r324957: iscsi_shutdown_post: do nothing if panic-ing

6 years agoMFC r324694: never retry oustanding requests when terminating iscsi session
avg [Tue, 31 Oct 2017 09:56:37 +0000 (09:56 +0000)]
MFC r324694: never retry oustanding requests when terminating iscsi session

6 years agoMFC r324689: iscsi: do not hold the global lock while tearing down a session
avg [Tue, 31 Oct 2017 09:54:41 +0000 (09:54 +0000)]
MFC r324689: iscsi: do not hold the global lock while tearing down a session

6 years agoMFC r324620:
fsu [Mon, 30 Oct 2017 18:03:33 +0000 (18:03 +0000)]
MFC r324620:
Add extended attributes support to fuse kernel module.

Author:         ken
Reviewed by:    cem, pfg (mentor)
Approved by:    pfg (mentor)

Differential Revision: https://reviews.freebsd.org/D12485

6 years agoMFC r325059: import tzdata 2017c
philip [Mon, 30 Oct 2017 15:56:17 +0000 (15:56 +0000)]
MFC r325059: import tzdata 2017c

6 years agoMFC r324425: illumos mutex_init: use SX_NEW instead of bzero
avg [Mon, 30 Oct 2017 10:41:01 +0000 (10:41 +0000)]
MFC r324425: illumos mutex_init: use SX_NEW instead of bzero

6 years agoMFC r324350: zdb.8: replace with the slighly modified upstream version
avg [Mon, 30 Oct 2017 10:39:22 +0000 (10:39 +0000)]
MFC r324350: zdb.8: replace with the slighly modified upstream version

6 years agoMFC r324349: MFV r322235: 8067 zdb should be able to dump literal embedded block...
avg [Mon, 30 Oct 2017 10:37:21 +0000 (10:37 +0000)]
MFC r324349: MFV r322235: 8067 zdb should be able to dump literal embedded block pointer

6 years agoMFC r324348: MFV r316934: 7340 receive manual origin should override automatic origin
avg [Mon, 30 Oct 2017 10:35:03 +0000 (10:35 +0000)]
MFC r324348: MFV r316934: 7340 receive manual origin should override automatic origin

6 years agoMFC r324347: MFV r316933: 5142 libzfs support raidz root pool (loader project)
avg [Mon, 30 Oct 2017 10:32:36 +0000 (10:32 +0000)]
MFC r324347: MFV r316933: 5142 libzfs support raidz root pool (loader project)

FreeBSD note: we have long supported this feature, this commit only
removes a small difference in libzfs.

6 years agoMFC r324346: MFV r316931: 6268 zfs diff confused by moving a file to another directory
avg [Mon, 30 Oct 2017 10:29:26 +0000 (10:29 +0000)]
MFC r324346: MFV r316931: 6268 zfs diff confused by moving a file to another directory

6 years agoMFC r324345: MFV r316877: 7571 non-present readonly numeric ZFS props do not have...
avg [Mon, 30 Oct 2017 09:01:02 +0000 (09:01 +0000)]
MFC r324345: MFV r316877: 7571 non-present readonly numeric ZFS props do not have default value

6 years agoMFC r324344: MFV r316864: 6392 zdb: introduce -V for verbatim import
avg [Mon, 30 Oct 2017 08:58:39 +0000 (08:58 +0000)]
MFC r324344: MFV r316864: 6392 zdb: introduce -V for verbatim import

6 years agoMFC r324343: MFV r316862: 6410 teach zdb to perform object lookups by path
avg [Mon, 30 Oct 2017 08:56:39 +0000 (08:56 +0000)]
MFC r324343: MFV r316862: 6410 teach zdb to perform object lookups by path

6 years agoMFC r324011, r324016: MFV r323535: 8585 improve batching done in zil_commit()
avg [Mon, 30 Oct 2017 08:53:15 +0000 (08:53 +0000)]
MFC r324011, r324016: MFV r323535: 8585 improve batching done in zil_commit()

FreeBSD notes:
- this MFV reverts FreeBSD commit r314549 to make the merge easier
- at present our emulation of cv_timedwait_hires is rather poor,
  so I elected to use cv_timedwait_sbt directly
Please see the differential revision for details.
Unfortunately, I did not get any positive reviews, so there could be
bugs in the FreeBSD-specific piece of the merge.
Hence, the long MFC timeout.

illumos/illumos-gate@1271e4b10dfaaed576c08a812f466f6e81370e5e
https://github.com/illumos/illumos-gate/commit/1271e4b10dfaaed576c08a812f466f6e81370e5e

https://www.illumos.org/issues/8585
  The current implementation of zil_commit() can introduce significant
  latency, beyond what is inherent due to the latency of the underlying
  storage. The additional latency comes from two main problems:
  1. When there's outstanding ZIL blocks being written (i.e. there's
      already a "writer thread" in progress), then any new calls to
      zil_commit() will block waiting for the currently oustanding ZIL
      blocks to complete. The blocks written for each "writer thread" is
      coined a "batch", and there can only ever be a single "batch" being
      written at a time. When a batch is being written, any new ZIL
      transactions will have to wait for the next batch to be written,
      which won't occur until the current batch finishes.
  As a result, the underlying storage may not be used as efficiently
      as possible. While "new" threads enter zil_commit() and are blocked
      waiting for the next batch, it's possible that the underlying
      storage isn't fully utilized by the current batch of ZIL blocks. In
      that case, it'd be better to allow these new threads to generate
      (and issue) a new ZIL block, such that it could be serviced by the
      underlying storage concurrently with the other ZIL blocks that are
      being serviced.
  2. Any call to zil_commit() must wait for all ZIL blocks in its "batch"
      to complete, prior to zil_commit() returning. The size of any given
      batch is proportional to the number of ZIL transaction in the queue
      at the time that the batch starts processing the queue; which
      doesn't occur until the previous batch completes. Thus, if there's a
      lot of transactions in the queue, the batch could be composed of
      many ZIL blocks, and each call to zil_commit() will have to wait for
      all of these writes to complete (even if the thread calling
      zil_commit() only cared about one of the transactions in the batch).

Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: Prakash Surya <prakash.surya@delphix.com>

6 years agoMFC r324926:
kib [Mon, 30 Oct 2017 08:25:24 +0000 (08:25 +0000)]
MFC r324926:
Expand explanation of atomicity.

6 years agoMFC r324868:
markj [Sun, 29 Oct 2017 14:57:58 +0000 (14:57 +0000)]
MFC r324868:
Delete declarations of struct pfs_bitmap, removed in r143841.

6 years agoMFC r324853:
kib [Sun, 29 Oct 2017 09:38:42 +0000 (09:38 +0000)]
MFC r324853:
Remove the support for mknod(S_IFMT), which created dummy vnodes with
VBAD type.

6 years agoSync (make same) the offsetof macro definition in include/ with the
cy [Sun, 29 Oct 2017 04:33:50 +0000 (04:33 +0000)]
Sync (make same) the offsetof macro definition in include/ with the
definition of the same in sys/sys/. The problem was discovered while
working on implementing a new C11 gets_s() for libc. (The new gets_s()
requires rsize_t found in include/stddef.h.) The solution to sync the two
definitions was suggested by ed@ while discussing D12667.

Suggested by: ed

6 years agoMFC 324721: Add references to sysrc(8) to SEE ALSO.
se [Sat, 28 Oct 2017 07:06:30 +0000 (07:06 +0000)]
MFC 324721: Add references to sysrc(8) to SEE ALSO.
MFC 324823: Mention sysrc(8) as scripting interface for config files.

6 years agoMFC r316304 (by tychon):
kib [Fri, 27 Oct 2017 15:33:26 +0000 (15:33 +0000)]
MFC r316304 (by tychon):
Reorder includes to placate MIPS build.

Reported and tested by: David Wolfskill

6 years agoMFC r324804:
markj [Fri, 27 Oct 2017 14:24:35 +0000 (14:24 +0000)]
MFC r324804:
Avoid the nbp lookup in the final loop iteration in flushbuflist().

6 years agoMFC r324809:
markj [Fri, 27 Oct 2017 14:22:56 +0000 (14:22 +0000)]
MFC r324809:
Free the right address range if kmem_back() fails in memguard_alloc().

6 years agoMFC r324793:
kib [Fri, 27 Oct 2017 08:53:09 +0000 (08:53 +0000)]
MFC r324793:
In vm_page_free_phys_pglist(), do not take vm_page_queue_free_mtx if
there is nothing to do.

6 years agoMFC r320481:
bdrewery [Fri, 27 Oct 2017 04:38:42 +0000 (04:38 +0000)]
MFC r320481:

  Store a 32-bit PT_LWPINFO struct for 32-bit process core dumps.

6 years agoMFC r314914:
ian [Thu, 26 Oct 2017 22:19:28 +0000 (22:19 +0000)]
MFC r314914:

Release all previously allocated resources.

6 years agoMFC r323692,r323710,r323714,r324628,r324629,r324635,r324636,r324637
tijl [Thu, 26 Oct 2017 17:45:01 +0000 (17:45 +0000)]
MFC r323692,r323710,r323714,r324628,r324629,r324635,r324636,r324637

Merge Linux emulation changes to support newer Linux libdrm.

6 years agoMFC r324281:
asomers [Wed, 25 Oct 2017 22:25:32 +0000 (22:25 +0000)]
MFC r324281:

Display rotation rate and TRIM/UNMAP support in diskinfo(8)

Bump __FreeBSD_version due to the expansion of struct diocgattr_arg.

Reviewed by: mav, allanjude, imp
Relnotes: yes
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D12578

6 years agoMFC: r324506
rmacklem [Wed, 25 Oct 2017 19:27:12 +0000 (19:27 +0000)]
MFC: r324506
Fix forced dismount when a pNFS mount is hung on a DS.

When a "pnfs" NFSv4.1 mount is hung because of an unresponsive DS,
a forced dismount wouldn't work, because the RPC socket for the DS
was not being closed. This patch fixes this.
This will only affect "pnfs" mounts where the pNFS server's DS
is unresponsive (crashed or network partitioned or...).
Found during testing of the pNFS server.

6 years agoMFC r324223:
asomers [Wed, 25 Oct 2017 15:18:09 +0000 (15:18 +0000)]
MFC r324223:

MFV r319743:   8108 zdb -l fails to read labels 2 and 3

illumos/illumos-gate@22c8b9583d07895c16549075a53668d7bc988cf3
https://github.com/illumos/illumos-gate/commit/22c8b9583d07895c16549075a53668d7bc988cf3

https://www.illumos.org/issues/8108

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Yuri Pankov <yuri.pankov@nexenta.com>

6 years agoMFC r324222:
asomers [Wed, 25 Oct 2017 15:15:09 +0000 (15:15 +0000)]
MFC r324222:

MFV r316863: 3871 fix issues introduced by 3604

illumos/illumos-gate@de05b58863498b10283637eb9ac85e92fe85150e
https://github.com/illumos/illumos-gate/commit/de05b58863498b10283637eb9ac85e92fe85150e

https://www.illumos.org/issues/3871
  GCC 4.5.3 on Gentoo Linux did not like a few of the changes made in the issue
  3604 patch. It printed an error and a couple of warnings:
  ../../cmd/zdb/zdb.c: In function 'dump_bpobj':
  ../../cmd/zdb/zdb.c:1257:3: error: 'for' loop initial declarations are only
  allowed in C99 mode
  ../../cmd/zdb/zdb.c:1257:3: note: use option -std=c99 or -std=gnu99 to compile
  your code
  ../../cmd/zdb/zdb.c: In function 'dump_deadlist':
  ../../cmd/zdb/zdb.c:1323:8: warning: too many arguments for format
  ../../cmd/zdb/zdb.c:1323:8: warning: too many arguments for format

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Richard Yao <ryao@gentoo.org>

6 years agoMFC r324221:
asomers [Wed, 25 Oct 2017 15:11:08 +0000 (15:11 +0000)]
MFC r324221:

MFV r316861: 6866 zdb -l should return non-zero if it fails to find any label

illumos/illumos-gate@64723e361134b2a2c45341334174f9d34002f8d0
https://github.com/illumos/illumos-gate/commit/64723e361134b2a2c45341334174f9d34002f8d0

https://www.illumos.org/issues/6866
  Need this for #6865.
  To be generally more scripting-friendly, overload this issue with adding '-q'
  option which should skip printing any label information.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Yuri Pankov <yuri.pankov@nexenta.com>