SVNews

NOTE: This service is experimental and subject to change! Use at your own risk!

Year:   Month: - or - Filter committers: - or -
Filter paths:
Include diffs if smaller than lines.

2017 - 07 - 27   (today)
16:40:14 - r321625
( 10 minutes ago)
by kib
Affects:  /head/sys/kern/subr_pctrie.c
/head/sys/sys/pctrie.h
Make the number of children for pctrie node available outside subr_pctrie.c.

Reviewed by: alc, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
X-Differential revision: https://reviews.freebsd.org/D11435
15:59:36 - r321624
( 51 minutes ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/errata/article.xml
Add an errata entry to reflect an incorrect attribution for r315330.

Reported by: Jim Thompson
Sponsored by: The FreeBSD Foundation
15:51:56 - r321623
( 58 minutes ago)
by ken
Affects:  /head/sys/dev/isp/isp.c
Remove duplicate assignments from r321622.

Submitted by: mav
MFC after: 3 days
Sponsored by: Spectra Logic
15:33:57 - r321622
(1 hour 16 minutes ago)
by ken
Affects:  /head/sys/dev/isp/isp.c
Fix probing FC targets with hard addressing turned on.

This largely reverts FreeBSD SVN change 289937 from October 25th, 2015.

The intent of that change was to keep loop IDs persistent across
chip reinits.

The problem is that the change turned on the PREVLOOP /
PREV_ADDRESS bit (bit 7 in Firmware Options 2), which tells the
Qlogic chip to not participate in the loop if it can't get the
requested loop address. It also turned off soft addressing on 2400
(4Gb) and newer controllers.

The isp(4) driver defaults to loop address 0, and the tape drives
I have tested default to loop address 0 if hard addressing is turned
on. So when hard loop addressing is turned on on the drive, the isp(4)
driver just refuses to participate in the loop.

The solution is to largely revert that change. I left some elements
in place that are related to virtual ports, since they were new.

This does work with IBM tape drives with hard and soft addressing
turned on. I have tested it with 4Gb, 8Gb, and 16Gb controllers.

sys/dev/isp.c:
  Largely revert FreeBSD SVN change 289937. I left the
  ispmbox.h changes in place.

  Don't use the PREV_ADDRESS bit on initialization. It tells
  the chip to not participate if it can't get the requested
  loop ID.

  Do use soft addressing on 2400 and newer chips.

  Use hard addressing when the user has requested a specific
  initiator ID. (hint.isp.X.iid=N in /boot/loader.conf)

  Leave some of the virtual port options from that change in
  place, but don't turn on the PREV_ADDRESS bit.

Reviewed by: mav
MFC after: 3 days
Sponsored by: Spectra Logic
15:06:34 - r321621
(1 hour 44 minutes ago)
by andrew
Affects:  /head/sys/boot/efi/libefi/efinet.c
Always set the receive mask in loader.efi. Some UEFI implementations set
this to be too restrictive. We need to have both broadcast and unicast
enabled for loader to work. Set them in all cases to ensure this is true.

This allows the Cavium ThunderX 2s in the netperf cluster to netboot using
a USB NIC.

PR: 221001
Reviewed by: emaste, tsoome
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D11732
14:34:57 - r321620
(2 hours 15 minutes ago)
by mav
Affects:  /head/usr.bin/w/w.c
Fix singular/plural "users" output.

It was broken during libxo'fication.

PR: 221039
Submitted by: timur@
MFC after: 1 week
13:37:21 - r321619
(3 hours 13 minutes ago)
by gjb
Affects:  /head/release/arm/BANANAPI.conf
/head/release/arm/CUBIEBOARD2.conf
Bump the image size for BANANAPI and CUBIEBOARD2 to 1.5G, as
1G is no longer large enough.

Reported by: manu
Sponsored by: The FreeBSD Foundation
13:03:36 - r321618
(3 hours 47 minutes ago)
by bz
Affects: 
(11 files)
/head/sys/*
/head/usr.bin/netstat/*
After inpcb route caching was put back in place there is no need for
flowtable anymore (as flowtable was never considered to be useful in
the forwarding path).

Reviewed by: np
Differential Revision: https://reviews.freebsd.org/D11448
12:37:18 - r321617
(4 hours 13 minutes ago)
by emaste
Affects: 
(2 files)
/stable/11/usr.sbin/acpi/acpidump/acpi.c
revert r321601, it depends on an ACPICA update not yet merged
12:29:31 - r321616
(4 hours 21 minutes ago)
by emaste
Affects:  /head/Makefile
genericize target exclusion for missing external toolchain

Previously we excluded riscv from make universe / tinderbox if the
required xtoolchain package was not installed. Make that logic generic
so that we can loop over multiple architectures, in preparation to test
patches to have other architectures rely on external toolchain.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D11652
10:52:36 - r321615
(5 hours 58 minutes ago)
by mav
Affects: 
(2 files)
/stable/11/usr.sbin/fstyp/Makefile
MFC r320152 (by avg): fstyp: move sys/ include path after zfs include paths

The reason is that FreeBSD refcount.h shadows ZFS refcount.h and that
will lead to a build error after a planned import of the ARC buf data
scatter-ization.
It's possible that some day we will have an opposite problem where
a ZFS header would shadow an essential FreeBSD header.
So, we need to think about a better long term solution.
10:30:55 - r321614
(6 hours 19 minutes ago)
by mav
Affects: 
(4 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_file.h
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c
MFC r320352: zfs: port vdev_file part of illumos change 3306

3306 zdb should be able to issue reads in parallel
illumos/illumos-gate/31d7e8fa33fae995f558673adb22641b5aa8b6e1
https://www.illumos.org/issues/3306

The upstream change was made before we started to import upstream commits
individually. It was imported into the illumos vendor area as r242733.
That commit was MFV-ed in r260138, but as the commit message says
vdev_file.c was left intact.

This commit actually implements the parallel I/O for vdev_file using a
taskqueue with multiple thread. This implementation does not depend on
the illumos or FreeBSD bio interface at all, but uses zio_t to pass
around all the relevent data. So, the code looks a bit different from
the upstream.

This commit also incorporates ZoL commit
zfsonlinux/zfs/bc25c9325b0e5ced897b9820dad239539d561ec9 that fixed
https://github.com/zfsonlinux/zfs/issues/2270
We need to use a dedicated taskqueue for exactly the same reason as ZoL
as we do not implement TASKQ_DYNAMIC.

Obtained from: illumos, ZFS on Linux
10:29:29 - r321613
(6 hours 21 minutes ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
MFC r320239: MFV r319950:
5220 L2ARC does not support devices that do not provide 512B access

FreeBSD note: the actual change has been in FreeBSD since r297848. This
commit accounts for integration of that change with subsequent changes,
especially r320156 (MFV of r318946) and r314274.

illumos/illumos-gate@403a8da73c64ff9dfb6230ba045c765a242213fb
https://github.com/illumos/illumos-gate/commit/403a8da73c64ff9dfb6230ba045c765a242213fb

https://www.illumos.org/issues/5220
  There are disk devices that have logical sector size larger than 512B, for
  example 4KB. That is, their physical sector size is larger than 512B and they
  do not provide emulation for 512B sector sizes. For such devices both a data
  offset and a data size must be properly aligned. L2ARC should arrange that
  because it uses physical I/O.
  zio_vdev_io_start() performs a necessary transformation if io_size is not
  aligned to vdev_ashift, but that is done only for logical I/O. Something
  similar should be done in L2ARC code.
  * a temporary write buffer should be allocated if the original buffer is
  not going to be compressed and its size is not aligned
  * size of a temporary compression buffer should be ashift aligned
  * for the reads, if a size of a target buffer is not sufficiently large
and
  it is not aligned then a temporary read buffer should be allocated

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: Andriy Gapon <avg@FreeBSD.org>
10:28:07 - r321612
(6 hours 22 minutes ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
MFC r320238: MFV r319742: 8056 zfs send size estimate is inaccurate for some
zvols

illumos/illumos-gate@0255edcc85fc0cd1dda0e49bcd52eb66c06a1b16
https://github.com/illumos/illumos-gate/commit/0255edcc85fc0cd1dda0e49bcd52eb66c06a1b16

https://www.illumos.org/issues/8056
  The send size estimate for a zvol can be too low, if the size of the record
  headers (dmu_replay_record_t's) is a significant portion of the size.
  This is typically the case when the data is highly compressible, especially
  with embedded blocks.
  The problem is that dmu_adjust_send_estimate_for_indirects() assumes that
  blocks are the size of the "recordsize" property (128KB).
  However, for zvols, the blocks are the size of the "volblocksize" property
  (8KB). Therefore, we estimate that there will be 16x less record headers than
  there really will be.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Paul Dagnelie <pcd@delphix.com>
10:26:58 - r321611
(6 hours 23 minutes ago)
by mav
Affects: 
(3 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
MFC r320237: MFV r318947: 7578 Fix/improve some aspects of ZIL writing.

FreeBSD note: this commit removes small differences between what mav
committed to FreeBSD in r308782 and what ended up committed to illumos
after addressing all review comments.

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

https://www.illumos.org/issues/7578
  After some ZIL changes 6 years ago zil_slog_limit got partially broken
  due to zl_itx_list_sz not updated when async itx'es upgraded to sync.
  Actually because of other changes about that time zl_itx_list_sz is not
  really required to implement the functionality, so this patch removes
  some unneeded broken code and variables.
  Original idea of zil_slog_limit was to reduce chance of SLOG abuse by
  single heavy logger, that increased latency for other (more latency critical)
  loggers, by pushing heavy log out into the main pool instead of SLOG. Beside
  huge latency increase for heavy writers, this implementation caused double
  write of all data, since the log records were explicitly prepared for SLOG.
  Since we now have I/O scheduler, I've found it can be much more efficient
  to reduce priority of heavy logger SLOG writes from ZIO_PRIORITY_SYNC_WRITE
  to ZIO_PRIORITY_ASYNC_WRITE, while still leave them on SLOG.
  Existing ZIL implementation had problem with space efficiency when it
  has to write large chunks of data into log blocks of limited size. In some
  cases efficiency stopped to almost as low as 50%. In case of ZIL stored on
  spinning rust, that also reduced log write speed in half, since head had to
  uselessly fly over allocated but not written areas. This change improves
  the situation by offloading problematic operations from z*_log_write() to
  zil_lwb_commit(), which knows real situation of log blocks allocation and
  can split large requests into pieces much more efficiently. Also as side
  effect it removes one of two data copy operations done by ZIL code WR_COPIED
  case.
  While there, untangle and unify code of z*_log_write() functions.
  Also zfs_log_write() alike to zvol_log_write() can now handle writes crossing
  block boundary, that may also improve efficiency if ZPL is made to do that.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Reviewed by: Steven Hartland <steven.hartland@multiplay.co.uk>
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Alexander Motin <mav@FreeBSD.org>
10:25:18 - r321610
(6 hours 25 minutes ago)
by mav
Affects: 
(42 files)
/stable/11/cddl/contrib/opensolaris/*
/stable/11/sys/cddl/contrib/opensolaris/*
/stable/11/sys/conf/files
MFC r320156, r320185, r320186, r320262, r320452, r321111:
MFV r318946: 8021 ARC buf data scatter-ization

illumos/illumos-gate@770499e185d15678ccb0be57ebc626ad18d93383
https://github.com/illumos/illumos-gate/commit/770499e185d15678ccb0be57ebc626ad1
8d93383

https://www.illumos.org/issues/8021
  The ARC buf data project (known simply as "ABD" since its genesis in the ZoL
  community) changes the way the ARC allocates `b_pdata` memory from using linea
r
  `void *` buffers to using scatter/gather lists of fixed-size 1KB chunks. This
  improves ZFS's performance by helping to defragment the address space occupied
  by the ARC, in particular for cases where compressed ARC is enabled. It could
  also ease future work to allocate pages directly from `segkpm` for minimal-
  overhead memory allocations, bypassing the `kmem` subsystem.
  This is essentially the same change as the one which recently landed in ZFS on
  Linux, although they made some platform-specific changes while adapting this
  work to their codebase:
  1. Implemented the equivalent of the `segkpm` suggestion for future work
  mentioned above to bypass issues that they've had with the Linux kernel memory
  allocator.
  2. Changed the internal representation of the ABD's scatter/gather list so it
  could be used to pass I/O directly into Linux block device drivers. (This
  feature is not available in the illumos block device interface yet.)

FreeBSD notes:
- the actual (default) chunk size is 4KB (despite the text above saying 1KB)
- we can try to reimplement ABDs, so that they are not permanently
  mapped into the KVA unless explicitly requested, especially on
  platforms with scarce KVA
- we can try to use unmapped I/O and avoid intermediate allocation of a
  linear, virtual memory mapped buffer
- we can try to avoid extra data copying by referring to chunks / pages
  in the original ABD

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Prashanth Sreenivasa <pks@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Chris Williamson <chris.williamson@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Dan Kimmel <dan.kimmel@delphix.com>
10:19:13 - r321609
(6 hours 31 minutes ago)
by mav
Affects: 
(4 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
MFC r320153: revert r315852 which introduced zio_buf_alloc_nowait for use
in vdev_queue_aggregate

I think that the change is still good, but reconciling it with a planned
merge of the ARC buf data scatter-ization is a bit more tedious
than I can handle.
08:37:07 - r321608
(8 hours 13 minutes ago)
by kib
Affects:  /head/lib/libc/x86/sys/__vdso_gettc.c
Use MFENCE to serialize RDTSC on non-Intel CPUs.

Kernel already used the stronger barrier instruction for AMDs, correct
the userspace fast gettimeofday() implementation as well.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D11728
08:33:31 - r321607
(8 hours 17 minutes ago)
by kib
Affects:  /head/libexec/rtld-elf/rtld.c
Allow to specify targets by absolute paths in libmap.conf.

Submitted by: Tatu Kilappa <tatu.kilappa@iki.fi>
PR: 221032
MFC after: 2 weeks
07:28:29 - r321606
(9 hours 22 minutes ago)
by mav
Affects:  /head/sys/cam/ata/ata_da.c
adaasync(): Set ADA_STATE_WCACHE based on ADA_FLAG_CAN_WCACHE

The attached patch lets adaasync() set ADA_STATE_WCACHE based on
ADA_FLAG_CAN_WCACHE instead of ADA_FLAG_CAN_RAHEAD.

This fixes a regression introduced in r300207 which changed
the flag names.

PR: 220948
Submitted by: Fabian Keil <fk@fabiankeil.de>
Obtained from: ElectroBSD
MFC after: 1 week
06:26:15 - r321605
(10 hours 24 minutes ago)
by cy
Affects:  /head/contrib/ipfilter/arc4random.c
As in r315225, discard 3072 bytes of RC4 bytestream instead of 1024.

PR: 217920
Submitted by: codarren@hackers.mu
Reviewed by: emaste, cem
Approved by: so (implicit, in r315225)
MFC after: 1 week
Differential Revision: D11747
Patterned after: r315225
05:31:48 - r321604
(11 hours 19 minutes ago)
by scottl
Affects:  /head/usr.sbin/mpsutil/mps_cmd.c
Fix some broken logic used in obtaining the certain config pages. I'm
surprised that this even pretended to work.

PR: 215793
Submitted by: longwitz@incore.de
02:53:18 - r321603
(13 hours 57 minutes ago)
by emaste
Affects:  /head/sys/dev/uart/uart_bus_pci.c
uart: add AX99100 chipset support

PR: 215837
Submitted by: joe@thrallingpenguin.com
MFC after: 2 weeks
02:38:53 - r321602
(14 hours 12 minutes ago)
by loos
Affects:  /head/sys/dev/etherswitch/e6000sw/e6000sw.c
/head/sys/dev/etherswitch/e6000sw/e6000swreg.h
Fix the port vlan support in e6000 based switches.

Reduce the use of local copies of switch register data.

The switch now works with the upstream dsa node (i.e. the upstream DTS).

Tested on: ClearFog Pro (88E6176), SG-3100 (88E6141)
Sponsored by: Rubicon Communications, LLC (Netgate)
00:30:13 - r321601
(16 hours 20 minutes ago)
by emaste
Affects: 
(2 files)
/stable/11/usr.sbin/acpi/acpidump/acpi.c
MFC r321299: acpidump: add GIC ITS srat type

From ACPI 6.2, 5.2.16.5

Sponsored by: The FreeBSD Foundation
00:29:03 - r321600
(16 hours 21 minutes ago)
by emaste
Affects: 
(2 files)
/stable/11/usr.sbin/acpi/acpidump/acpi.c
MFC r321294: acpidump: use C99 designated initializers

Submitted by: Guangyuan Yang <yzgyyang@outlook.com>
Sponsored by: The FreeBSD Foundation
00:25:52 - r321599
(16 hours 25 minutes ago)
by emaste
Affects: 
(2 files)
/stable/11/sys/conf/kern.pre.mk
MFC r321302: add arm64 objcopy output target for embedfs

PR: 220877
Submitted by: David NewHamlet
00:14:08 - r321598
(16 hours 36 minutes ago)
by rmacklem
Affects: 
(2 files)
/stable/11/usr.sbin/nfsd/nfsv4.4
MFC: r321248
Update the nfsv4 man page to reflect recent changes to support
the newer RFCs (5661 and 7530). The main man changes are for the
case of "numbers in strings" for user/groups that RFC7530 allows
and avoids use of nfsuserd(8).

This is a content change.
00:04:09 - r321597
(16 hours 46 minutes ago)
by rmacklem
Affects: 
(2 files)
/stable/10/usr.sbin/nfsd/nfsv4.4
MFC: r321248
Update the nfsv4 man page to reflect recent changes to support
the newer RFCs (5661 and 7530). The main man changes are for the
case of "numbers in strings" for user/groups that RFC7530 allows
and avoids use of nfsuserd(8).

This is a content change.
2017 - 07 - 26   (yesterday)
23:23:33 - r321596
(17 hours 27 minutes ago)
by emaste
Affects: 
(3 files)
/stable/11/sys/conf/files.amd64
/stable/11/sys/conf/files.i386
MFC r319513: linux vdso: pass -fPIC to the assembler, not linker

-fPIC has no effect on linking although it seems to be ignored by
GNU ld.bfd. However, it causes ld.lld to terminate with an invalid
argument error.

This is equivalent to r296057 but for the kernel (not modules) case.

Sponsored by: The FreeBSD Foundation
23:21:28 - r321595
(17 hours 29 minutes ago)
by emaste
Affects: 
(2 files)
/stable/11/usr.sbin/makefs/makefs.h
MFC r316055: makefs: sort roundup with the other off_t members in fsinfo_t
23:18:14 - r321594
(17 hours 32 minutes ago)
by emaste
Affects: 
(2 files)
/stable/11/Makefile.libcompat
MFC r312857: Use cross-NM (XNM) in compat32 build

An attempt to build mips64 using external toolchain failed as it tried
to use the host amd64 nm.
23:14:21 - r321593
(17 hours 36 minutes ago)
by emaste
Affects: 
(2 files)
/stable/11/sys/libkern/arm64/crc32c_armv8.S
MFC r319718: arm64: add ".arch armv8-a+crc" to allow use of crc instructions

With Clang 5.0 the .arch directive is required, otherwise Clang
complains "error: instruction requires: crc".

This was reported in D10499 but not added initially, because clang 3.8
available on a ref machine reported unknown directive. Clang 4.0 allows
but does not require the directive.

Sponsored by: The FreeBSD Foundation
23:05:25 - r321592
(17 hours 45 minutes ago)
by emaste
Affects: 
(2 files)
/stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c
MFC r321218: zfs: Fix a typo in the delay_min_dirty_percent sysctl description

The description is FreeBSD-specific and was added in r266497
to fix PR189865.

PR: 220825
Submitted by: Fabian Keil
Obtained from: ElectroBSD
23:03:21 - r321591
(17 hours 47 minutes ago)
by emaste
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c
MFC r321218: zfs: Fix a typo in the delay_min_dirty_percent sysctl description

The description is FreeBSD-specific and was added in r266497
to fix PR189865.

PR: 220825
Submitted by: Fabian Keil
Obtained from: ElectroBSD
22:32:57 - r321590
(18 hours 17 minutes ago)
by markj
Affects:  /projects/numa2/sys/vm/vm_page.c
Let vm_page_alloc_domain() return NULL even when v_free_count is large.

The selected domain may be exhausted even when plenty of free pages are
available. Until we have a policy for handling local page shortages, just
return NULL to signal that an allocation from a different domain should
be attempted.
22:04:23 - r321589
(18 hours 46 minutes ago)
by marius
Affects: 
(4 files)
/head/sys/dev/sdhci/*
- Check the slot type capability, set SDHCI_SLOT_{EMBEDDED,NON_REMOVABLE}
  for embedded slots. Fail in the sdhci(4) initialization for slot type
  shared, which is completely unsupported by this driver at the moment. [1]
  For Intel eMMC controllers, taking the embedded slot type into account
  obsoltes setting SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE so remove these quirk
  entries.
- Hide the 1.8 V VDD capability when the slot is detected as non-embedded,
  as the SDHCI specification explicitly states that 1.8 V VDD is applicable
  to embedded slots only. [2]
- Define some easy bits of the SDHCI specification v4.20. [3]
- Don't leak bus_dma(9) resources in failure paths of sdhci_init_slot().

Obtained from: DragonFlyBSD 65704a46 [1], 7ba10b88 [2], 0df14648 [3]
21:59:37 - r321588
(18 hours 51 minutes ago)
by marius
Affects:  /head/sys/dev/mmc/mmc.c
Correctly use the size of a pointer rather than that of a pointer to a
pointer.

Reported by: Coverity
CID: 1378432
21:23:09 - r321587
(19 hours 27 minutes ago)
by emaste
Affects:  /head/sys/netinet/cc/cc_cubic.c
cc_cubic: restore braces around if-condition block

r307901 was reverted in r321480, restoring an incorrect block
delimitation bug present in the original cc_cubic commit. Restore
only the bugfix (brace addition) from r307901.

CID: 1090182
Approved by: sbruno
21:20:57 - r321586
(19 hours 29 minutes ago)
by ian
Affects:  /head/sys/arm/freescale/imx/imx_i2c.c
Add a debug sysctl that lets you see i2c bus traffic through this device.
21:09:10 - r321585
(19 hours 41 minutes ago)
by ngie
Affects: 
(100 files)
/projects/runtime-coverage/*
MFhead@r321584
21:06:26 - r321584
(19 hours 44 minutes ago)
by ian
Affects:  /head/sys/dev/iicbus/iicbus.h
/head/sys/dev/iicbus/iiconf.c
Add support for tracking nested calls to iicbus_request/release_bus().

Usually it is sufficient to use iicbus_transfer_excl(), or one of the
higher-level convenience functions that use it, to reserve the bus for the
duration of each register access. Occasionally it is important that a
series of accesses or read-modify-write operations must be done without any
other intervening access to the device, to prevent corrupting state.

Without support for nested request/release, slave device drivers would have
to stop using high-level convenience functions and resort to working with
arrays of iic_msg structs just for a few operations (often involving
one-time device setup or infrequent configuration changes).

The changes here appear large from a glance at the diff, but in fact they're
nearly trivial, and the large diff is because of changes in indentation and
the re-wrapping of comments caused by that. One notable change is that
iicbus_release_bus() now ignores the IICBUS_CALLBACK(IIC_RELEASE_BUS) return
value. The old error handling left the bus in a kind of limbo state where
it was still owned at the iicbus layer, but drivers rarely check the return
of the release call, and it's unclear what they would do to recover from an
error return anyway. No existing low-level drivers return any kind of error
from IIC_RELEASE_BUS except one EINVAL for "you don't own the bus", to which
the right response is probably to carry on with the process of releasing the
reference to the bus anyway.
20:40:24 - r321583
(20 hours 10 minutes ago)
by ian
Affects:  /head/sys/dev/iicbus/iiconf.c
/head/sys/dev/iicbus/iiconf.h
Add a pair of convenience routines for doing simple "register" read/writes
on i2c devices, where the "register" can be any length.

Many (perhaps most) common i2c devices are organized as a collection of
(usually 1-byte-wide) registers, and are accessed by first writing a 1-byte
register index/offset number, then by reading or writing the data.
Generally there is an auto-increment feature so the when multiple bytes
are read or written, multiple contiguous registers are accessed.

Most existing slave device drivers allocate an array of iic_msg structures,
fill in all the transfer info, and invoke iicbus_transfer(). These new
functions commonize all that and reduce register access to a simple call
with a few arguments.
20:20:58 - r321582
(20 hours 29 minutes ago)
by np
Affects: 
(4 files)
/head/sys/dev/cxgbe/common/*
/head/sys/dev/cxgbe/t4_main.c
/head/sys/dev/cxgbe/t4_sge.c
cxgbe(4): Some updates to the common code.

- Updated register ranges.
- Helper routines for access to TP registers.
- Updated routine to read flash parameters.

Obtained from: Chelsio Communications
MFC after: 2 weeks
Sponsored by: Chelsio Communications
20:07:05 - r321581
(20 hours 43 minutes ago)
by kib
Affects: 
(4 files)
/head/sys/fs/*
/head/sys/vm/*
Mark pages after EOF as clean after pageout.

Suppose that a file on NFS has partially filled last page, and this
page is dirty. NFS VOP_PAGEOUT() method only marks the the page clean
up to the block of the last written byte, leaving other blocks dirty.
Also any page which erronously exists in the vnode vm_object past EOF
is also left marked as dirty.

With the introduction of the buf-cache coherent pager, each pass of
syncer over the object with such page results in creation of B_DELWRI
buffer due to VOP_WRITE() call. This buffer is noted on next syncer
pass, which results e.g. a visible manifestation of shutdown never
finishing vnode sync. Note that before buf-cache coherency commit, a
dirty page might left never synced to server if a partial writes
occur.

Fix this by clearing dirty bits after EOF. Only blocks of the partial
page which are completely after EOF are marked clean, to avoid
possible user data loss.

Reported by: mav
Reviewed by: alc, markj
Tested by: mav, pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D11697
20:01:31 - r321580
(20 hours 49 minutes ago)
by kib
Affects:  /head/sys/fs/nfsclient/nfs_clbio.c
Move rtvals initialization out of the region protected by NFS node
lock.

Noted by: alc
Reviewed by: alc, markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
X-Differential revision: https://reviews.freebsd.org/D11697
19:01:15 - r321579
(21 hours 49 minutes ago)
by mav
Affects: 
(3 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
MFC r319953: MFV r319951: 8311 ZFS_READONLY is a little too strict

illumos/illumos-gate@2889ec41c05e9ffe1890b529b3111354da325aeb
https://github.com/illumos/illumos-gate/commit/2889ec41c05e9ffe1890b529b3111354d
a325aeb

https://www.illumos.org/issues/8311
  Description:
  There was a misunderstanding about the enforcement details of the "Read-only"
  flag introduced for SMB/CIFS compatibility, way back in 2007 in the Sun PSARC
  2007/315 case.
  The original authors thought enforcement of the READONLY flag should work
  similarly as the IMMUTABLE flag. Unfortunately, that enforcement is
  incompatible with the expectations of Windows applications using this feature
  through the SMB service. Applications assume (and the MS File System Algorithm
s
  MS-FSA confirms they should) that an SMB client can:
  (a) Open an SMB handle on a file with read/write access,
  (b) Set the DOS attributes to include the READONLY flag,
  (c) continue to have write access via that handle.
  This access model is essentially the same as a Unix/POSIX application that
  creates a file (with read/write access), uses fchmod() to change the file mode
  to something not granting write access (i.e. 0444), and then continues to writ
e
  that file using the open handle it got before the mode change.
  Currently, the SMB server works-around this problem in a way that will become
  difficult to maintain as we implement support for SMB3 persistent handles, so
  SMB depends on this fix.
  I've written a test program that can be used to demonstrate this problem, and
  added it to zfs-tests (tests/functional/acl/cifs/cifs_attr_004_pos).
  It currently fails, but will pass when this problem fixed.
  Steps to Reproduce:
  Run the test program on a ZFS file system.
  Expected Results:
  Pass
  Actual Results:
  Fail.

Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Approved by: Prakash Surya <prakash.surya@delphix.com>
Author: Gordon Ross <gwr@nexenta.com>
17:48:37 - r321578
(23 hours 2 minutes ago)
by mav
Affects: 
(7 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
MFC r319949: MFV r319948: 5428 provide fts(), reallocarray(), and strtonum()

illumos/illumos-gate@4585130b259133a26efae68275dbe56b08366deb
https://github.com/illumos/illumos-gate/commit/4585130b259133a26efae68275dbe56b08366deb

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

Most of the upstream change is not applicable to FreeBSD.
Only the renaming of strtonum to zfs_strtonum is relevant to us.
And we already had it partially done.

Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Joshua M. Clulow <josh@sysmgr.org>
Author: Yuri Pankov <yuri.pankov@nexenta.com>
17:47:32 - r321577
(23 hours 3 minutes ago)
by mav
Affects: 
(5 files)
/stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
/stable/11/cddl/contrib/opensolaris/lib/libzfs_core/common/*
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
MFC r319947: MFV r319945,r319946: 8264 want support for promoting datasets in
libzfs_core

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

https://www.illumos.org/issues/8264
  Oddly there is a lzc_clone function, but no lzc_promote function.

Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan McDonald <danmcd@kebe.com>
Approved by: Dan McDonald <danmcd@kebe.com>
Author: Andrew Stormont <astormont@racktopsystems.com>
17:46:06 - r321576
(23 hours 4 minutes ago)
by mav
Affects: 
(2 files)
/stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
MFC r319751: MFV r319740: 8168 NULL pointer dereference in zfs_create()

illumos/illumos-gate@690031d326342fa4ea28b5e80f1ad6a16281519d
https://github.com/illumos/illumos-gate/commit/690031d326342fa4ea28b5e80f1ad6a16281519d

https://www.illumos.org/issues/8168
  If we manage to export the pool on which we are creating a dataset (filesystem
  or zvol) between entering libzfs`zfs_create() and libzfs`zpool_open() call
(for
  which we never check the return value) we end up dereferencing a NULL pointer
  in libzfs`zpool_close().
  This was discovered on ZFS on Linux. The same issue can be reproduced on
  Illumos running in parallel:
  while :; do zpool import -d /tmp testpool ; zpool export testpool ; done
  while :; do zfs create testpool/fs; zfs destroy testpool/fs ; done
  Eventually this will result in several core dumps like this one:
  [root@52-54-00-d3-7a-01 /cores]# mdb core.zfs.4244
  Loading modules: [ libumem.so.1 libc.so.1 libtopo.so.1 libavl.so.1
  libnvpair.so.1 ld.so.1 ]
  > ::stack
  libzfs.so.1`zpool_close+0x17(0, 0, 0, 8047450)
  libzfs.so.1`zfs_create+0x1bb(8090548, 8047e6f, 1, 808cba8)
  zfs_do_create+0x545(2, 8047d74, 80778a0, 801, 0, 3)
  main+0x22c(8047d2c, fef5c6e8, 8047d64, 8055a17, 3, 8047d70)
  _start+0x83(3, 8047e64, 8047e68, 8047e6f, 0, 8047e7b)
  >
  Fix and reproducer (systemtap): https://github.com/zfsonlinux/zfs/pull/6096

Reviewed by: Matt Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: loli10K <ezomori.nozomu@gmail.com>
17:45:09 - r321575
(23 hours 5 minutes ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
MFC r319750: MFV r319741: 8156 dbuf_evict_notify() does not need dbuf_evict_lock

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

https://www.illumos.org/issues/8156
  dbuf_evict_notify() holds the dbuf_evict_lock while checking if it should do
  the eviction itself (because the evict thread is not able to keep up).
  This can result in massive lock contention.
  It isn't necessary to hold the lock, because if we make the wrong choice
  occasionally, nothing bad will happen.

Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>
17:44:22 - r321574
(23 hours 6 minutes ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c
MFC r319749: MFV r319739: 8005 poor performance of 1MB writes on certain RAID-Z
configuration
s

illumos/illumos-gate@5b062782532a1d5961c4a4b655906e1238c7c908
https://github.com/illumos/illumos-gate/commit/5b062782532a1d5961c4a4b655906e123
8c7c908

https://www.illumos.org/issues/8005
  RAID-Z requires that space be allocated in multiples of P+1 sectors,
  because this is the minimum size block that can have the required amount
  of parity. Thus blocks on RAIDZ1 must be allocated in a multiple of 2
  sectors; on RAIDZ2 multiple of 3; and on RAIDZ3 multiple of 4. A sector
  is a unit of 2^ashift bytes, typically 512B or 4KB.
  To satisfy this constraint, the allocation size is rounded up to the
  proper multiple, resulting in up to 3 "pad sectors" at the end of some
  blocks. The contents of these pad sectors are not used, so we do not
  need to read or write these sectors. However, some storage hardware
  performs much worse (around 1/2 as fast) on mostly-contiguous writes
  when there are small gaps of non-overwritten data between the writes.
  Therefore, ZFS creates "optional" zio's when writing RAID-Z blocks that
  include pad sectors. If writing a pad sector will fill the gap between
  two (required) writes, we will issue the optional zio, thus doubling
  performance. The gap-filling performance improvement was introduced in
  July 2009.
  Writing the optional zio is done by the io aggregation code in
  vdev_queue.c. The problem is that it is also subject to the limit on
  the size of aggregate writes, zfs_vdev_aggregation_limit, which is by
  default 128KB. For a given block, if the amount of data plus padding
  written to a leaf device exceeds zfs_vdev_aggregation_limit, the
  optional zio will not be written, resulting in a ~2x performance
  degradation.
  The problem occurs only for certain values of ashift, compressed block
  size, and RAID-Z configuration (number of parity and data disks). It
  cannot occur with the default recordsize=128KB. If compression is
  enabled, all configurations with recordsize=1MB or larger will be
  impacted to some degree.
  The problem notably occurs with recordsize=1MB, compression=off, with 10
  disks in a RAIDZ2 or RAIDZ3 group (with 512B or 4KB sectors). Therefore

Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>
17:42:43 - r321573
(23 hours 8 minutes ago)
by mav
Affects: 
(6 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
MFC r319748: MFV r319738: 8155 simplify dmu_write_policy handling of
pre-compressed buffers

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

https://www.illumos.org/issues/8155
  When writing pre-compressed buffers, arc_write() requires that the compression
  algorithm used to compress the buffer matches the compression algorithm
  requested by the zio_prop_t, which is set by dmu_write_policy().
  This makes dmu_write_policy() and its callers a bit more complicated.
  We can simplify this by making arc_write() trust the caller to supply the type
  of pre-compressed buffer that it wants to write, and override the compression
  setting in the zio_prop_t.

Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>
17:40:13 - r321572
(23 hours 10 minutes ago)
by mav
Affects: 
(2 files)
/stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7
MFC r319672 (by allanjude):
New sentences start on new lines, fix two violations
17:39:10 - r321571
(23 hours 11 minutes ago)
by andrew
Affects:  /head/sys/arm64/arm64/trap.c
Pass the last exception trap frame to kdb_trap. This allows show registers
in ddb to show the traps registers, and not the registers from within the
panic call.

Sponsored by: DARPA, AFRL
17:38:29 - r321570
(23 hours 12 minutes ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h
MFC r318945: MFV r318944: 8265 Reserve send stream flag for large dnode feature

illumos/illumos-gate@bc83969fdbd1cb0d97ba00218c0a3de5c89fba92
https://github.com/illumos/illumos-gate/commit/bc83969fdbd1cb0d97ba00218c0a3de5c
89fba92

https://www.illumos.org/issues/8265
  Reserve bit 23 in the zfs send stream flags for the large
  dnode feature which has been implemented for Linux.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Brian Behlendorf <behlendorf1@llnl.gov>
17:36:58 - r321569
(23 hours 13 minutes ago)
by markj
Affects: 
(2 files)
/stable/11/usr.sbin/crashinfo/crashinfo.sh
MFC r321228:
Allow matches of truncated version strings.
17:36:30 - r321568
(23 hours 14 minutes ago)
by mav
Affects: 
(3 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
MFC r318935: MFV r318934: 8070 Add some ZFS comments

illumos/illumos-gate@40713f2b249d289022c715107b3951055a63aef0
https://github.com/illumos/illumos-gate/commit/40713f2b249d289022c715107b3951055a63aef0

https://www.illumos.org/issues/8070
  Add some ZFS comments left by various developers at different times

Reviewed by: Yuri Pankov <yuri.pankov@gmail.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Alan Somers <asomers@gmail.com>
17:35:52 - r321567
(23 hours 15 minutes ago)
by mav
Affects: 
(9 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
MFC r318932: MFV r318931: 8063 verify that we do not attempt to access inactive
txg

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

https://www.illumos.org/issues/8063
  A standard practice in ZFS is to keep track of "per-txg" state. Any of
  the 3 active TXG's (open, quiescing, syncing) can have different values
  for this state. We should assert that we do not attempt to modify other
  (inactive) TXG's.

Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>
17:35:03 - r321566
(23 hours 15 minutes ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
MFC r318930: MFV r318929: 7786 zfs`vdev_online() needs better notification
about state changes

illumos/illumos-gate@5f368aef86387d6ef4eda84030ae9b402313ee4c
https://github.com/illumos/illumos-gate/commit/5f368aef86387d6ef4eda84030ae9b402313ee4c

https://www.illumos.org/issues/7786
  Currently, vdev_online() will only post sysevent if previous state was
  "offline". It should also post the event when the state changes from "removed"
  or "faulted" to "healthy" or "degraded".
  This will fix the following scenario:
  - pull disk from slot A
  - check that hotspare has taken its place (if available)
  - insert disk into slot B
  - check that hotspare moved back to "avail" state (if spare was used)
  The problem here is that we don't get any ESC_ZFS_VDEV_* notification and fail
  to update the vdev FRU.

Reviewed by: Matthew Ahrens mahrens@delphix.com
Reviewed by: George Wilson george.wilson@delphix.com
Approved by: Albert Lee <trisk@forkgnu.org>
Author: Yuri Pankov <yuri.pankov@nexenta.com>
17:12:53 - r321565
(23 hours 38 minutes ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
MFC r318928: MFV r318927: 8025 dbuf_read() creates unnecessary zio_root() for
bonus buf

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

https://www.illumos.org/issues/8025
  dbuf_read() creates a zio_root() to track and wait for all the zio's
  that may happen as part of this call. However, if the blkptr_t for
  this buffer is NULL or a hole, we will not create any more zio's, so
  this zio_root() is unnecessary. This is always the case when calling
  dbuf_read() on a bonus buffer, because it has no blkptr (it's part of
  the containing dnode). For workloads that read a lot of bonus buffers
  (e.g. file creation and removal), creating and destroying these
  unnecessary zio's can decrease performance by around 3%.

Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Prashanth Sreenivasa <pks@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>
16:58:01 - r321564
(23 hours 52 minutes ago)
by mav
Affects:  /stable/11
MFC r318926: MFV r316919: 7885 zpool list can report 16.0e for expandsz

FreeBSD note: this is a record-only change, the actual change was
directly committed by smh.

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

https://www.illumos.org/issues/7885
  When a member of a RAIDZ has been replaced with a device smaller than the
  original, then the top level vdev can report its expand size as 16.0E.
  The reduced child asize causes the RAIDZ to have a vdev_asize lower than its
  vdev_max_asize which then results in an underflow during the calculation of
the
  parents expand size.
  Also for RAIDZ vdevs the sum of their child vdev_min_asize could be smaller
  than the parents vdev_min_size.
  Fixed by: https://github.com/openzfs/openzfs/pull/296

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
Author: Steven Hartland <steven.hartland@multiplay.co.uk>
16:57:17 - r321563
(23 hours 53 minutes ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
MFC r318925: MFV r316929: 6914 kernel virtual memory fragmentation leads to hang

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

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

FreeBSD note: only a ZFS part of the change is merged, changes to the VM
subsystem are not ported (obviously). Also, now that FreeBSD has
vmem(9) we don't have to ifdef-out the code that uses it.
16:55:07 - r321562
(23 hours 55 minutes ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
MFC r318924 (by avg):
arc_init: make code closer to upstream by introducing 'allmem' variable

All the differences in calculations are kept.
A comment about arc_max being 1/2 of all memory is fixed to reflect the
actual code that uses 5/8 as a factor.
16:53:39 - r321561
(23 hours 57 minutes ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
MFC r318923: zfs_putpages: assert that sa_bulk_update() must succeed

Same as the upstream does in r316927.
16:52:24 - r321560
(23 hours 58 minutes ago)
by mav
Affects:  /stable/11
MFC r318922: MFV r316927: 5379 modifying a mmap()-ed file does not update its
timestamps

FreeBSD note: this is a record-only merge as the FreeBSD putpages code
is quite different from the upstream.

illumos/illumos-gate@80e10fd0d22bbf0d18bfdae035e06f44c68ae8e6
https://github.com/illumos/illumos-gate/commit/80e10fd0d22bbf0d18bfdae035e06f44c68ae8e6

https://www.illumos.org/issues/5379
  The following is based on a review of the illumos code and on a similar
problem
  reported for FreeBSD where the relevant code is different.
  Looking at this block of code http://src.illumos.org/source/xref/illumos-gate/
  usr/src/uts/common/fs/zfs/zfs_vnops.c#4187 I see code to set up an
  sa_bulk_attr_t object, I see code to set up mtime and ctime values, but I do
  not see code to actually apply the attributes...
  I would expect there to be a call to sa_bulk_update(), there is such a call in
  zfs_write() for instance.
  mmap_write.c [Magnifier] - demo (1.42 KB) Andriy Gapon, 2015-11-11 01:53 PM

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prashanth Sreenivasa <pks@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
Author: Andriy Gapon <andriy.gapon@clusterhq.com>
16:50:55 - r321559
(23 hours 59 minutes ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
MFC r318921: MFV r316928: 7256 low probability race in zfs_get_data

illumos/illumos-gate@0c94e1af6784c69a1dea25e0e35dd13b2b91e2e5
https://github.com/illumos/illumos-gate/commit/0c94e1af6784c69a1dea25e0e35dd13b2b91e2e5

https://www.illumos.org/issues/7256
  error = dmu_sync(zio, lr->lr_common.lrc_txg,
  zfs_get_done, zgd);
  ASSERT(error || lr->lr_length <= zp->z_blksz);
  It's possible, although extremely rare, that the zfs_get_done() callback is
  executed before dmu_sync() returns.
  In that case the znode's range lock is dropped and the znode is unreferenced.
  Thus, the assertion can access some invalid or wrong data via the zp pointer.
  size variable caches the correct value of z_blksz and can be safely used here.

Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Andriy Gapon <andriy.gapon@clusterhq.com>
16:50:15 - r321558
(1 day ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c
MFC r318920: MFV r316924: 8061 sa_find_idx_tab can be declared more type-safely

illumos/illumos-gate@7f0bdb4257bb4f1f76390b72665961e411da24c6
https://github.com/illumos/illumos-gate/commit/7f0bdb4257bb4f1f76390b72665961e411da24c6

https://www.illumos.org/issues/8061
  sa_find_idx_tab() is declared as taking and returning "void *" parameters.
  These can be declared to be the specific types.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Chris Williamson <chris.williamson@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>
16:49:27 - r321557
(1 day ago)
by mav
Affects:  /stable/11
MFC r318834: MFV r316930: 5814 bpobj_iterate_impl(): Close a refcount leak
iterating on a sublist.

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

https://www.illumos.org/issues/5814
  Lets pull in this patch from freebsd:
  http://svnweb.freebsd.org/base?view=revision&revision=271781
  bpobj_iterate_impl(): Close a refcount leak iterating on a sublist.
  If bpobj_space() returned non-zero here, the sublist would have been
  left open, along with the bonus buffer hold it requires. This call
  does not invoke any calls to bpobj_close() itself.
  This bug doesn't have any known vector, but was found on inspection.
  MFC after: 1 week
  Sponsored by: Spectra Logic
  Affects: All ZFS versions starting 21 May 2010 (illumos cde58dbc)
  MFSpectraBSD: r1050998 on 2014/03/26
  Fix bpobj_iterate_impl() to properly call bpobj_close() if bpobj_space()
  returns an error.

Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
Reviewed by: Simon Klinkert <simon.klinkert@gmail.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Will Andrews <will@freebsd.org>

FreeBSD note: this is a "record-only" commit as the actual change was
directly committed to FreeBSD by (or on behalf of) the author.
16:48:34 - r321556
(1 day ago)
by mav
Affects: 
(3 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
MFC r318833: MFV r316925: 6101 attempt to lzc_create() a filesystem under a
volume results in a panic

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

https://www.illumos.org/issues/6101
  lzc_create(), or more correctly, zfs_ioc_create() does not reject an attempt
to
  create a filesystem as a child of a volume, instead it proceeds to a crash.
  A crash stack obtained on FreeBSD:
  page fault while in kernel mode

  zap_leaf_lookup()
  fzap_lookup()
  zap_lookup_norm()
  zap_lookup()
  zfs_get_zplprop()
  zfs_fill_zplprops_impl()
  zfs_ioc_create()
  zfsdev_ioctl()
  devfs_ioctl_f()
  kern_ioctl()
  sys_ioctl()
  This crash happened with a kernel without debugging assertions.
  The immediate cause of crash appears to an attempt to interpret a zvol object
  as a zap object.
  For filesystems:
  #define MASTER_NODE_OBJ 1
  For zvols:
  #define ZVOL_OBJ 1ULL
  #define ZVOL_ZAP_OBJ 2ULL
  So, I see two problems here:
  1. an attempt to create a filesystem under a zvol should be rejected as
  early as possible, maybe in zfs_fill_zplprops()
  2. maybe zap_lookup / zap_lockdir should reject objects that are not of one
  of the zap object types

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Andriy Gapon <avg@FreeBSD.org>
16:47:33 - r321555
(1 day ago)
by mav
Affects: 
(2 files)
/stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
MFC r318831: MFV r316922: 5380 receive of a send -p stream doesn't need to try
renaming snapshots

illumos/illumos-gate@471a88e499c660844f4590487ce7c4d5a7090294
https://github.com/illumos/illumos-gate/commit/471a88e499c660844f4590487ce7c4d5a7090294

https://www.illumos.org/issues/5380
  A stream created with zfs send -p -I contains properties of all snapshots of a
  given dataset as opposed to only properties of snapshots in a given range.
  Not only this is suboptimal but the receive code also does not filter
  properties by the range. So, properties of earlier snapshots would be updated
  even though the snapshots themselves are not in the stream (just their
  properties).
  Given that modifying the snapshot properties requires a TXG sync and that the
  snapshots are updated one by one the described behavior may lead to a sever
  performance penalty.

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Andriy Gapon <avg@FreeBSD.org>
16:46:38 - r321554
(1 day ago)
by mav
Affects: 
(6 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
MFC r318829: MFV r316920: 8023 Panic destroying a metaslab deferred range tree

illumos/illumos-gate@3991b535a8e990c0369be677746a87c259b13e9f
https://github.com/illumos/illumos-gate/commit/3991b535a8e990c0369be677746a87c259b13e9f

https://www.illumos.org/issues/8023
  $C
  ffffff0011bc0970 vpanic()
  ffffff0011bc0a00 strlog()
  ffffff0011bc0a30 range_tree_destroy+0x72(ffffff043769ad00)
  ffffff0011bc0a70 metaslab_fini+0xd5(ffffff0449acf380)
  ffffff0011bc0ab0 vdev_metaslab_fini+0x56(ffffff0462bae800)
  ffffff0011bc0af0 spa_unload+0x9b(ffffff03e3dac000)
  ffffff0011bc0b70 spa_export_common+0x115(ffffff047f4b4000, 2, 0, 0, 0)
  ffffff0011bc0b90 spa_destroy+0x1d(ffffff047f4b4000)
  ffffff0011bc0bd0 zfs_ioc_pool_destroy+0x20(ffffff047f4b4000)
  ffffff0011bc0c80 zfsdev_ioctl+0x4d7(11400000000, 5a01, 8040190, 100003,
  ffffff03e1956b10, ffffff0011bc0e68)
  ffffff0011bc0cc0 cdev_ioctl+0x39(11400000000, 5a01, 8040190, 100003,
  ffffff03e1956b10, ffffff0011bc0e68)
  ffffff0011bc0d10 spec_ioctl+0x60(ffffff03d9153b00, 5a01, 8040190, 100003,
  ffffff03e1956b10, ffffff0011bc0e68, 0)
  ffffff0011bc0da0 fop_ioctl+0x55(ffffff03d9153b00, 5a01, 8040190, 100003,
  ffffff03e1956b10, ffffff0011bc0e68, 0)
  ffffff0011bc0ec0 ioctl+0x9b(3, 5a01, 8040190)
  ffffff0011bc0f10 _sys_sysenter_post_swapgs+0x149()

Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: George Wilson <george.wilson@delphix.com>
16:45:39 - r321553
(1 day ago)
by mav
Affects: 
(16 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
MFC r318828: MFV r316917: 7968 multi-threaded spa_sync()

illumos/illumos-gate@94c2d0eb22e9624151ee84a7edbf7178e1bf4087
https://github.com/illumos/illumos-gate/commit/94c2d0eb22e9624151ee84a7edbf7178e1bf4087

https://www.illumos.org/issues/7968
  spa_sync() iterates over all the dirty dnodes and processes each of them by
  calling dnode_sync(). If there are many dirty dnodes (e.g. because we created
  or removed a lot of files), the single thread of spa_sync() calling
  dnode_sync() can become a bottleneck. Additionally, if many dnodes are dirtied
  concurrently in open context (e.g. due to concurrent file creation), the
  os_lock will experience lock contention via dnode_setdirty().
  The solution is to track dirty dnodes on a multilist_t, and for spa_sync() to
  use separate threads to process each of the sublists in the multilist.
  On the concurrent file creation microbenchmark, the performance improvement
  from dnode_setdirty() is up to 7%. Additionally, the wall clock time spent in
  spa_sync() is reduced to 15%-40% of the single-threaded case. In terms of
cost/
  reward, once the other bottlenecks are addressed, fixing this bug will provide
  a medium-large performance gain and require a medium amount of effort to
  implement.

Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>
16:44:52 - r321552
(1 day ago)
by mav
Affects: 
(6 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
MFC r318827: MFV r316916: 7970 zfs_arc_num_sublists_per_state should be common
to all multilists

illumos/illumos-gate@10fbdecb05f411234920f8d3c92c148d39106d7e
https://github.com/illumos/illumos-gate/commit/10fbdecb05f411234920f8d3c92c148d39106d7e

https://www.illumos.org/issues/7970
  The global tunable zfs_arc_num_sublists_per_state is used by the ARC and
  the dbuf cache, and other users are planned. We should change this
  tunable to be common to all multilists.

Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>
16:44:24 - r321551
(1 day ago)
by hselasky
Affects:  /projects/bsd_rdma_4_9/sys/contrib/rdma/krping/krping.c
Set length of socket address in krping(). Else sobind() will fail with EINVAL.

Submitted by: Chelsio
Sponsored by: Mellanox Technologies
16:44:08 - r321550
(1 day ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c
MFC r318824: MFV r316915: 7801 add more by-dnode routines (lint)

illumos/illumos-gate@411be58a6e030a3b606f1afcc7f2e2459ffda844
https://github.com/illumos/illumos-gate/commit/411be58a6e030a3b606f1afcc7f2e2459ffda844
16:43:20 - r321549
(1 day ago)
by mav
Affects: 
(8 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
MFC r318823: MFC r316914: 7801 add more by-dnode routines

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

https://www.illumos.org/issues/7801
  Add *_by_dnode() routines for accessing objects given their
  dnode_t *, this is more efficient than accessing the object by
  (objset_t *, uint64_t object). This change converts some but
  not all of the existing consumers. As performance-sensitive
  code paths are discovered they should be converted to use
  these routines.
  Ported from:
https://github.com/zfsonlinux/zfs/commit/0eef1bde31d67091d3deed23fe2394f5a8bf2276

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: bzzz77 <bzzz.tomas@gmail.com>
16:42:32 - r321548
(1 day ago)
by mav
Affects: 
(3 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c
MFC r318822: MFC r316913: 7869 panic in bpobj_space(): null pointer dereference

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

https://www.illumos.org/issues/7869
  The issue fixed by this patch is a race condition in the deadlist code.
  A thread executing an administrative command that uses
  `dsl_deadlist_space_range()` holds the lock of the whole `deadlist_t` to
  protect the access of all its entries that the deadlist contains in an
  avl tree.
  Sync threads trying to insert a new entry in the deadlist
  (through `dsl_deadlist_insert()` -> `dle_enqueue()`) do not hold the
  deadlist lock at that moment. If the `dle_bpobj` is the empty bpobj (our
  sentinel value), we close and reopen it. Between these two operations,
  it is possible for the `dsl_deadlist_space_range()` thread to dereference
  that bpobj which is `NULL` during that window.
  Threads should hold the a deadlist's `dl_lock` when they manipulate its
  internal data so scenarios like the one above are avoided. In addition,
  threads should also hold the bpobj lock whenever they are allocating the
  subobj list of a bpobj, and not just when they actually insert the subobj
  to the list. This way we can avoid potential memory leaks.

Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: George Melikov <mail@gmelikov.ru>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Serapheim Dimitropoulos <serapheim@delphix.com>
16:35:17 - r321547
(1 day ago)
by mav
Affects: 
(19 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
MFC r318821: MFV r316912: 7793 ztest fails assertion in dmu_tx_willuse_space

illumos/illumos-gate@61e255ce7267b52208af9daf434b77d37fb75622
https://github.com/illumos/illumos-gate/commit/61e255ce7267b52208af9daf434b77d37
fb75622

https://www.illumos.org/issues/7793
  Background information: This assertion about tx_space_* verifies that we
  are not dirtying more stuff than we thought we would. We “need” to know
  how much we will dirty so that we can check if we should fail this
  transaction with ENOSPC/EDQUOT, in dmu_tx_assign(). While the
  transaction is open (i.e. between dmu_tx_assign() and dmu_tx_commit() —
  typically less than a millisecond), we call dbuf_dirty() on the exact
  blocks that will be modified. Once this happens, the temporary
  accounting in tx_space_* is unnecessary, because we know exactly what
  blocks are newly dirtied; we call dnode_willuse_space() to track this
  more exact accounting.
  The fundamental problem causing this bug is that dmu_tx_hold_*() relies
  on the current state in the DMU (e.g. dn_nlevels) to predict how much
  will be dirtied by this transaction, but this state can change before we
  actually perform the transaction (i.e. call dbuf_dirty()).
  This bug will be fixed by removing the assertion that the tx_space_*
  accounting is perfectly accurate (i.e. we never dirty more than was
  predicted by dmu_tx_hold_*()). By removing the requirement that this
  accounting be perfectly accurate, we can also vastly simplify it, e.g.
  removing most of the logic in dmu_tx_count_*().
  The new tx space accounting will be very approximate, and may be more or
  less than what is actually dirtied. It will still be used to determine
  if this transaction will put us over quota. Transactions that are marked
  by dmu_tx_mark_netfree() will be excepted from this check. We won’t make
  an attempt to determine how much space will be freed by the transaction
  — this was rarely accurate enough to determine if a transaction should
  be permitted when we are over quota, which is why dmu_tx_mark_netfree()
  was introduced in 2014.
  We also won’t attempt to give “credit” when overwriting existing blocks,
  if those blocks may be freed. This allows us to remove the
  do_free_accounting logic in dbuf_dirty(), and associated routines. This

Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>
16:33:58 - r321546
(1 day ago)
by mav
Affects: 
(3 files)
/stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h
/stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
MFC r318819: MFV r316908: 7541 zpool import/tryimport ioctl returns ENOMEM
because provided buffer is too small for config

illumos/illumos-gate@8b65a70b763232c90a91f31eb2010314c02ed338
https://github.com/illumos/illumos-gate/commit/8b65a70b763232c90a91f31eb2010314c02ed338

https://www.illumos.org/issues/7541
  When calling zpool import, zpool does a few ioctls to ZFS.
  zpool allocates a buffer in userland and passes it to the kernel so that ZFS
  can copy info into it. ZFS will use it to put the nvlist that describes the
  pool configuration.
  If the allocated buffer is too small, ZFS will return ENOMEM and the call will
  have to be redone. This wastes CPU time and slows down the import process.
This
  happens very often for the ZFS_IOC_POOL_TRYIMPORT call.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Pavel Zakharov <pavel.zakharov@delphix.com>
16:32:17 - r321545
(1 day ago)
by mav
Affects: 
(10 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
MFC r318818: MFV r316907: 1300 filename normalization doesn't work for removes

illumos/illumos-gate@1c17160ac558f98048951327f4e9248d8f46acc0
https://github.com/illumos/illumos-gate/commit/1c17160ac558f98048951327f4e9248d8f46acc0

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

FreeBSD note: recent FreeBSD was not affected by the issue fixed as the
name cache is completely bypassed when normalization is enabled.
The change is imported for the sake of ZAP infrastructure modifications.

Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Kevin Crowe <kevin.crowe@nexenta.com>
16:30:57 - r321544
(1 day ago)
by mav
Affects: 
(2 files)
/stable/11/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c
MFC r318814: MFC r316904: 7729 libzfs_core`lzc_rollback() leaks result nvl

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

https://www.illumos.org/issues/7729
  libzfs_core`lzc_rollback() doesn't free the result nvl after lzc_ioctl() call.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Yuri Pankov <yuri.pankov@nexenta.com>
16:30:09 - r321543
(1 day ago)
by mav
Affects: 
(2 files)
/stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c
MFC r318812: MFV r316860: 7545 zdb should disable reference tracking

illumos/illumos-gate@4dd77f9e38ef05b39db128ff7608d926fd3218c6
https://github.com/illumos/illumos-gate/commit/4dd77f9e38ef05b39db128ff7608d926fd3218c6

https://www.illumos.org/issues/7545
  When evicting from the ARC, we manipulate some refcount_t's, e.g. arcs_size.
  When using zdb to examine a large amount of data (e.g. zdb -bb on a large pool
  with small blocks), the ARC may have a large number of entries. If reference
  tracking is enabled, there will be ~1 reference for each block in the ARC.
When
  evicting, we decrement the refcount and have to search all the references to
  find the one that we are removing, which is very slow.
  Since zdb is typically used to find problems with the on-disk format, and not
  with the code it is running, we should disable reference tracking in zdb.

Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>
16:28:05 - r321542
(1 day ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
MFC r317648: Fix misport of compressed ZFS send/recv from 317414

Reported by: Michael Jung <mikej@mikej.com>
16:27:20 - r321541
(1 day ago)
by mav
Affects: 
(3 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h
MFC r317541: MFV 316905

7740 fix for 6513 only works in hole punching case, not truncation

illumos/illumos-gate@7de35a3ed0c2e6d4256bd2fb05b48b3798aaf553
https://github.com/illumos/illumos-gate/commit/7de35a3ed0c2e6d4256bd2fb05b48b3798aaf553

https://www.illumos.org/issues/7740
  The problem is that dbuf_findbp will return ENOENT if the block it's
  trying to find is beyond the end of the file. If that happens, we assume
  there is no birth time, and so we lose that information when we write
  out new blkptrs. We should teach dbuf_findbp to look for things that are
  beyond the current end, but not beyond the absolute end of the file.
  To verify, create a large file, truncate it to a short length, and then
  write beyond the end. Check with zdb to make sure that there are no
  holes with birth time zero (will appear as gaps).

Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Paul Dagnelie <pcd@delphix.com>
16:26:34 - r321540
(1 day ago)
by mav
Affects: 
(3 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h
MFC r317533: MFV 316900

7743 per-vdev-zaps have no initialize path on upgrade

illumos/illumos-gate@555da5111b0f2552c42d057b211aba89c9c79f6c
https://github.com/illumos/illumos-gate/commit/555da5111b0f2552c42d057b211aba89c9c79f6c

https://www.illumos.org/issues/7743
  When loading a pool that had been created before the existance of
  per-vdev zaps, on a system that knows about per-vdev zaps, the
  per-vdev zaps will not be allocated and initialized.
  This appears to be because the logic that would have done so, in
  spa_sync_config_object(), is not reached under normal operation. It is
  only reached if spa_config_dirty_list is non-empty.
  The fix is to add another `AVZ_ACTION_` enum that will allow this code
  to be reached when we detect that we're loading an old pool, even when
  there are no dirty configs.

Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Don Brady <don.brady@intel.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Paul Dagnelie <pcd@delphix.com>
16:25:46 - r321539
(1 day ago)
by mav
Affects: 
(3 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h
MFC r317527: MFV 316898

7613 ms_freetree[4] is only used in syncing context

illumos/illumos-gate@5f145778012b555e084eacc858ead9e1e42bd149
https://github.com/illumos/illumos-gate/commit/5f145778012b555e084eacc858ead9e1e42bd149

https://www.illumos.org/issues/7613
  metaslab_t:ms_freetree[TXG_SIZE] is only used in syncing context. We should
  replace it with two trees: the freeing tree (ranges that we are freeing this
  syncing txg) and the freed tree (ranges which have been freed this txg).

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>
16:24:53 - r321538
(1 day ago)
by mav
Affects: 
(3 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h
MFC r317522: MFV 316897

7586 remove #ifdef __lint hack from dmu.h

illumos/illumos-gate@4ba5b9616327ef64e8abc737d29b3faabc6ae68c
https://github.com/illumos/illumos-gate/commit/4ba5b9616327ef64e8abc737d29b3faabc6ae68c

https://www.illumos.org/issues/7586
  The #ifdef __lint in dmu.h is ugly, and it would be nice not to duplicate it
if
  we add other inline functions into header files in ZFS, especially since it is
  difficult to make any other solution work across all compilation targets. We
  should switch to disabling the lint flags that are failing instead.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Dan Kimmel <dan.kimmel@delphix.com>
16:24:11 - r321537
(1 day ago)
by mav
Affects: 
(3 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c
MFC r317511: MFV 316896

7580 ztest failure in dbuf_read_impl

illumos/illumos-gate@1a01181fdc809f40c64d5c6881ae3e4521a9d9c7
https://github.com/illumos/illumos-gate/commit/1a01181fdc809f40c64d5c6881ae3e4521a9d9c7

https://www.illumos.org/issues/7580
  We need to prevent any reader whenever we're about the zero out all the
  blkptrs. To do this we need to grab the dn_struct_rwlock as writer in
  dbuf_write_children_ready and free_children just prior to calling bzero.

Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: George Wilson <george.wilson@delphix.com>
16:23:30 - r321536
(1 day ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c
MFC r317507: MFV 316895

7606 dmu_objset_find_dp() takes a long time while importing pool

illumos/illumos-gate@7588687e6ba67c47bf7c9805086dec4a97fcac7b
https://github.com/illumos/illumos-gate/commit/7588687e6ba67c47bf7c9805086dec4a97fcac7b

https://www.illumos.org/issues/7606
  When importing a pool with a large number of filesystems within the same
  parent filesystem, we see that dmu_objset_find_dp() takes a long time.
  It is called from 3 places: spa_check_logs(), spa_ld_claim_log_blocks(),
  and spa_load_verify().
  There are several ways to improve performance here:
  1. We don't really need to do spa_check_logs() or
  spa_ld_claim_log_blocks() if the pool was closed cleanly.
  2. spa_load_verify() uses dmu_objset_find_dp() to check that no
  datasets have too long of names.
  3. dmu_objset_find_dp() is slow because it's doing
  zap_value_search() (which is O(N sibling datasets)) to determine
  the name of each dsl_dir when it's opened. In this case we
  actually know the name when we are opening it, so we can provide
  it and avoid the lookup.
  This change implements fix #3 from the above list; i.e. make
  dmu_objset_find_dp() provide the name of the dataset so that we don't
  have to search for it.

Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prashanth Sreenivasa <prashksp@gmail.com>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
Author: Matthew Ahrens <mahrens@delphix.com>
16:21:32 - r321535
(1 day ago)
by mav
Affects: 
(25 files)
/stable/11/cddl/contrib/opensolaris/cmd/*
/stable/11/cddl/contrib/opensolaris/lib/*
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
MFC r317414: MFV 316894

7252 7628 compressed zfs send / receive

illumos/illumos-gate@5602294fda888d923d57a78bafdaf48ae6223dea
https://github.com/illumos/illumos-gate/commit/5602294fda888d923d57a78bafdaf48ae6223dea

https://www.illumos.org/issues/7252
  This feature includes code to allow a system with compressed ARC enabled to
  send data in its compressed form straight out of the ARC, and receive data in
  its compressed form directly into the ARC.

https://www.illumos.org/issues/7628
  We should have longer, more readable versions of the ZFS send / recv options.

7628 create long versions of ZFS send / receive options

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
Reviewed by: David Quigley <dpquigl@davequigley.com>
Reviewed by: Thomas Caputi <tcaputi@datto.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Dan Kimmel <dan.kimmel@delphix.com>
16:20:19 - r321534
(1 day ago)
by mav
Affects: 
(8 files)
/stable/11/cddl/contrib/opensolaris/cmd/zfs/*
/stable/11/cddl/contrib/opensolaris/lib/libzfs/common/*
/stable/11/sys/cddl/contrib/opensolaris/common/zfs/*
MFC r317267: MFV 316891

7386 zfs get does not work properly with bookmarks

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

https://www.illumos.org/issues/7386
  The zfs get command does not work with the bookmark parameter while it works
  properly with both filesystem and snapshot:
  # zfs get -t all -r creation rpool/test
  NAME PROPERTY VALUE SOURCE
  rpool/test creation Fri Sep 16 15:00 2016 -
  rpool/test@snap creation Fri Sep 16 15:00 2016 -
  rpool/test#bkmark creation Fri Sep 16 15:00 2016 -
  # zfs get -t all -r creation rpool/test@snap
  NAME PROPERTY VALUE SOURCE
  rpool/test@snap creation Fri Sep 16 15:00 2016 -
  # zfs get -t all -r creation rpool/test#bkmark
  cannot open 'rpool/test#bkmark': invalid dataset name
  #
  The zfs get command should be modified to work properly with bookmarks too.

Reviewed by: Simon Klinkert <simon.klinkert@gmail.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Approved by: Matthew Ahrens <mahrens@delphix.com>
Author: Marcel Telka <marcel@telka.sk>
16:19:04 - r321533
(1 day ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c
MFC r317238: MFV 316871

7490 real checksum errors are silenced when zinject is on

illumos/illumos-gate@6cedfc397d92d64e442f0aae4445ac507beaf58f
https://github.com/illumos/illumos-gate/commit/6cedfc397d92d64e442f0aae4445ac507beaf58f

https://www.illumos.org/issues/7490
  When zinject is on, error codes from zfs_checksum_error() can be overwritten
  due to an incorrect and overly-complex if condition.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Pavel Zakharov <pavel.zakharov@delphix.com>
16:18:19 - r321532
(1 day ago)
by mav
Affects: 
(3 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
MFC r317237: MFV 316870

7448 ZFS doesn't notice when disk vdevs have no write cache

illumos/illumos-gate@295438ba3230419314faaa889a2616f561658bd5
https://github.com/illumos/illumos-gate/commit/295438ba3230419314faaa889a2616f56
1658bd5

https://www.illumos.org/issues/7448
  I built a SmartOS image with all the NVMe commits including 7372
  (support NVMe volatile write cache) and repeated my dd testing:
  > #!/bin/bash
  > for i in `seq 1 1000`; do
  > dd if=/dev/zero of=file00 bs=1M count=102400 oflag=sync &
  > dd if=/dev/zero of=file01 bs=1M count=102400 oflag=sync &
  > wait
  > rm file00 file01
  > done
  >
  Previously each dd command took ~145 seconds to finish, now it takes
  ~400 seconds.
  Eventually I figured out it is 7372 that causes unnecessary
  nvme_bd_sync() executions which wasted CPU cycles.
  If a NVMe device doesn't support a write cache, the nvme_bd_sync function will
  return ENOTSUP to indicate this to upper layers.
  It seems this returned value is ignored by ZFS, and as such this bug is not
  really specific to NVMe. In vdev_disk_io_start() ZFS sends the flush to the
  disk driver (blkdev) with a callback to vdev_disk_ioctl_done(). As nvme filled
  in the bd_sync_cache function pointer, blkdev will not return ENOTSUP, as the
  nvme driver in general does support cache flush. Instead it will issue an
  asynchronous flush to nvme and immediately return 0, and hence ZFS will not se
t
  vdev_nowritecache here. The nvme driver will at some point process the cache
  flush command, and if there is no write cache on the device it will return
  ENOTSUP, which will be delivered to the vdev_disk_ioctl_done() callback. This
  function will not check the error code and not set nowritecache.
  The right place to check the error code from the cache flush is in
  zio_vdev_io_assess(). This would catch both cases, synchronous and
asynchronous
  cache flushes. This would also be independent of the implementation detail
that
  some drivers can return ENOTSUP immediately.

Reviewed by: Dan Fields <dan.fields@nexenta.com>
Reviewed by: Alek Pinchuk <alek.pinchuk@nexenta.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Hans Rosenfeld <hans.rosenfeld@nexenta.com>
16:16:43 - r321531
(1 day ago)
by mav
Affects: 
(5 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
MFC r317235: MFV 316868

7430 Backfill metadnode more intelligently

illumos/illumos-gate@af346df58864e8fe897b1ff1a3a4c12f9294391b
https://github.com/illumos/illumos-gate/commit/af346df58864e8fe897b1ff1a3a4c12f9
294391b

https://www.illumos.org/issues/7430
  Description and patch from brought over from the following ZoL commit: https:/
/
  github.com/zfsonlinux/zfs/commit/68cbd56e182ab949f58d004778d463aeb3f595c6
  Only attempt to backfill lower metadnode object numbers if at least
  4096 objects have been freed since the last rescan, and at most once
  per transaction group. This avoids a pathology in dmu_object_alloc()
  that caused O(N^2) behavior for create-heavy workloads and
  substantially improves object creation rates. As summarized by
  @mahrens in #4636:
  "Normally, the object allocator simply checks to see if the next
  object is available. The slow calls happened when dmu_object_alloc()
  checks to see if it can backfill lower object numbers. This happens
  every time we move on to a new L1 indirect block (i.e. every 32 *
  128 = 4096 objects). When re-checking lower object numbers, we use
  the on-disk fill count (blkptr_t:blk_fill) to quickly skip over
  indirect blocks that don?t have enough free dnodes (defined as an L2
  with at least 393,216 of 524,288 dnodes free). Therefore, we may
  find that a block of dnodes has a low (or zero) fill count, and yet
  we can?t allocate any of its dnodes, because they've been allocated
  in memory but not yet written to disk. In this case we have to hold
  each of the dnodes and then notice that it has been allocated in
  memory.
  The end result is that allocating N objects in the same TXG can
  require CPU usage proportional to N^2."
  Add a tunable dmu_rescan_dnode_threshold to define the number of
  objects that must be freed before a rescan is performed. Don't bother
  to export this as a module option because testing doesn't show a
  compelling reason to change it. The vast majority of the performance
  gain comes from limit the rescan to at most once per TXG.

Reviewed by: Alek Pinchuk <alek@nexenta.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
Author: Ned Bass <bass6@llnl.gov>
16:14:57 - r321530
(1 day ago)
by mav
Affects: 
(3 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
MFC r316037: MFV: 315989

7603 xuio_stat_wbuf_* should be declared (void)

illumos/illumos-gate@99aa8b55058e512798eafbd71f72f916bdc10181
https://github.com/illumos/illumos-gate/commit/99aa8b55058e512798eafbd71f72f916bdc10181

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

  The funcs are declared k&r style, where the args are not specified:

  void xuio_stat_wbuf_copied();
  They should be declared to take no arguments:

  void xuio_stat_wbuf_copied(void);
  Need to change both .c and .h.

Author: Prashanth Sreenivasa <pks@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
16:14:05 - r321529
(1 day ago)
by mav
Affects: 
(15 files)
/stable/11/cddl/contrib/opensolaris/*
/stable/11/sys/cddl/compat/opensolaris/*
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
MFC r315896: MFV r315290, r315291: 7303 dynamic metaslab selection

illumos/illumos-gate@8363e80ae72609660f6090766ca8c2c18aa53f0c
https://github.com/illumos/illumos-gate/commit/8363e80ae72609660f6090766ca8c2c18

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

  This change introduces a new weighting algorithm to improve metaslab selection
.
  The new weighting algorithm relies on the SPACEMAP_HISTOGRAM feature. As a res
ult,
  the metaslab weight now encodes the type of weighting algorithm used
  (size-based vs segment-based).

  This also introduce a new allocation tracing facility and two new dcmds to hel
p
  debug allocation problems. Each zio now contains a zio_alloc_list_t structure
  that is populated as the zio goes through the allocations stage. Here's an
  example of how to use the tracing facility:

> c5ec000::print zio_t io_alloc_list | ::walk list | ::metaslab_trace
  MSID DVA ASIZE WEIGHT RESULT VDEV
  - 0 400 0 NOT_ALLOCATABLE ztest.0a
  - 0 400 0 NOT_ALLOCATABLE ztest.0a
  - 0 400 0 ENOSPC ztest.0a
  - 0 200 0 NOT_ALLOCATABLE ztest.0a
  - 0 200 0 NOT_ALLOCATABLE ztest.0a
  - 0 200 0 ENOSPC ztest.0a
  1 0 400 1 x 8M 17b1a00 ztest.0a

> 1ff2400::print zio_t io_alloc_list | ::walk list | ::metaslab_trace
  MSID DVA ASIZE WEIGHT RESULT VDEV
  - 0 200 0 NOT_ALLOCATABLE mirror-2
  - 0 200 0 NOT_ALLOCATABLE mirror-0
  1 0 200 1 x 4M 112ae00 mirror-1
  - 1 200 0 NOT_ALLOCATABLE mirror-2
  - 1 200 0 NOT_ALLOCATABLE mirror-0
  1 1 200 1 x 4M 112b000 mirror-1
  - 2 200 0 NOT_ALLOCATABLE mirror-2

  If the metaslab is using segment-based weighting then the WEIGHT column will
  display the number of segments available in the bucket where the allocation
  attempt was made.

Author: George Wilson <george.wilson@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Reviewed by: Chris Siden <christopher.siden@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Don Brady <don.brady@intel.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
16:12:20 - r321528
(1 day ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
MFC r314280: MFV 314276

7570 tunable to allow zvol SCSI unmap to return on commit of txn to ZIL

illumos/illumos-gate@1c9272b861cd640a8342f4407da026ed98615517
https://github.com/illumos/illumos-gate/commit/1c9272b861cd640a8342f4407da026ed98615517

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

  Based on the discovery that every unmap waits for the commit of the txn to
the ZIL,
  introducing a very high latency to unmap commands, this behavior was made
into a
  tunable zvol_unmap_sync_enabled and set to false. The net impact of this
change is
  that by default SCSI unmap commands will result in space being freed within
the zvol
  (today they are ignored and returned with good status). However, unlike the
code
  today, instead of 18+ms per unmap, they take about 30us.

  With the testing done on NTFS against a Win2k12 target, the new behavior
should work
  seamlessly. Files on the zvol that have already been set with the zfree
application
  will continue to write 0's when deleted, and any new files created since zvol
  creation will send unmap commands when deleted. This behavior exists today,
but with
  this change the unmap commands will be processed and result in reclaim of
space.

Author: Stephen Blinick <stephen.blinick@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Approved by: Robert Mustacchi <rm@joyent.com>
16:11:08 - r321527
(1 day ago)
by mav
Affects: 
(10 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
MFC r314267: MFV 314243

6676 Race between unique_insert() and unique_remove() causes ZFS fsid change

illumos/illumos-gate@40510e8eba18690b9a9843b26393725eeb0f1dac
https://github.com/illumos/illumos-gate/commit/40510e8eba18690b9a9843b26393725ee
b0f1dac

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

  The fsid of zfs filesystems might change after reboot or remount. The problem
seems to
  be caused by a race between unique_insert() and unique_remove(). The unique_re
move()
  is called from dsl_dataset_evict() which is now an asynchronous thread. In a c
ase the
  dsl_dataset_evict() thread is very slow and calls unique_remove() too late we
will end
  up with changed fsid on zfs mount.

  This problem is very likely caused by #5056.

  Steps to Reproduce
  Note: I'm able to reproduce this always on a single core (virtual) machine. On
 multicore
  machines it is not so easy to reproduce.

# uname -a
SunOS openindiana 5.11 illumos-633aa80 i86pc i386 i86pc Solaris
# zfs create rpool/TEST
# FS=$(echo ::fsinfo | mdb -k | grep TEST | awk '{print $1}')
# echo $FS::print vfs_t vfs_fsid | mdb -k
vfs_fsid = {
  vfs_fsid.val = [ 0x54d7028a, 0x70311508 ]
}
# zfs umount rpool/TEST
# zfs mount rpool/TEST
# FS=$(echo ::fsinfo | mdb -k | grep TEST | awk '{print $1}')
# echo $FS::print vfs_t vfs_fsid | mdb -k
vfs_fsid = {
  vfs_fsid.val = [ 0xd9454e49, 0x6b36d08 ]
}
#

  Impact
  The persistent fsid (filesystem id) is essential for proper NFS functionality.
  If the fsid of a filesystem changes on remount (or after reboot) the NFS
  clients might not be able to automatically recover from such event and the
  manual remount of the NFS filesystems on every NFS client might be needed.

Author: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Dan Vatca <dan.vatca@gmail.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
15:52:51 - r321526
(1 day ago)
by mav
Affects:  /stable/11/sys/boot/zfs/zfsimpl.c
Fix mismerge in r321525.
15:29:56 - r321525
(1 day 1 hour ago)
by mav
Affects: 
(3 files)
/stable/11/sys/boot/zfs/zfsimpl.c
/stable/11/sys/cddl/boot/zfs/zfsimpl.h
MFC r314112 (by tsoome): loader: update symlink support in zfs reader

As the current zfs file system is providing symlink via system attributes,
need to update the code accordingly.

Note, as the zfsboot code does not free the memory at this time, the
object list will put some stress on the boot2 heap, eventually we should
address the issue.

Differential Revision: https://reviews.freebsd.org/D9706
15:24:17 - r321524
(1 day 1 hour ago)
by mav
Affects: 
(4 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h
MFC r313813: MFV 313786

7500 Simplify dbuf_free_range by removing dn_unlisted_l0_blkid

illumos/illumos-gate@653af1b809998570c7e89fe7a0d3f90992bf0216
https://github.com/illumos/illumos-gate/commit/653af1b809998570c7e89fe7a0d3f90992bf0216

https://www.illumos.org/issues/7500
  With the integration of:

  commit 0f6d88aded0d165f5954688a9b13bac76c38da84
  Author: Alex Reece <alex@delphix.com>
  Date: Sat Jul 26 13:40:04 2014 -0800
  4873 zvol unmap calls can take a very long time for larger datasets

  the dnode's dn_bufs field was changed from a list to a tree. As a result,
  the dn_unlisted_l0_blkid field is no longer necessary.

Author: Stephen Blinick <stephen.blinick@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
15:23:01 - r321523
(1 day 1 hour ago)
by mav
Affects: 
(4 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h
MFC r312535: MFV 312436

 6569 large file delete can starve out write ops

  illumos/illumos-gate@ff5177ee8bf9a355131ce2cc61ae2da6a5a6fdd6
  https://github.com/illumos/illumos-gate/commit/ff5177ee8bf9a355131ce2cc61ae2da
6a5a6fdd6

  https://www.illumos.org/issues/6569
  The core issue I've found is that there is no throttle for how many
  deletes get assigned to one TXG. As a results when deleting large files
  we end up filling consecutive TXGs with deletes/frees, then write
  throttling other (more important) ops.

  There is an easy test case for this problem. Try deleting several
  large files (at least 1/2 TB) while you do write ops on the same
  pool. What we've seen is performance of these write ops (let's
  call it sideload I/O) would drop to zero.

  More specifically the problem is that dmu_free_long_range_impl()
  can/will fill up all of the dirty data in the pool "instantly",
  before many of the sideload ops can get in. So sideload
  performance will be impacted until all the files are freed.

  The solution we have tested at Nexenta (with positive results)
  creates a relatively simple throttle for how many "free" ops we let
  into one TXG.

  However this solution exposes other problems that should also be
  addressed. If we are to slow down freeing of data that means one
  has to wait even longer (assuming vnode ref count of 1) to get shell
  back after an rm or for NFS thread to finish the free-ing op.
  To avoid this the proposed solution is to call zfs_inactive() async
  for "large" files. Async freeing then begs for the reclaimed space
  to be accounted for in the zpool's "freeing" prop.

  The other issue with having a longer delete is the inability to
  export/unmount for a longer period of time. The proposed solution
  is to interrupt freeing of blocks when a fs is unmounted.

  Author: Alek Pinchuk <alek@nexenta.com>
  Reviewed by: Matt Ahrens <mahrens@delphix.com>
  Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
  Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
  Approved by: Dan McDonald <danmcd@omniti.com>
15:19:34 - r321522
(1 day 1 hour ago)
by mav
Affects: 
(2 files)
/stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
MFC r309096 (by avg): MFV r308989:
6428 set canmount=off on unmounted filesystem tries to unmount children

This is a cosmetic and bookkeeping change as the actual change is
already in FreeBSD.
See r297521, r304520, r308985.
15:15:20 - r321521
(1 day 1 hour ago)
by mav
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c
MFC r305701 (by allanjude): MFV r268120:
4936 lz4 could theoretically overflow a pointer with a certain input

illumos/illumos-gate@58d0718061c87e3d647c891ec5281b93c08dba4e
14:56:03 - r321520
(1 day 1 hour ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/errata/article.xml
Add a note regarding VirtualBox vboxguest panics during 11.1-RC2.

Sponsored by: The FreeBSD Foundation
14:55:47 - r321519
(1 day 1 hour ago)
by mav
Affects: 
(5 files)
/stable/11/sys/boot/zfs/*
/stable/11/sys/cddl/boot/zfs/zfsimpl.h
MFC r303630 (by allanjude):
Make boot code and loader check for unsupported ZFS feature flags

OpenZFS uses feature flags instead of a zpool version number to track
features since the split from Oracle. In addition to avoiding confusion
on ZFS vs OpenZFS version numbers, this also allows features to be added
to different operating systems that use OpenZFS in different order.

The previous zfs boot code (gptzfsboot) and loader (zfsloader) blindly
tries to read the pool, and if failed provided only a vague error message.

With this change, both the boot code and loader check the MOS features
list in the ZFS label and compare it against the list of features that
the loader supports. If any unsupported feature is active, the pool is
not considered as a candidate for booting, and a helpful diagnostic
message is printed to the screen. Features that are merely enabled via
zpool upgrade, but not in use, do not block booting from the pool.

Submitted by: Toomas Soome <tsoome@me.com>
Reviewed by: delphij, mav
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D6857
12:07:46 - r321518
(1 day 4 hours ago)
by lwhsu
Affects:  /head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroFunctionProbes.d.ksh
Add an auxiliary subroutine to generate some events for testing

This test is also timeout on a quiet system because there is nobody triggering
read probefunc while test execution.

Reviewed by: gnn, markj, ngie
Differential Revision: https://reviews.freebsd.org/D11731
11:04:30 - r321517
(1 day 5 hours ago)
by ae
Affects: 
(3 files)
/stable/11/sys/dev/bxe/bxe.c
/stable/11/sys/dev/bxe/bxe.h
MFC r321203:
  Add HPE FlexFabric 10Gb 4-port 536FLR-T device id to the bxe(4) driver.
11:03:13 - r321516
(1 day 5 hours ago)
by ae
Affects: 
(3 files)
/stable/10/sys/dev/bxe/bxe.c
/stable/10/sys/dev/bxe/bxe.h
MFC r321203:
  Add HPE FlexFabric 10Gb 4-port 536FLR-T device id to the bxe(4) driver.
07:00:27 - r321515
(1 day 9 hours ago)
by kib
Affects: 
(3 files)
/stable/11/sys/vm/swap_pager.c
/stable/11/sys/vm/swap_pager.h
MFC r321217:
Remove unused function swap_pager_isswapped().
06:57:15 - r321514
(1 day 9 hours ago)
by ed
Affects: 
(27 files)
/head/sys/compat/*
/head/sys/contrib/cloudabi/*
/head/usr.bin/truss/syscalls.c
Upgrade to the latest sources generated from the CloudABI specification.

The CloudABI specification has had some minor changes over the last half
year. No substantial features have been added, but some features that
are deemed unnecessary in retrospect have been removed:

- mlock()/munlock():

  These calls tend to be used for two different purposes: real-time
  support and handling of sensitive (cryptographic) material that
  shouldn't end up in swap. The former use case is out of scope for
  CloudABI. The latter may also be handled by encrypting swap.

  Removing this has the advantage that we no longer need to worry about
  having resource limits put in place.

- SOCK_SEQPACKET:

  Support for SOCK_SEQPACKET is rather inconsistent across various
  operating systems. Some operating systems supported by CloudABI (e.g.,
  macOS) don't support it at all. Considering that they are rarely used,
  remove support for the time being.

- getsockname(), getpeername(), etc.:

  A shortcoming of the sockets API is that it doesn't allow you to
  create socket(pair)s, having fake socket addresses associated with
  them. This makes it harder to test applications or transparently
  forward (proxy) connections to them.

  With CloudABI, we're slowly moving networking connectivity into a
  separate daemon called Flower. In addition to passing around socket
  file descriptors, this daemon provides address information in the form
  of arbitrary string labels. There is thus no longer any need for
  requesting socket address information from the kernel itself.

This change also updates consumers of the generated code accordingly.
Even though system calls end up getting renumbered, this won't cause any
problems in practice. CloudABI programs always call into the kernel
through a kernel-supplied vDSO that has the numbers updated as well.

Obtained from: https://github.com/NuxiNL/cloudabi
06:52:45 - r321513
(1 day 9 hours ago)
by kib
Affects: 
(7 files)
/stable/11/sys/sys/*
/stable/11/sys/vm/*
MFC r321247:
Add pctrie_init() and vm_radix_init() to initialize generic pctrie and
vm_radix trie.
06:42:01 - r321512
(1 day 10 hours ago)
by kib
Affects:  /head/sys/sys/pctrie.h
Mark name_PCTRIE_LOOKUP_LE() generated function unused.

The PCTRIE macro will be shortly applied in a situation where
LOOKUP_LE is not needed.

Reviewed by: alc, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
X-Differential revision: https://reviews.freebsd.org/D11435
05:52:37 - r321511
(1 day 10 hours ago)
by adrian
Affects:  /head/sys/dev/iwm/if_iwmreg.h
[iwm] Sync rs (rate-selection) API definitions from Linux iwlwifi.

* While there clean up alignments and line wrapping in existing
  definitions for rs API in if_iwmreg.h

Obtained from: dragonflybsd.git 085e37a042bdb17081e495e46919359ce43aa118
05:51:31 - r321510
(1 day 10 hours ago)
by adrian
Affects:  /head/sys/dev/iwm/if_iwm.c
/head/sys/dev/iwm/if_iwm_util.c
/head/sys/dev/iwm/if_iwm_util.h
[iwm] Add iwm_mvm_send_lq_cmd() from Linux iwlwifi to if_iwm_util.c.

Obtained from: dragonflybsd.git 8a5dd7783e407856754093f5b1c9c757c64534b7
05:40:52 - r321509
(1 day 11 hours ago)
by adrian
Affects:  /head/sys/dev/iwm/if_iwm.c
/head/sys/dev/iwm/if_iwmreg.h
/head/sys/dev/iwm/if_iwmvar.h
[iwm] Sync statistics API definitions with Linux iwlwifi.

Obtained from: dragonflybsd.git 75895a53a9c1ba60d75be9b4bf6e49a37f91a7cf
05:29:08 - r321508
(1 day 11 hours ago)
by adrian
Affects:  /head/sys/dev/iwm/if_iwm.c
/head/sys/dev/iwm/if_iwm_sta.c
[iwm] Cleanup mbufq draining. Add iwm_xmit_queue_drain() like in iwn(4).

* iwm_xmit_queue_drain() calls ieee80211_free_node(), removing a possible
  memory leak, compared to using just mbufq_drain().

* Remove duplicate mbufq_drain() from iwm_mvm_rm_sta(), this should be
  handled in the caller.

Obtained from: dragonflybsd.git 339d45fda40072e0aca5ece639173204716f11fe
05:26:01 - r321507
(1 day 11 hours ago)
by adrian
Affects:  /head/sys/dev/iwm/if_iwm_scan.c
[iwm] if_iwm - Use chan list from ieee80211_scan_state for scan, not
ic_channels.

* Limiting the channel list with "ifconfig wlan0 chanlist ..." now will
  actually set the list of channels scanned by iwm.

Tested:

* Intel 7260, STA mode, setting chanlist to 1-14 and 36-254, and indeed it does
what
  it should!
05:01:46 - r321506
(1 day 11 hours ago)
by markj
Affects: 
(35 files)
/projects/numa2/lib/libmemstat/memstat_uma.c
/projects/numa2/sys/*
Reintegrate most of the work done on projects/numa.

This largely consists of plumbing a domain parameter through various
layers of the VM code. In particular:
- Domain selection is moved out of the physical memory allocator and
  into the page allocation routines. The page allocator API is extended
  to support allocation from a requested domain. The existing API now
  makes use of per-VM object and per-thread policies to select a domain
  from which to allocate pages.
- The reservation allocator now accepts a domain parameter. The global
  queue of partially populated reservations is split into one queue per
  domain. This lets us specify a particular domain when attempting to
  reclaim memory by breaking partially populated reservations.
- Simiarly, each UMA zone now maintains a bucket cache per domain,
  rather than a global cache. Each UMA keg now maintains per-domain
  lists of slabs. A new function, uma_zone_set_domain_selector(), allows
  one to specify a domain selection policy for allocating slabs.
  Currently this is used to ensure that per-CPU item buckets are
  allocated local to the domain corresponding to the CPU.
- VM object contain a domain selector whose policy is determined by the
  system default. Currently, when allocating a page with
  vm_page_alloc(), the object's policy is preferred over the thread's.

This commit does not fully reconcile the work done in r285387 with the
contents of projects/numa. In particular, I implemented vm_page_alloc()
to prefer the object's selection policy over the thread's. Thus,
per-thread and per-process policies specified using numactl are not
always honoured.

Omitted from projects/numa is support for using a bitset to define a
subset of VM domains that may selected by a given policy. It's not yet
clear to me how that should be integrated with r285387.

Some aspects of NUMA-awareness are not yet addressed. For example, we
currently create one page daemon per domain, but the targets used by the
page daemons for reclaiming memory are based on the global free page
count.

Submitted by: attilio, jeff (original version)
Obtained from: projects/numa
04:27:37 - r321505
(1 day 12 hours ago)
by markj
Affects:  /projects/numa2
Create a branch for reviving the work done in projects/numa.

The original has bitrotted somewhat, and my attempt to merge head into
that branch generated numerous conflicts. It seemed simpler to simply
create a new branch and reintegrate by hand.
02:05:09 - r321504
(1 day 14 hours ago)
by cy
Affects:  /head/kerberos5/lib/libkafs5/Makefile
Remove trailing slash (/) for consistency.
01:48:57 - r321503
(1 day 15 hours ago)
by davidcs
Affects: 
(6 files)
/stable/9/sys/dev/qlxgbe/*
MFC 321233
Raise the watchdog timer interval to 2 ticks, there by guaranteeing
that it fires between 1ms and 2ms. `
Treat two consecutive occurrences of Heartbeat failures as a legitimate
Heartbeat failure
01:48:13 - r321502
(1 day 15 hours ago)
by scottl
Affects:  /head/sys/dev/mpr/mpr_sas.c
Quiet a message that sounds far more dire than it really is.
01:46:25 - r321501
(1 day 15 hours ago)
by davidcs
Affects: 
(3 files)
/stable/9/sys/dev/qlxgbe/ql_os.c
MFC 320705
Release mtx hw_lock before calling pause() in qla_stop() and
qla_error_recovery()
01:43:44 - r321500
(1 day 15 hours ago)
by davidcs
Affects: 
(4 files)
/stable/9/sys/dev/qlxgbe/ql_hw.c
/stable/9/sys/dev/qlxgbe/ql_os.c
MFC 320694
Allow MTU changes without ifconfig down/up
01:28:27 - r321499
(1 day 15 hours ago)
by davidcs
Affects: 
(5 files)
/stable/10/sys/dev/qlxgbe/*
MFC 321233
Raise the watchdog timer interval to 2 ticks, there by guaranteeing
that it fires between 1ms and 2ms. `
Treat two consecutive occurrences of Heartbeat failures as a legitimate
Heartbeat failure
01:25:51 - r321498
(1 day 15 hours ago)
by davidcs
Affects: 
(2 files)
/stable/10/sys/dev/qlxgbe/ql_os.c
MFC 320705
Release mtx hw_lock before calling pause() in qla_stop() and
qla_error_recovery()
01:23:35 - r321497
(1 day 15 hours ago)
by davidcs
Affects: 
(3 files)
/stable/10/sys/dev/qlxgbe/ql_hw.c
/stable/10/sys/dev/qlxgbe/ql_os.c
MFC 320694
Allow MTU changes without ifconfig down/up
01:19:49 - r321496
(1 day 15 hours ago)
by davidcs
Affects: 
(5 files)
/stable/11/sys/dev/qlxgbe/*
MFC 321233
  Raise the watchdog timer interval to 2 ticks, there by guaranteeing
  that it fires between 1ms and 2ms. `
  Treat two consecutive occurrences of Heartbeat failures as a legitimate
  Heartbeat failure
01:15:31 - r321495
(1 day 15 hours ago)
by davidcs
Affects: 
(2 files)
/stable/11/sys/dev/qlxgbe/ql_os.c
MFC 320705
  Release mtx hw_lock before calling pause() in qla_stop() and
  qla_error_recovery()
01:12:28 - r321494
(1 day 15 hours ago)
by davidcs
Affects: 
(3 files)
/stable/11/sys/dev/qlxgbe/ql_hw.c
/stable/11/sys/dev/qlxgbe/ql_os.c
MFC 320694
Allow MTU changes without ifconfig down/up
2017 - 07 - 25   (2 days ago)
20:51:06 - r321493
(1 day 19 hours ago)
by bdrewery
Affects:  /head/Makefile.inc1
NO_CLEAN: Hide delete-old output.

It is full of distracting noise about UPDATING and may confuse
the user about what is actually being deleted. It is also
possible to have directories removed on every run with
use of WITHOUT_ knobs that the mtree files do not
account for and for which the directories are incorrectly
in OLD_DIRS currently.

X-MFC-With: r321443
MFC after: 1 month
Sponsored by: Dell EMC Isilon
20:43:37 - r321492
(1 day 20 hours ago)
by bdrewery
Affects:  /head/Makefile.inc1
Only build libzfs_core in 'make libraries' if needed.

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
20:43:26 - r321491
(1 day 20 hours ago)
by bdrewery
Affects:  /head/Makefile.inc1
Remove unneeded dependency for libzfs.

This dependency does nothing since cddl/lib/libzfs is never
added into the 'make libraries' dependency chain
directly.

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
20:36:44 - r321490
(1 day 20 hours ago)
by marius
Affects:  /head/sys/dev/mmc/mmcsd.c
Improve the clarity of a comment added in r321385 by not referring to
volatile SDHCI specification lingo.
17:39:06 - r321489
(1 day 23 hours ago)
by ian
Affects:  /head/sys/arm/include/ucontext.h
Use the MD __size_t to avoid a dependency on/include of non-MD header files.

This should fix the compilation of the lua 5.3.4 port, among others.

Reported by: Russell Haley <russ.haley@gmail.com>
17:24:50 - r321488
(1 day 23 hours ago)
by emaste
Affects: 
(2 files)
/stable/11/contrib/elftoolchain/readelf/readelf.c
readelf: fix printing of DT_FILTER and some other DT_* values

MFC r321045: readelf: fix printing of DT_FILTER and some other DT_* values

Some non-processor-specific DT_* values overlap the range DT_LOPROC to
DT_HIPROC. Handle common ones first, then the processor-specific ones.

MFC r321046: readelf: correct printing of DT_FILTER and DT_AUXILIARY values

Previously these were shown only for MIPS objects.

Obtained from: ELF Tool Chain r3563, r3564
Sponsored by: The FreeBSD Foundation
17:04:35 - r321487
(1 day 23 hours ago)
by pstef
Affects: 
(6 files)
/head/usr.bin/indent/*
indent(1): add option -tsn for setting tab size.
16:57:25 - r321486
(1 day 23 hours ago)
by ngie
Affects:  /head/lib/msun/tests/trig_test.c
Re-add #endif accidentally deleted in r321484

MFC after: 1 month
MFC with: r321455, r321484
16:46:12 - r321485
(2 days ago)
by bdrewery
Affects:  /head/share/mk/bsd.dep.mk
/head/sys/conf/kern.post.mk
Allow -DNO_SKIP_DEPEND to override the _SKIP_DEPEND logic.

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
16:21:22 - r321484
(2 days ago)
by ngie
Affects:  /head/lib/msun/tests/trig_test.c
Only test ld_pi_odd with LDBL_MANT_DIG == 64 to fix the build

The empty (unimplemented) test inputs for sparc64 trigger a -Wtype-limits build
failure because nitems of an empty array is always false, i.e., deadcode.

MFC after: 1 month
MFC with: r321455
Reported by: Jenkins (sparc64 job)
16:11:36 - r321483
(2 days ago)
by ngie
Affects:  /head/lib/msun/tests/Makefile
Mask issues with duplicate definitions for __fnstcw, __fldenv, and __fldcw on
i386 by ignoring -Wmacro-redefined.

This is a bandaid until the code is fixed and will be reverted before MFC.
15:58:44 - r321482
(2 days ago)
by ngie
Affects:  /projects/runtime-coverage/etc/Makefile
Spam BSD.coverage.dist, similar to BSD.debug.dist, unconditionally on
/usr/lib/cov

/usr/lib/cov was chosen because while there isn't a standardized upstream path
that's used for storing .gcda's, /usr/lib/cov seemed like a good symmetry with
the /usr/lib/debug for debug files for gdb, et al.

Parameterize out directories that are used to spam BSD.debug.dist,
BSD.lib32.dist, BSD.libsoft.dist, and BSD.tests.dist, and spam on
/usr/lib/cov .
15:33:34 - r321481
(2 days 1 hour ago)
by sbruno
Affects: 
(5 files)
/head/sys/dev/bnxt/*
bnxt: Implement interrupt coalescing options using sysctl.

Submitted by: bhargava.marreddy@broadcom.com
Differential Revision: https://reviews.freebsd.org/D11702
15:08:52 - r321480
(2 days 1 hour ago)
by sbruno
Affects: 
(8 files)
/head/sys/netinet/cc/*
/head/sys/netinet/tcp_input.c
/head/sys/netinet/tcp_stacks/fastpath.c
Revert r307901 - Inform CC modules about loss events.

This was discussed between various transport@ members and it was
requested to be reverted and discussed.

Submitted by: Kevin Bowling <kevin.bowling@kev009.com>
Reported by: lawrence
Reviewed by: hiren
Sponsored by: Limelight Networks
15:03:05 - r321479
(2 days 1 hour ago)
by sbruno
Affects: 
(6 files)
/head/sys/netinet/cc/*
/head/sys/netinet/tcp_input.c
Revert r308180 - Set slow start threshold more accurrately on loss ...

This was discussed between various transport@ members and it was
requested to be reverted and discussed.

Submitted by: kevin
Reported by: lawerence
Reviewed by: hiren
14:46:13 - r321478
(2 days 2 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/errata/article.xml
Document a late-discovered issue where 'root on ZFS' installations
on arm64 fail to find the root pool.

Sponsored by: The FreeBSD Foundation
14:41:50 - r321477
(2 days 2 hours ago)
by sbruno
Affects:  /head/sys/net/if_lagg.c
Don't hold the RM lock during lagg_proto_addport() to avoid an LOR.

Submitted by: Kevin Bowling <kevin.bowling@kev009.com>
Reviewed by: mav
MFC after: 1 week
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D11711
14:38:30 - r321476
(2 days 2 hours ago)
by sbruno
Affects:  /head/sys/dev/ixgbe/ix_txrx.c
Drop ixgbe RX lock during TCP_LRO processing. This eliminates a "storm"
of LOR detection and a bit of lock release/acquire collision when using LRO.

Submitted by: Kevin Bowling <kevin.bowling@kev009.com>
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D11712
14:35:44 - r321475
(2 days 2 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/errata/article.xml
Mention arm64 lacking EFI RTC support, and a workaround.

Submitted by: emaste
Sponsored by: The FreeBSD Foundation
13:43:51 - r321474
(2 days 3 hours ago)
by gjb
Affects:  /stable/11/release/doc/share/xml/errata.xml
/stable/11/release/doc/share/xml/security.xml
Trim stale entries from 11.0.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation
13:43:14 - r321473
(2 days 3 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/errata/article.xml
Fix a typo.

PR: 220917 (related)
Submitted by: fbsdbugs4 _at_ sentry dot org
Sponsored by: The FreeBSD Foundation
13:18:28 - r321472
(2 days 3 hours ago)
by lwhsu
Affects:  /head/cddl/usr.sbin/dtrace/tests/tools/dtest.sh
The test case common.funcs.t_dtrace_contrib.tst_basename_d generates a
verifying script which needs being run to complete the test.

While here, add missing shebang.

Reviewed by: gnn, markj, ngie
Differential Revision: https://reviews.freebsd.org/D11716
13:17:06 - r321471
(2 days 3 hours ago)
by avg
Affects:  /head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
spa_import_rootpool should be able to handle an imported root pool

That is required to support reboot -r with a new root filesystem being
on an already imported pool.

PR: 210721
Reported by: Jan Bramkamp <crest_maintainer@rlwinm.de>
MFC after: 2 weeks
13:14:02 - r321470
(2 days 3 hours ago)
by lwhsu
Affects:  /head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh
/head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out
Modify glob patterns and expected output to match FreeBSD's implementation.

Reviewed by: gnn, markj, ngie
Differential Revision: https://reviews.freebsd.org/D11713
13:11:20 - r321469
(2 days 3 hours ago)
by lwhsu
Affects:  /head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d
/head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d.out
Make this test case accepts basename() in D script returns "" or "."

In Solaris, basename(1) and basename(3) both return "." while being given an
empty string (""), while in BSD (and Linux) basename(1) returns "" and
basename(3) returns "."

While here, also change #!/usr/bin/ksh to #!/usr/bin/env ksh to find ksh in
$PATH

Reviewed by: gnn, markj (earlier version), ngie (earlier version)
Differential Revision: https://reviews.freebsd.org/D11707
13:07:06 - r321468
(2 days 3 hours ago)
by lwhsu
Affects:  /head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d
Explicitly set dynamic variable buffer size.

We added too many variable assignments in BEGIN block, which will run out of
default auto-configured variable buffer space. The test VM has 4G RAM which
should be enough for most cases so it's reasonable to increase limitation to
these case.

Reviewed by: gnn
Differential Revision: https://reviews.freebsd.org/D11676
13:04:24 - r321467
(2 days 3 hours ago)
by lwhsu
Affects:  /head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.cleanpath.d
Explicitly set dynamic variable buffer size.

We added too many variable assignments in BEGIN block, which will run out of
default auto-configured variable buffer space. The test VM has 4G RAM which
should be enough for most cases so it's reasonable to increase limitation to
these case.

Reviewed by: gnn, markj, ngie
Differential Revision: https://reviews.freebsd.org/D11674
13:01:10 - r321466
(2 days 3 hours ago)
by lwhsu
Affects:  /head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh
Add an auxiliary subroutine to generate read(2) event while testing.

Reviewed by: gnn, ngie
Differential Revision: https://reviews.freebsd.org/D11673
12:58:03 - r321465
(2 days 3 hours ago)
by lwhsu
Affects:  /head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.d
/head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe
/head/cddl/usr.sbin/dtrace/tests/common/speculation/Makefile
Add a simple script which calls open(2) and others to generate events for
testing.

This test times-out on a quiet system because there is nobody triggers
syscall::open:entry or syscall::: probe while test execution.

Reviewed by: gnn, markj (earlier version)
Differential Revision: https://reviews.freebsd.org/D11671
12:52:32 - r321464
(2 days 3 hours ago)
by lwhsu
Affects:  /head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.c
/head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.d
/head/cddl/usr.sbin/dtrace/tests/common/probes/Makefile
Add a simple program which calls sigtimedwait(2) to generate events for testing

This test timeout on a quiet system because there is nobody triggers
'syscall::*wait*:entry' probe while test execution.

Reviewed by: gnn, markj, ngie
Differential Revision: https://reviews.freebsd.org/D11668
11:05:53 - r321463
(2 days 5 hours ago)
by tuexen
Affects:  /head/sys/netinet/sctp_indata.c
Remove duplicate statement.
10:41:34 - r321462
(2 days 6 hours ago)
by andrew
Affects:  /head/share/mk/bsd.stand.mk
Build the 32-bit ARM libstand and loader parts with -fPIC. Many of them are
already built with this flag so libstand should also be build as such.
This will be needed when moving to lld as it refuses to link due to
incompatible relocations.

Sponsored by: DARPA, AFRL
09:48:33 - r321461
(2 days 7 hours ago)
by kib
Affects:  /head/lib/libc/x86/sys/__vdso_gettc.c
Fix indent.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
06:59:35 - r321460
(2 days 9 hours ago)
by dchagin
Affects:  /head/sys/fs/fdescfs/fdesc.h
Replace unnecessary _KERNEL by double-include protection.

MFC after: 2 week
04:13:43 - r321459
(2 days 12 hours ago)
by alc
Affects: 
(3 files)
/stable/10/sys/kern/subr_blist.c
/stable/10/sys/sys/blist.h
MFC r320077
  Change blist_alloc()'s allocation policy from first-fit to next-fit so
  that disk writes are more likely to be sequential. This change is
  beneficial on both the solid state and mechanical disks that I've
  tested. (A similar change in allocation policy was made by DragonFly
  BSD in 2013 to speed up Poudriere with "stressful memory parameters".)

  Increase the width of blst_meta_alloc()'s parameter "skip" and the local
  variables whose values are derived from it to 64 bits. (This matches the
  width of the field "skip" that is stored in the structure "blist" and
  passed to blst_meta_alloc().)

  Eliminate a pointless check for a NULL blist_t.

  Simplify blst_meta_alloc()'s handling of the ALL-FREE case.

  Address nearby style errors.

MFC r320417
  Address the remaining integer overflow issues with the "skip" parameters
  and "next_skip" variables. The "skip" value in struct blist has long been
  a 64-bit quantity but various functions have implicitly truncated this
  value to 32 bits. Now, all arithmetic involving the "skip" value is 64
  bits wide. (This should allow us to relax the size limit on a swap device
  in the swap pager.)

  Maintain the ability to test this allocator as a user-space application by
  including <stdbool.h>.

  Remove an unused variable from blst_radix_print().

MFC r320527
  Change blst_leaf_alloc() to handle a cursor argument, and to improve
  performance.

  To find in the leaf bitmap all ranges of sufficient length, use a doubling
  strategy with shift-and-and until each bit still set represents a bit
  sequence of length 'count', or until the bitmask is zero. In the latter
  case, update the hint based on the first bit sequence length not found to
  be available. For example, seeking an interval of length 12, the set bits
  of the bitmap would represent intervals of length 1, then 2, then 3, then
  6, then 12. If no bits are set at the point when each bit represents an
  interval of length 6, then the hint can be updated to 5 and the search
  terminated.

  If long-enough intervals are found, discard those before the cursor. If
  any remain, use binary search to find the position of the first of them,
  and allocate that interval.
03:59:35 - r321458
(2 days 12 hours ago)
by ngie
Affects: 
(16 files)
/projects/runtime-coverage/*
MFhead@r321457
03:56:42 - r321457
(2 days 12 hours ago)
by ngie
Affects:  /head/lib/msun/tests/trig_test.c
Mark :reduction as an expected failure

It fails with clang 5.0+.

PR: 220989
MFC after: 2 months
MFC with: r321369
Reported by: Jenkins
03:55:44 - r321456
(2 days 12 hours ago)
by ngie
Affects:  /head/lib/msun/tests/Makefile
/head/lib/msun/tests/trig_test.c
Convert lib/msun/trig_test from TAP to ATF format

Only expose :accuracy and :reduction if !i386, similar to before,
but more holistically to avoid future -Wunused issue with the unused
functions.

MFC after: 1 month
03:54:35 - r321455
(2 days 12 hours ago)
by ngie
Affects:  /head/lib/msun/tests/Makefile
Raise WARNS to 1

This will enable warnings with the msun tests.

MFC after: 1 month
03:48:24 - r321454
(2 days 13 hours ago)
by ngie
Affects:  /projects/runtime-coverage/lib/msun/tests/trig_test.c
Mark :reduction as an expected failure

It fails with clang 5.0+.

PR: 220989
MFC after: 2 months
MFC with: r321369
Reported by: Jenkins
03:43:00 - r321453
(2 days 13 hours ago)
by alc
Affects: 
(3 files)
/stable/11/sys/kern/subr_blist.c
/stable/11/sys/sys/blist.h
MFC r320077
  Change blist_alloc()'s allocation policy from first-fit to next-fit so
  that disk writes are more likely to be sequential. This change is
  beneficial on both the solid state and mechanical disks that I've
  tested. (A similar change in allocation policy was made by DragonFly
  BSD in 2013 to speed up Poudriere with "stressful memory parameters".)

  Increase the width of blst_meta_alloc()'s parameter "skip" and the local
  variables whose values are derived from it to 64 bits. (This matches the
  width of the field "skip" that is stored in the structure "blist" and
  passed to blst_meta_alloc().)

  Eliminate a pointless check for a NULL blist_t.

  Simplify blst_meta_alloc()'s handling of the ALL-FREE case.

  Address nearby style errors.

MFC r320417
  Address the remaining integer overflow issues with the "skip" parameters
  and "next_skip" variables. The "skip" value in struct blist has long been
  a 64-bit quantity but various functions have implicitly truncated this
  value to 32 bits. Now, all arithmetic involving the "skip" value is 64
  bits wide. (This should allow us to relax the size limit on a swap device
  in the swap pager.)

  Maintain the ability to test this allocator as a user-space application by
  including <stdbool.h>.

  Remove an unused variable from blst_radix_print().

MFC r320527
  Change blst_leaf_alloc() to handle a cursor argument, and to improve
  performance.

  To find in the leaf bitmap all ranges of sufficient length, use a doubling
  strategy with shift-and-and until each bit still set represents a bit
  sequence of length 'count', or until the bitmask is zero. In the latter
  case, update the hint based on the first bit sequence length not found to
  be available. For example, seeking an interval of length 12, the set bits
  of the bitmap would represent intervals of length 1, then 2, then 3, then
  6, then 12. If no bits are set at the point when each bit represents an
  interval of length 6, then the hint can be updated to 5 and the search
  terminated.

  If long-enough intervals are found, discard those before the cursor. If
  any remain, use binary search to find the position of the first of them,
  and allocate that interval.
03:41:05 - r321452
(2 days 13 hours ago)
by ngie
Affects:  /projects/runtime-coverage/lib/msun/tests/Makefile
/projects/runtime-coverage/lib/msun/tests/trig_test.c
Convert lib/msun/trig_test from TAP to ATF format

Only expose :accuracy and :reduction if !i386, similar to before,
but more holistically to avoid future -Wunused issue with the unused
functions.

MFC after: 1 month
03:33:39 - r321451
(2 days 13 hours ago)
by ngie
Affects:  /projects/runtime-coverage/lib/msun/tests/Makefile
Raise WARNS to 1

This will enable warnings with the msun tests.

MFC after: 1 month
01:50:37 - r321450
(2 days 15 hours ago)
by kevans
Affects:  /head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh
/head/usr.bin/grep/util.c
bsdgrep(1): Don't exit before processing every file

Given an empty pattern (i.e. grep "" A B), bsdgrep(1) would previously exit()
with the appropriate exit code upon encountering an empty file. Likely intended
as an optimization, but this behavior is technically incorrect since an empty
pattern should match every line.

PR: 220924
Reviewed by: emaste, cem (earlier version), ngie
Approved by: emaste (mentor)
Differential Revision: https://reviews.freebsd.org/D11698
00:33:53 - r321449
(2 days 16 hours ago)
by ngie
Affects:  /projects/runtime-coverage/etc/mtree/BSD.coverage.dist
/projects/runtime-coverage/etc/mtree/Makefile
Install BSD.coverage.dist if MK_COVERAGE == no

This file is basically the same as BSD.debug.dist -- the only different is the
prefix.
00:30:25 - r321448
(2 days 16 hours ago)
by markj
Affects:  /stable/11/sbin/savecore/savecore.c
Include stdbool.h for r321447.

This is a direct commit to stable/11.
00:28:29 - r321447
(2 days 16 hours ago)
by markj
Affects: 
(2 files)
/stable/11/sbin/savecore/savecore.c
MFC r320896:
Add a subroutine for comparing kerneldump identifiers.
00:28:23 - r321446
(2 days 16 hours ago)
by ngie
Affects:  /head/etc/mtree/Makefile
Unconditionally install etc/mtree/BSD.debug.dist again

r279248 unconditionally installed BSD.debug.dist for ease-of-developer-use.
Restore the previous behavior.

While here, add a comment to note that this is intentional to avoid accidental
future removal.

MFC after: 2 months
MFC with: r321444
00:12:48 - r321445
(2 days 16 hours ago)
by bdrewery
Affects:  /head/share/mk/bsd.obj.mk
cleandir: Fix ESTALE errors from parallel removals.

This fixes 'make cleandir' to use the same ordering as 'make cleanobj'.
Meaning that SUBDIR will be recursed before the current directory is
handled. This avoids an 'rm -rf /usr/obj/usr/src/lib/libc' while
a child 'rm -rf /usr/obj/usr/src/lib/libc/tests' is being ran next,
or even removing the current directory and then recursing into a child
and using the 'missing OBJDIR' logic to remove files rather than the
directory.

The most ideal ordering here would be for 'cleanobj' and 'cleandir' to
simply remove the .OBJDIR and then not recurse at all. This is only
safe if it is guaranteed that all children directories have no orphaned
files in their source checkout and are only using obj directories. This
is usually safe from the top-level build targets and when using
WITH_AUTO_OBJ. Improving the build for those cases is coming.

Reported by: cperciva, scottl
X-MFC-With: r321427
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
2017 - 07 - 24   (3 days ago)
23:57:43 - r321444
(2 days 16 hours ago)
by ngie
Affects:  /head/etc/Makefile
Remove ${MTREE} and leverage etc/mtree/Makefile instead with
"make distribution".

This also fixes the fact that BSD.debug.dist was being installed if/when
${MK_DEBUG_FILES} != "no" before this commit.

MFC after: 2 months
23:32:46 - r321443
(2 days 17 hours ago)
by bdrewery
Affects:  /head/Makefile.inc1
NO_CLEAN: Utilize delete-old to remove old orphaned libraries/headers in
WORLDTMP.

This prevents situations with -DNO_CLEAN from finding stale headers or
libraries in places that no longer exist or have moved. It avoids
the need to remove all of WORLDTMP by reusing what we already know
is obsolete.

MFC after: 1 month
Sponsored by: Dell EMC Isilon
23:32:43 - r321442
(2 days 17 hours ago)
by bdrewery
Affects:  /head/Makefile.inc1
The .depend.obj cleanup hacks are only needed with -DNO_CLEAN.

Sponsored by: Dell EMC Isilon
23:32:40 - r321441
(2 days 17 hours ago)
by bdrewery
Affects:  /head/share/mk/bsd.dep.mk
/head/sys/conf/kern.post.mk
Allow disabling dependency tracking if DEPEND_CFLAGS is empty.

This falls back on using the guesssed dependencies if so.
Also remove a pre-bmake check while here.

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
23:32:36 - r321440
(2 days 17 hours ago)
by bdrewery
Affects:  /head/share/mk/bsd.dep.mk
/head/sys/conf/kern.post.mk
Slightly simplify logic for which depend file is expected.

This is a NOP.

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
23:32:24 - r321439
(2 days 17 hours ago)
by bdrewery
Affects:  /head/Makefile.inc1
/head/lib/clang/libllvm/Makefile
Move llvm Options.inc hack from r321433 for NO_CLEAN to lib/clang/libllvm.

The files are only ever generated to .OBJDIR, not to WORLDTMP (as a
sysroot) and are only ever included from a compilation. So using
a beforebuild target here removes the file before the compilation
tries to include it.

MFC after: 2 months
X-MFC-With: r321369
22:26:48 - r321438
(2 days 18 hours ago)
by ngie
Affects:  /projects/make-check-sandbox
Copy ^/head to ^/projects/make-check-sandbox

The goal of this project is to simplify using "make check" from a directory
where one would want to test out a library and/or program without installing
it to a running system, i.e., via MAKEOBJDIRPREFIX.
21:51:41 - r321437
(2 days 18 hours ago)
by markj
Affects:  /head/sbin/savecore/savecore.c
Fix style and wrap lines to 80 columns in savecore.c.

No functional change intended.

MFC after: 3 days
21:25:49 - r321436
(2 days 19 hours ago)
by emaste
Affects:  /head/usr.bin/ar/write.c
ar: handle partial writes from archive_write_data

libarchive may limit a single archive_write_data call to handling
0x7fffffff bytes. Add a loop to handle partial writes.

Reviewed by: kib, jhb
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D11715
19:17:13 - r321435
(2 days 21 hours ago)
by np
Affects:  /head/sys/dev/cxgbe/common/common.h
/head/sys/dev/cxgbe/t4_main.c
cxgbe(4): Display some more TOE parameters related to retransmission
and keepalive in the sysctl MIB. Provide tunables to change some of
these parameters. These are supposed to be setup by the firmware so
these tunables are for experimentation only.

MFC after: 2 weeks
Sponsored by: Chelsio Communications
18:54:56 - r321434
(2 days 21 hours ago)
by bdrewery
Affects:  /head/Makefile
Add some .ORDER for distrib-dirs, distribute, distribution and distributeworld.

Reported by: Mark Millard
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
18:52:40 - r321433
(2 days 21 hours ago)
by dim
Affects:  /head/Makefile.inc1
Cleanup stale Options.inc files from the previous libllvm build for
clang 4.0.0. Otherwise, these can get included before the two newly
generated ones (which are different) for clang 5.0.0.

Reported by: Mark Millard
MFC after: 2 months
X-MFC-With: r321369
18:25:08 - r321432
(2 days 22 hours ago)
by ngie
Affects: 
(5 files)
/projects/runtime-coverage/lib/libefivar/uefi-dputil.c
/projects/runtime-coverage/share/mk/*
MFhead@r321431
18:21:01 - r321431
(2 days 22 hours ago)
by ngie
Affects:  /head/share/mk/bsd.opts.mk
Use __DEFAULT_DEPENDENT_OPTIONS for articulating dependency relationship
between MK_STALE_STAGED and MK_STAGING instead of using equivalent ad hoc
logic.

MFC after: 1 month
18:16:54 - r321430
(2 days 22 hours ago)
by ngie
Affects:  /projects/runtime-coverage/share/mk/bsd.opts.mk
MK_COVERAGE should rely on MK_DEBUG_FILES

Building programs and libraries with --coverage without having corresponding
symbol support built in to them doesn't make a whole lot of sense.
18:10:42 - r321429
(2 days 22 hours ago)
by imp
Affects:  /head/lib/libefivar/uefi-dputil.c
fix typo
18:03:59 - r321428
(2 days 22 hours ago)
by svnmir
Affects: 
(6789 files)
/projects/runtime-coverage/*
MFhead@r320180
17:54:03 - r321427
(2 days 22 hours ago)
by bdrewery
Affects:  /head/share/mk/bsd.obj.mk
/head/share/mk/bsd.progs.mk
PROGS: Fix ESTALE errors on NFS while cleaning in directories with PROGS.

- Only recurse on cleanobj/cleandir if there is no .OBJDIR being used.
  If we don't recurse then bsd.obj.mk will just rm -rf the OBJDIR dir.
- When recursing on cleanobj/cleandir don't remove dependfiles/dirs
  redundantly from the child and main processes. Meaning '.depend', and
  'tags', and '.depend.*' will now only be removed from the main
  process.
- Stop recursing on 'cleandepend' since the main process can handle
  removing all files via the default glob patterns in CLEANDEPENDFILES.
- This reverts r288201, by readding recursion on 'cleanobj', due to
  r291635 changing how bsd.subdir.mk handles recursion.

This is primarily targeting ESTALE NFS errors from rm(1) during a
buildworld but is also a performance optimization as both issues fixed
were redundant anyway.

Reported by: cperciva, scottl
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
17:53:45 - r321426
(2 days 22 hours ago)
by bdrewery
Affects:  /head/share/mk/bsd.obj.mk
cleanobj: Unhide removal of directory.

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
17:29:56 - r321425
(2 days 23 hours ago)
by ngie
Affects:  /head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl
Fix whitespace on a line in fix(..) accidentally missed in r321424

MFC after: 1 month
MFC with: r321424
17:27:21 - r321424
(2 days 23 hours ago)
by ngie
Affects:  /head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl
Style cleanup: delete spurious trailing whitespace

MFC after: 1 month
17:23:53 - r321423
(2 days 23 hours ago)
by alc
Affects:  /head/sys/kern/subr_blist.c
Change the interactions of the interface functions with the "meta" and
"leaf" functions for alloc, free, and fill. After the change, the interface
functions call "meta" unconditionally, and the "meta" functions recur
unconditionally in looping over their descendants. The "meta" functions
start with a validity test, and then a test for the "leaf" case, before
falling into the general recursive case. This simplifies and shrinks the
code, and, for "free" and "fill" moves panic tests that check the same meta
node repeatedly in a loop to a place that will have each node tested once.

Remove irrelevant null checks from blist_free and blist_fill.

Make the code that initializes a meta node the same in blist_meta_alloc and
blist_meta_fill.

Parenthesize return expressions in blst_meta_fill.

Submitted by: Doug Moore <dougm@rice.edu>
MFC after: 1 week
16:58:54 - r321422
(2 days 23 hours ago)
by trasz
Affects:  /head/usr.bin/ktrace/ktrace.1
Improve the ktrace(1) man page to make it slightly more obvious that there
are _two_ options that control its behaviour wrt child processes; slightly
improve the example[1], and add Xrefs.

Discussed with: wblock [1]
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
16:45:38 - r321421
(3 days ago)
by ngie
Affects: 
(3 files)
/stable/10/lib/msun/Makefile
/stable/10/lib/msun/man/exp.3
MFC r290605,r290606:

r290605:

Document powl(3)

PR: 191751

r290606:

Bump .Dd
16:33:06 - r321420
(3 days ago)
by dim
Affects:  /head/lib/clang/liblldb/Makefile
Add a few more object files to liblldb, which should solve errors when
linking the lldb executable in some cases. In particular, when the
-ffunction-sections -fdata-sections options are turned off, or
ineffective.

Reported by: Shawn Webb, Mark Millard
MFC after: 2 months
X-MFC-With: r308421
16:24:22 - r321419
(3 days ago)
by markj
Affects: 
(2 files)
/stable/11/usr.bin/top/machine.c
MFC r321356:
Fix top(1) output when zfs.ko is loaded but ZFS is not in use.
16:23:28 - r321418
(3 days ago)
by markj
Affects: 
(2 files)
/stable/11/sys/kern/kern_shutdown.c
MFC r320918, r321035:
Have mkdumpheader() handle version string truncation.
15:39:09 - r321417
(3 days 1 hour ago)
by emaste
Affects:  /head/share/mk/bsd.linker.mk
lld 5.0 supports filter libraries, so enable linker feature flag

Also switch the logic to enable this for any non-lld linker, since
filter library support is fairly simple and is very likely supported
by any other linker capable of linking the FreeBSD base system.

MFC after: 2 months
MFC with: r321369
Sponsored by: The FreeBSD Foundation
14:42:45 - r321416
(3 days 2 hours ago)
by ken
Affects: 
(3 files)
/stable/10/sys/dev/mpr/mpr.c
/stable/10/sys/dev/mps/mps.c
MFC r321207:
  ------------------------------------------------------------------------
  r321207 | ken | 2017-07-19 09:39:01 -0600 (Wed, 19 Jul 2017) | 14 lines

  Fix spurious timeouts on commands sent to mps(4) and mpr(4) controllers.

  mps_wait_command() and mpr_wait_command() were using getmicrotime() to
  determine elapsed time when checking for a timeout in polled mode.
  getmicrotime() isn't guaranteed to monotonically increase, and that
  caused spurious timeouts occasionally.

  Switch to using getmicrouptime(), which does increase monotonically.
  This fixes the spurious timeouts in my test case.

  ------------------------------------------------------------------------
Reviewed by: slm, scottl
Sponsored by: Spectra Logic
14:42:43 - r321415
(3 days 2 hours ago)
by ken
Affects: 
(3 files)
/stable/11/sys/dev/mpr/mpr.c
/stable/11/sys/dev/mps/mps.c
MFC r321207:
  ------------------------------------------------------------------------
  r321207 | ken | 2017-07-19 09:39:01 -0600 (Wed, 19 Jul 2017) | 14 lines

  Fix spurious timeouts on commands sent to mps(4) and mpr(4) controllers.

  mps_wait_command() and mpr_wait_command() were using getmicrotime() to
  determine elapsed time when checking for a timeout in polled mode.
  getmicrotime() isn't guaranteed to monotonically increase, and that
  caused spurious timeouts occasionally.

  Switch to using getmicrouptime(), which does increase monotonically.
  This fixes the spurious timeouts in my test case.

  ------------------------------------------------------------------------
Reviewed by: slm, scottl
Sponsored by: Spectra Logic
06:49:57 - r321414
(3 days 10 hours ago)
by mav
Affects: 
(3 files)
/stable/11/sys/amd64/vmm/io/vhpet.c
/stable/11/sys/amd64/vmm/io/vioapic.c
MFC r302843:
Increase number of I/O APIC pins from 24 to 32 to give PCI up to 16 IRQs.

Move HPET to the top of the supported 0-31 range.
06:19:04 - r321413
(3 days 10 hours ago)
by mav
Affects: 
(4 files)
/stable/11/usr.sbin/bhyve/Makefile
/stable/11/usr.sbin/bhyve/pci_virtio_console.c
/stable/11/usr.sbin/bhyve/virtio.h
MFC r305898, r309120, r309121 (by jceel):
Add virtio-console support to bhyve.

Adds virtio-console device support to bhyve, allowing to create
bidirectional character streams between host and guest.

Syntax:
-s <slotnum>,virtio-console,port1=/path/to/port1.sock,anotherport=...

Maximum of 16 ports per device can be created. Every port is named
and corresponds to an Unix domain socket created by bhyve. bhyve
accepts at most one connection per port at a time.

Limitations:
- due to lack of destructors of in bhyve, sockets on the filesystem
  must be cleaned up manually after bhyve exits
- there's no way to use "console port" feature, nor the console port
  resize as of now
- emergency write is advertised, but no-op as of now
06:07:44 - r321412
(3 days 10 hours ago)
by mav
Affects: 
(4 files)
/stable/11/sys/fs/*
/stable/11/sys/vm/*
Revert unexpected changes leaked into r321411.
05:52:10 - r321411
(3 days 10 hours ago)
by mav
Affects: 
(10 files)
/stable/11/sys/fs/*
/stable/11/sys/vm/*
/stable/11/usr.sbin/bhyve/*
MFC r302850: Make PCI interupts allocation static when using bootrom (UEFI).

This makes factual interrupt routing match one shipped with UEFI firmware.
With old firmware this make legacy interrupts work reliable for functions 0
of PCI slots 3-6. Updated UEFI image fixes problem completely.
04:38:05 - r321410
(3 days 12 hours ago)
by sjg
Affects: 
(9 files)
/head/contrib/bmake/*
/head/usr.bin/bmake/*
Import bmake-20170720

Includes fix for compat handling of interrupts.
04:00:43 - r321409
(3 days 12 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/netvsc/if_hn.c
hyperv/hn: Ignore LINK_SPEED_CHANGE status.

This status will be reported if the backend NIC is wireless; it's not
useful. Due to the high frequency of the reporting, this could be
pretty annoying; ignore it.

MFC after: 3 days
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D11651
03:59:50 - r321408
(3 days 12 hours ago)
by sephe
Affects:  /head/sys/net/rndis.h
rndis: Add LINK_SPEED_CHANGE status

Reviewed by: hselasky
MFC after: 3 days
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D11650
03:52:32 - r321407
(3 days 12 hours ago)
by sephe
Affects:  /head/sys/dev/hyperv/netvsc/if_hn.c
/head/sys/dev/hyperv/netvsc/if_hnvar.h
hyperv/hn: Export VF list and VF-HN mapping

The VF-HN map will be used later on to implement "transparent VF".

MFC after: 3 days
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D11618
03:32:10 - r321406
(3 days 13 hours ago)
by sephe
Affects:  /head/sys/net/ethernet.h
/head/sys/net/if_ethersubr.c
ethernet: Add ethernet interface attached event and devctl notification.

ifnet_arrival_event may not be adequate under certain situation; e.g.
when the LLADDR is needed. So the ethernet ifattach event is announced
after all necessary bits are setup.

MFC after: 3 days
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D11617
02:13:46 - r321405
(3 days 14 hours ago)
by sephe
Affects: 
(2 files)
/stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
MFC 321286

  hyperv/storvsc: Force SPC3 for CDROM attached.

  This unbreaks the CDROM attaching on GEN2 VMs. On GEN1 VMs, CDROM is
  attached to emulated ATA controller.

  PR: 220790
  Submitted by: Hongjiang Zhang <honzhan microsoft com>
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D11634
01:39:58 - r321404
(3 days 15 hours ago)
by sephe
Affects: 
(2 files)
/stable/11/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
MFC 321286

  hyperv/storvsc: Force SPC3 for CDROM attached.

  This unbreaks the CDROM attaching on GEN2 VMs. On GEN1 VMs, CDROM is
  attached to emulated ATA controller.

  PR: 220790
  Submitted by: Hongjiang Zhang <honzhan microsoft com>
  Sponsored by: Microsoft
  Differential Revision: https://reviews.freebsd.org/D11634
00:53:43 - r321403
(3 days 15 hours ago)
by sjg
Affects:  /vendor/NetBSD/bmake/20170720
tag bmake-20170720
00:52:52 - r321402
(3 days 15 hours ago)
by sjg
Affects: 
(6 files)
/vendor/NetBSD/bmake/dist/*
Import bmake-20170720

compat.c: pass SIGINT etc onto child and wait for it to exit
before we self-terminate.
2017 - 07 - 23   (4 days ago)
22:38:00 - r321401
(3 days 18 hours ago)
by avos
Affects:  /head/sys/net80211/ieee80211_amrr.c
/head/sys/net80211/ieee80211_rssadapt.c
net80211: do not allow to unload rate control module if it is still in use.

Keep 'nrefs' counter up-to-date, so 'kldunload wlan_amrr' with 1+ active
wlan(4) interface will not lead to kernel panic.

MFC after: 5 days
21:28:00 - r321400
(3 days 19 hours ago)
by ian
Affects:  /head/sys/kern/subr_clock.c
Add common code to support realtime clocks that store year without century.

Most realtime clocks store the year as 2 BCD digits. Some add a century bit
to extend the range another hundred years. Every clock driver has its own
code to determine the century and pass a full year value to clock_ct_to_ts().
Now clock drivers can just convert BCD to bin and store the result in the
clocktime struct and let the common code figure out the century. Clocks
with a century bit can just add 100 to year if the century bit is on.
20:41:58 - r321399
(3 days 20 hours ago)
by wulf
Affects: 
(9 files)
/head/sys/dev/evdev/*
Change my email address to wulf@FreeBSD.org in copyright headers.

Approved by: gonzo (mentor)
MFC after: 2 weeks
20:35:26 - r321398
(3 days 20 hours ago)
by wulf
Affects:  /head/sys/dev/evdev/evdev.c
/head/sys/dev/evdev/evdev_mt.c
/head/sys/dev/evdev/evdev_private.h
evdev: Macroize common locking sequences

Reviewed by: gonzo
Approved by: gonzo (mentor)
MFC after: 2 weeks
20:32:54 - r321397
(3 days 20 hours ago)
by wulf
Affects: 
(7 files)
/head/sys/dev/evdev/*
evdev: style(9), sort headers alphabetically

Pointed out by: bde
Reviewed by: gonzo
Approved by: gonzo (mentor)
MFC after: 2 weeks
20:25:53 - r321396
(3 days 20 hours ago)
by pstef
Affects:  /head/usr.bin/indent/pr_comment.c
/head/usr.bin/indent/tests/comments.0
/head/usr.bin/indent/tests/comments.0.stdout
indent(1): better alignment of comments on code.

If aligning the beginning of a comment to -cn would mean no space between
code and the comment, align it to the next tab stop.
19:54:54 - r321395
(3 days 20 hours ago)
by rmacklem
Affects:  /projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdport.c
Since "struct nfsrv_descript" has grown to about 200bytes, malloc it to avoid
excessive stack usage.
19:50:27 - r321394
(3 days 21 hours ago)
by rmacklem
Affects:  /projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdport.c
Since "struct nfsrv_descript" has grown to about 200bytes, malloc it to
avoid excessive kernel stack usage.
19:35:14 - r321393
(3 days 21 hours ago)
by alc
Affects:  /head/sys/vm/vm_fault.c
Address a compilation warning on some architectures that was introduced
by the previous change, r321386.

Reported by: ian
MFC after: 10 days
X-MFC after: r321386
19:00:28 - r321392
(3 days 21 hours ago)
by mw
Affects:  /head/share/misc/committers-src.dot
Add myself (mw) as a src committer and cognet as my mentor.

Reviewed by: cognet (mentor)
Approved by: cognet (mentor)
18:13:19 - r321391
(3 days 22 hours ago)
by ngie
Affects: 
(2 files)
/stable/11/targets/pseudo/tests/Makefile.depend
MFC r316603,r321214:

r316603:

META_MODE: add additional reachover relative paths to DIRDEPS_BUILD

These additional entries are being added, after their addition to the
source tree.

r321214:

Update targets/pseudo/tests/Makefile.depend after recent additions/subtractions
from the FreeBSD test suite.

MFC with: r316603
18:10:47 - r321390
(3 days 22 hours ago)
by np
Affects:  /head/sys/dev/cxgbe/common/common.h
/head/sys/dev/cxgbe/common/t4_hw.c
/head/sys/dev/cxgbe/t4_main.c
cxgbe(4): Install the firmware bundled with the driver to the card if it
doesn't seem to have one. This lets the driver recover automatically
from incomplete firmware upgrades (panic, reboot, power loss, etc. in
the middle of an upgrade).

MFC after: 2 weeks
Sponsored by: Chelsio Communications
18:00:11 - r321389
(3 days 22 hours ago)
by ngie
Affects: 
(2 files)
/stable/10/usr.sbin/cron/cron/cron.8
MFC r321240:

cron(8) manpage updates

- Document /etc/cron.d and /usr/local/etc/cron.d under FILES.
- Reword documentation for -n: add appropriate soft-stop and remove
  contraction to appease igor.
18:00:03 - r321388
(3 days 22 hours ago)
by ngie
Affects: 
(2 files)
/stable/11/usr.sbin/cron/cron/cron.8
MFC r321240:

cron(8) manpage updates

- Document /etc/cron.d and /usr/local/etc/cron.d under FILES.
- Reword documentation for -n: add appropriate soft-stop and remove
  contraction to appease igor.
17:57:00 - r321387
(3 days 22 hours ago)
by ngie
Affects:  /head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/man.CoalesceTrace.d
Don't use incorrect hardcoded path to ksh -- use /usr/bin/env
to find ksh instead

MFC after: 1 month
16:28:13 - r321386
(4 days ago)
by alc
Affects:  /head/sys/vm/vm_fault.c
/head/sys/vm/vm_reserv.c
/head/sys/vm/vm_reserv.h
Utilize pmap_enter(..., psind=1) in vm_fault_soft_fast() on amd64. (The
Differential Revision discusses the benefits of this change.)

Add a function, vm_reserv_to_superpage(), that returns the superpage
containing the specified base page.

Reviewed by: kib, markj
Tested by: pho
MFC after: 10 days
Differential Revision: https://reviews.freebsd.org/D11556
16:11:47 - r321385
(4 days ago)
by marius
Affects: 
(15 files)
/head/sys/dev/mmc/*
/head/sys/dev/sdhci/*
o Add support for eMMC HS200 and HS400 bus speed modes at 200 MHz to
  sdhci(4), mmc(4) and mmcsd(4). For the most part, this consists of:
  - Correcting and extending the infrastructure for negotiating and
  enabling post-DDR52 modes already added as part of r315598. In
  fact, HS400ES now should work as well but hasn't been activated
  due to lack of corresponding hardware.
  - Adding support executing standard SDHCI initial tuning as well
  as re-tuning as required for eMMC HS200/HS400 and the fast UHS-I
  SD card modes. Currently, corresponding methods are only hooked
  up to the ACPI and PCI front-ends of sdhci(4), though. Moreover,
  sdhci(4) won't offer any modes requiring (re-)tuning to the MMC/SD
  layer in order to not break operations with other sdhci(4) front-
  ends. Likewise, sdhci(4) now no longer offers modes requiring the
  set_uhs_timing method introduced in r315598 to be implemented/
  hooked up (previously, this method was used with DDR52 only, which
  in turn is only available with Intel controllers so far, i. e. no
  such limitation was necessary before). Similarly for 1.2/1.8 V VCCQ
  support and the switch_vccq method.
  - Addition of locking to the IOCTL half of mmcsd(4) to prevent races
  with detachment and suspension, especially since it's required to
  immediately switch away from RPMB partitions again after an access
  to these (so re-tuning can take place anew, given that the current
  eMMC specification v5.1 doesn't allow tuning commands to be issued
  with a RPMB partition selected). Therefore, the existing part_mtx
  lock in the mmcsd(4) softc is additionally renamed to disk_mtx in
  order to denote that it only refers to the disk(9) half, likewise
  for corresponding macros.

  On the system where the addition of DDR52 support increased the read
  throughput to ~80 MB/s (from ~45 MB/s at high speed), HS200 yields
  ~154 MB/s and HS400 ~187 MB/s, i. e. performance now has more than
  quadrupled compared to pre-r315598.

  Also, with the advent of (re-)tuning support, most infrastructure
  necessary for SD card UHS-I modes up to SDR104 now is also in place.
  Note, though, that the standard SDHCI way of (re-)tuning is special
  in several ways, which also is why sending the actual tuning requests
  to the device is part of sdhci(4). SDHCI implementations not following
  the specification, MMC and non-SDHCI SD card controllers likely will
  use a generic implementation in the MMC/SD layer for executing tuning,
  which hasn't been written so far, though.

  However, in fact this isn't a feature-only change; there are boards
  based on Intel Bay Trail where DDR52 is problematic and the suggested
  workaround is to use HS200 mode instead. So far exact details are
  unknown, however, i. e. whether that's due to a defect in these SoCs
  or on the boards.

  Moreover, due to the above changes requiring to be aware of possible
  MMC siblings in the fast path of mmc(4), corresponding information
  now is cached in mmc_softc. As a side-effect, mmc_calculate_clock(),
  mmc_delete_cards(), mmc_discover_cards() and mmc_rescan_cards() now
  all are guaranteed to operate on the same set of devices as there no
  longer is any use of device_get_children(9), which can fail in low
  memory situations. Likewise, mmc_calculate_clock() now longer will
  trigger a panic due to the latter.

o Fix a bug in the failure reporting of mmcsd_delete(); in case of an
  error when the starting block of a previously stored erase request
  is used (in order to be able to erase a full erase sector worth of
  data), the starting block of the newly supplied bio_pblkno has to be
  returned for indicating no progress. Otherwise, upper layers might
  be told that a negative number of BIOs have been completed, leading
  to a panic.

o Fix 2 bugs on resume:
  - Things done in fork1(9) like the acquisition of an SX lock or the
  sleepable memory allocation are incompatible with a MTX_DEF taken.
  Thus, mmcsd_resume() must not call kproc_create(9), which in turn
  uses fork1(9), with the disk_mtx (formerly part_mtx) held.
  - In mmc_suspend(), the bus is powered down, which in the typical
  case of a device being selected at the time of suspension, causes
  the device deselection as part of the bus acquisition by mmc(4) in
  mmc_scan() to fail as the bus isn't powered up again before later
  in mmc_go_discovery(). Thus, power down with the bus acquired in
  mmc_suspend(), which will trigger the deselection up-front.

o Fix a memory leak in mmcsd_ioctl() in case copyin(9) fails. [1]

o Fix missing variable initialization in mmc_switch_status(). [2]

o Fix R1_SWITCH_ERROR detection in mmc_switch_status(). [3]

o Handle the case of device_add_child(9) failing, for example due to
  a memory shortage, gracefully in mmc(4) and sdhci(4), including not
  leaking memory for the instance variables in case of mmc(4) (which
  might or might not fix [4] as the latter problem has been discovered
  independently).

o Handle the case of an unknown SD CSD version in mmc_decode_csd_sd()
  gracefully instead of calling panic(9).

o Again, check and handle the return values of some additional function
  calls in mmc(4) instead of assuming that everything went right or mark
  non-fatal errors by casting the return value to void.

o Correct a typo in the Linux IOCTL compatibility; it should have been
  MMC_IOC_MULTI_CMD rather than MMC_IOC_CMD_MULTI.

o Now that we are reaching ever faster speeds (more improvement in this
  regard is to be expected when adding ADMA support to sdhci(4)), apply
  a few micro-optimizations like predicting mmc(4) and sdhci(4) debugging
  to be off or caching erase sector and maximum data sizes as well support
  of block addressing in mmsd(4) (instead of doing 2 indirections on every
  read/write request for determining the maximum data size for example).

Reported by: Coverity
CID: 1372612 [1], 1372624 [2], 1372594 [3], 1007069 [4]
15:22:06 - r321384
(4 days 1 hour ago)
by hselasky
Affects: 
(7430 files)
/projects/bsd_rdma_4_9/*
Merge ^/head r319973 through 321382.
15:07:52 - r321383
(4 days 1 hour ago)
by pstef
Affects:  /head/usr.bin/indent/tests/comments.0.pro
/head/usr.bin/indent/tests/comments.pro
indent(1): rename the profile file.

Currently, indent's testing mechanism will attempt to apply options from
a file named ${test}.pro - and this test's filename is comments.0.
14:33:04 - r321382
(4 days 2 hours ago)
by pstef
Affects:  /head/usr.bin/indent/pr_comment.c
/head/usr.bin/indent/tests/comments.pro
indent(1): don't produce unnecessary blank lines.

Don't force a blank line between an opening brace and a block comment -- not
even if -bbb (blank lines before block comments) is on.
14:04:45 - r321381
(4 days 2 hours ago)
by pstef
Affects: 
(14 files)
/head/usr.bin/indent/*
indent(1): don't produce unneeded space character in function declarators.
07:10:41 - r321380
(4 days 9 hours ago)
by adrian
Affects:  /head/sys/mips/conf/CARAMBOLA2.hints
/head/sys/mips/conf/std.AR933X
[ar933x] make carambola2 work again!

* Add in the hints needed for AR933x ath(4) support - this is the nicer way
  that allows ath to be a module;
* ATH_EEPROM_FIRMWARE is also required for all AR933x chipsets.

Tested:

* Carambola2, AR933x
07:02:10 - r321379
(4 days 9 hours ago)
by adrian
Affects:  /head/sys/mips/conf/std.AR933X
[ar933x] re-add the ar71xx_apb device for AR933x.

This prevents the console from working!

Tested:

* carambola2, AR933x
06:33:58 - r321378
(4 days 10 hours ago)
by alc
Affects:  /head/sys/amd64/amd64/pmap.c
/head/sys/amd64/include/pmap.h
/head/sys/vm/pmap.h
Add support for pmap_enter(..., psind=1) to the amd64 pmap. In other words,
add support for explicitly requesting that pmap_enter() create a 2MB page
mapping. (Essentially, this feature allows the machine-independent layer to
create superpage mappings preemptively, and not wait for automatic promotion
to occur.)

Export pmap_ps_enabled() to the machine-independent layer.

Add a flag to pmap_pv_insert_pde() that specifies whether it should fail or
reclaim a PV entry when one is not available.

Refactor pmap_enter_pde() into two functions, one by the same name, that is
a general-purpose function for creating PDE PG_PS mappings, and another,
pmap_enter_2mpage(), that is used to prefault 2MB read- and/or execute-only
mappings for execve(2), mmap(2), and shmat(2).

Submitted by: Yufeng Zhou <yz70@rice.edu> (an earlier version)
Reviewed by: kib, markj
Tested by: pho
MFC after: 10 days
Differential Revision: https://reviews.freebsd.org/D11556
05:54:56 - r321377
(4 days 10 hours ago)
by alc
Affects:  /head/sys/vm/vm_page.c
In vm_page_ps_test(), always check that the base pages within the specified
superpage all belong to the same object. To date, that check has not been
needed, but upcoming changes require it. (See the Differential Revision.)

Reviewed by: kib, markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D11556
2017 - 07 - 22   (5 days ago)
21:29:44 - r321376
(4 days 19 hours ago)
by rlibby
Affects:  /head/sys/compat/linuxkpi/common/include/linux/compiler.h
linuxkpi compiler.h: avoid gcc -Wunused-value in dummy expressions

It looks like the __acquire and __release macros are for the consumption
of static analysis tools and have no semantic effect. Transform the
definitions from constant expressions to empty statements in order to
avoid -Wunused-value from gcc.

Likewise avoid future warnings for __chk_{user,io}_ptr, but with a cast
to void, because it looks like some linux kernel code may use those in
expression contexts.

Reviewed by: hselasky, markj
Approved by: markj (mentor)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D11695
17:49:18 - r321375
(4 days 23 hours ago)
by alc
Affects: 
(3 files)
/stable/10/sys/kern/subr_blist.c
/stable/10/sys/sys/blist.h
MFC r319905

Reduce the frequency of hint updates on allocation without incurring
additional allocation overhead. Previously, blst_meta_alloc() updated the
hint after every successful allocation. However, these "eager" hint
updates are of no actual benefit if, instead, the "lazy" hint update at
the start of blst_meta_alloc() is generalized to handle all cases where
the number of available blocks is less than the requested allocation.
Previously, the lazy hint update at the start of blst_meta_alloc() only
handled the ALL-FULL case. (I would also note that this change provides
consistency between blist_alloc() and blist_fill() in that their hint
maintenance is now entirely lazy.)

Eliminate unnecessary checks for terminators in blst_meta_alloc() and
blst_meta_fill() when handling ALL-FREE meta nodes.

Eliminate the field "bl_free" from struct blist. It is redundant. Unless
the entire radix tree is a single leaf, the count of free blocks is stored
in the root node. Instead, provide a function blist_avail() for obtaining
the number of free blocks.

In blst_meta_alloc(), perform a sanity check on the allocation once rather
than repeating it in a loop over the meta node's children.

In blst_leaf_fill(), use the optimized bitcount*() function instead of a
loop to count the blocks being allocated.

Add or improve several comments.

Address some nearby style errors.
17:23:13 - r321374
(4 days 23 hours ago)
by alc
Affects: 
(3 files)
/stable/11/sys/kern/subr_blist.c
/stable/11/sys/sys/blist.h
MFC r319905

Reduce the frequency of hint updates on allocation without incurring
additional allocation overhead. Previously, blst_meta_alloc() updated the
hint after every successful allocation. However, these "eager" hint
updates are of no actual benefit if, instead, the "lazy" hint update at
the start of blst_meta_alloc() is generalized to handle all cases where
the number of available blocks is less than the requested allocation.
Previously, the lazy hint update at the start of blst_meta_alloc() only
handled the ALL-FULL case. (I would also note that this change provides
consistency between blist_alloc() and blist_fill() in that their hint
maintenance is now entirely lazy.)

Eliminate unnecessary checks for terminators in blst_meta_alloc() and
blst_meta_fill() when handling ALL-FREE meta nodes.

Eliminate the field "bl_free" from struct blist. It is redundant. Unless
the entire radix tree is a single leaf, the count of free blocks is stored
in the root node. Instead, provide a function blist_avail() for obtaining
the number of free blocks.

In blst_meta_alloc(), perform a sanity check on the allocation once rather
than repeating it in a loop over the meta node's children.

In blst_leaf_fill(), use the optimized bitcount*() function instead of a
loop to count the blocks being allocated.

Add or improve several comments.

Address some nearby style errors.
16:58:47 - r321373
(4 days 23 hours ago)
by alc
Affects: 
(3 files)
/stable/11/sys/vm/swap_pager.c
/stable/11/sys/vm/vm_pageout.c
MFC r320319
  Increase the pageout cluster size to 32 pages.

  Decouple the pageout cluster size from the size of the hash table entry
  used by the swap pager for mapping (object, pindex) to a block on the
  swap device(s), and keep the size of a hash table entry at its current
  size.

  Eliminate a pointless macro.
14:03:20 - r321372
(5 days 2 hours ago)
by ed
Affects: 
(2 files)
/stable/11/include/stddef.h
MFC r320240:

  Use __ISO_C_VISIBLE, as opposed to testing __STDC_VERSION__.

  FreeBSD's C library uses __STDC_VERSION__ to determine whether the
  compiler provides language features specific to a certain version of the
  C standard. __ISO_C_VISIBLE is used to specify which library features
  need to be exposed.

  max_align_t currently uses __STDC_VERSION__, even though it should be
  using __ISO_C_VISIBLE to remain consistent with the rest of the headers
  in include/.
13:33:06 - r321371
(5 days 3 hours ago)
by kib
Affects:  /head/sys/vm/vm_object.c
Do not allocate struct kinfo_vmobject on stack.

Its size is 1184 bytes.

Noted by: eugen
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
12:51:19 - r321370
(5 days 3 hours ago)
by kp
Affects:  /head/lib/libsysdecode/Makefile
/head/lib/libsysdecode/mkioctls
Handle WITH/WITHOUT_PF in libsysdecode

Only filter out the PF ioctls if we're building without pf support.
Until now those were always filtered out, so truss did not show symbolic
names for pf ioctls.

Differential Revision: https://reviews.freebsd.org/D11629
11:08:25 - r321369
(5 days 5 hours ago)
by dim
Affects: 
(5169 files)
/head/*
Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to
5.0.0 (trunk r308421). Upstream has branched for the 5.0.0 release,
which should be in about a month. Please report bugs and regressions,
so we can get them into the release.

Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11
support to build; see UPDATING for more information.

MFC after: 2 months
10:38:44 - r321368
(5 days 6 hours ago)
by trasz
Affects:  /head/bin/ps/ps.1
Use the "tree" word in ps(1) -d option description, to make it easier
to find.

MFC after: 2 weeks
Sponsored by: DARPA, AFRL
10:15:11 - r321367
(5 days 6 hours ago)
by bcr
Affects: 
(2 files)
/stable/11/usr.sbin/ctladm/ctladm.8
MFC r321023:

The ctladm man page incorrectly duplicated the text for the
delete subcommand in the modify section. Rewrite the
modify description text in two places to say modify/modified
instead of remove/removed.

PR: 220710
Submitted by: sseekamp@risei.net
Reviewed by: mav@
Differential Revision: https://reviews.freebsd.org/D11608
09:03:40 - r321366
(5 days 7 hours ago)
by dchagin
Affects:  /head/sys/compat/linux/linux_ioctl.h
Style(9) whitespace fix.

MFC after: 1 week
07:28:44 - r321365
(5 days 9 hours ago)
by alc
Affects: 
(2 files)
/stable/10/sys/sys/blist.h
MFC r319756
  Style and comment fixes
07:09:38 - r321364
(5 days 9 hours ago)
by alc
Affects: 
(2 files)
/stable/11/sys/sys/blist.h
MFC r319756
  Style and comment fixes
06:40:57 - r321363
(5 days 10 hours ago)
by alc
Affects: 
(3 files)
/stable/10/sys/amd64/amd64/pmap.c
/stable/10/sys/i386/i386/pmap.c
MFC r320546
  When "force" is specified to pmap_invalidate_cache_range(), the given
  start address is not required to be page aligned. However, the loop
  within pmap_invalidate_cache_range() that performs the actual cache
  line invalidations requires that the starting address be truncated to
  a multiple of the cache line size. This change corrects an error in
  that truncation.
06:36:27 - r321362
(5 days 10 hours ago)
by alc
Affects: 
(3 files)
/stable/11/sys/amd64/amd64/pmap.c
/stable/11/sys/i386/i386/pmap.c
MFC r320546
  When "force" is specified to pmap_invalidate_cache_range(), the given
  start address is not required to be page aligned. However, the loop
  within pmap_invalidate_cache_range() that performs the actual cache
  line invalidations requires that the starting address be truncated to
  a multiple of the cache line size. This change corrects an error in
  that truncation.
05:58:10 - r321361
(5 days 10 hours ago)
by alc
Affects: 
(2 files)
/stable/10/sys/kern/uipc_shm.c
MFC r315621
  Use IDX_TO_OFF(), not ptoa(), when converting the difference between two
  vm_pindex_t's into a vm_ooffset_t.

  The length given to shm_dotruncate() must never be negative. Assert this.

  Tidy up a comment.
05:26:29 - r321360
(5 days 11 hours ago)
by alc
Affects: 
(2 files)
/stable/11/sys/kern/uipc_shm.c
MFC r315621
  Use IDX_TO_OFF(), not ptoa(), when converting the difference between two
  vm_pindex_t's into a vm_ooffset_t.

  The length given to shm_dotruncate() must never be negative. Assert this.

  Tidy up a comment.
04:57:51 - r321359
(5 days 11 hours ago)
by alc
Affects: 
(3 files)
/stable/10/sys/kern/kern_exec.c
/stable/10/sys/vm/vm_map.c
MFC r320498
  Clear the MAP_WIREFUTURE flag on the vm map in exec_new_vmspace() when it
  recycles the current vm space. Otherwise, an mlockall(MCL_FUTURE) could
  still be in effect on the process after an execve(2), which violates the
  specification for mlockall(2).

  It's pointless for vm_map_stack() to check the MEMLOCK limit. It will
  never be asked to wire the stack. Moreover, it doesn't even implement
  wiring of the stack.
04:20:08 - r321358
(5 days 12 hours ago)
by alc
Affects: 
(3 files)
/stable/11/sys/kern/kern_exec.c
/stable/11/sys/vm/vm_map.c
MFC r320498
  Clear the MAP_WIREFUTURE flag on the vm map in exec_new_vmspace() when it
  recycles the current vm space. Otherwise, an mlockall(MCL_FUTURE) could
  still be in effect on the process after an execve(2), which violates the
  specification for mlockall(2).

  It's pointless for vm_map_stack() to check the MEMLOCK limit. It will
  never be asked to wire the stack. Moreover, it doesn't even implement
  wiring of the stack.
03:54:04 - r321357
(5 days 12 hours ago)
by alc
Affects: 
(2 files)
/stable/11/sys/kern/vfs_bio.c
MFC r315597
  Style fixes. In particular, the variable "bogus" is used like a Boolean.
  Define it as such.
2017 - 07 - 21   (6 days ago)
23:53:48 - r321356
(5 days 16 hours ago)
by markj
Affects:  /head/usr.bin/top/machine.c
Fix top(1) output when zfs.ko is loaded but ZFS is not in use.

Reviewed by: allanjude
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D11693
23:08:13 - r321355
(5 days 17 hours ago)
by rmacklem
Affects:  /projects/pnfs-planb-server-stable11/sys/fs/nfsclient/nfs_clrpcops.c
r320062 introduced a bug when doing NFSv4.1 mounts against some non-FreeBSD
servers.

r320062 used nm_rsize, nm_wsize to set the maximum request/response sizes for
the NFSv4.1 session. If rsize,wsize are not specified as options, the
value of nm_rsize, nm_wsize is 0 at session creation, resulting in
values for request/response that are too small.
This patch fixes the problem. A workaround is to specify rsize=N,wsize=N
mount options explicitly, so they are set before session creation.
This bug only affects NFSv4.1 mounts against some non-FreeBSD servers.
20:55:38 - r321354
(5 days 19 hours ago)
by gjb
Affects:  /release/11.1.0
Tag releng/11.1@r321309 as 11.1-RELEASE.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation
19:26:34 - r321353
(5 days 21 hours ago)
by rmacklem
Affects: 
(835 files)
/projects/pnfs-planb-server/sys/*
Update the kernel to current/head.
18:58:51 - r321352
(5 days 21 hours ago)
by dim
Affects:  /projects/clang500-import/contrib/llvm/tools/clang
Bash Subversion over the head until it submits.
18:54:34 - r321351
(5 days 21 hours ago)
by dim
Affects: 
(26 files)
/projects/clang500-import/*
Merge ^/head r321307 through r321350.
18:53:43 - r321350
(5 days 21 hours ago)
by dim
Affects:  /projects/clang500-import/ObsoleteFiles.inc
/projects/clang500-import/UPDATING
/projects/clang500-import/sys/sys/param.h
Set tentative merge dates, bump __FreeBSD_version.
18:42:35 - r321349
(5 days 22 hours ago)
by kib
Affects:  /head/sys/ufs/ffs/ffs_snapshot.c
Improve publication of the newly allocated snapdata.

For freshly allocated snapdata, Lock sn_lock in advance, so
si_snapdata readers see the locked snapdata and not race.

For existing snapdata, if the thread was put to sleep waiting for
sn_lock, re-read si_snapdata. This either closes the race or makes
the reliance on LK_DRAIN less important.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
18:36:17 - r321348
(5 days 22 hours ago)
by kib
Affects:  /head/sys/ufs/ffs/ffs_snapshot.c
Unlock correct lock in ffs_snapblkfree().

It is possible for ffs_snapblkfree() to race and lock snaplock while
the devvp snapdata is instantiated, but no snapshots exist. In this
case the loop over snapshots in ffs_snapblkfree() is not executed, and
the local variable vp is left initialized to NULL.

Unlock using &sn->sn_lock and not vp->v_vnlock. For the inodes on the
snapshot list, the locks are same.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
18:28:27 - r321347
(5 days 22 hours ago)
by kib
Affects:  /head/sys/ufs/ffs/ffs_snapshot.c
Account for lock recursion when transfering snaplock to the vnode lock
in ffs_snapremove().

Apparently ffs_snapremove() may be called with the snap lock recursed,
at least one trace demonstrated this when snapshot vnode was unlinked
while synced. It was inactivated from the syncer thread.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
18:14:06 - r321346
(5 days 22 hours ago)
by kib
Affects: 
(2 files)
/stable/11/tools/test/ptrace/scescx.c
MFC r319876:
Update scescx test to print syscall number and arguments.
18:12:35 - r321345
(5 days 22 hours ago)
by kib
Affects: 
(4 files)
/stable/11/lib/libc/sys/ptrace.2
/stable/11/sys/kern/sys_process.c
/stable/11/sys/sys/ptrace.h
MFC r319875:
Add ptrace(PT_GET_SC_ARGS) command to return debuggee' current syscall
arguments.
18:10:46 - r321344
(5 days 22 hours ago)
by kib
Affects: 
(2 files)
/stable/11/sys/kern/kern_sig.c
MFC r319874:
Print unimplemented syscall number to the ctty on SIGSYS, if enabled
by the knob kern.lognosys.
18:06:57 - r321343
(5 days 22 hours ago)
by kib
Affects: 
(28 files)
/stable/11/sys/*
MFC r319873:
Move struct syscall_args syscall arguments parameters container into
struct thread.
17:59:54 - r321342
(5 days 22 hours ago)
by dim
Affects:  /head/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp
Pull in r295886 from upstream clang trunk (by Richard Smith):

  PR32034: Evaluate _Atomic(T) in-place when T is a class or array type.

  This is necessary in order for the evaluation of an _Atomic
  initializer for those types to have an associated object, which an
  initializer for class or array type needs.

This fixes an assertion when building recent versions of LinuxCNC.

Reported by: trasz
PR: 220883
MFC after: 1 week
17:58:06 - r321341
(5 days 22 hours ago)
by bdrewery
Affects: 
(2 files)
/stable/10/Makefile
MFC r320273:

  Allow ALWAYS_BOOTSTRAP_MAKE to force bmake bootstrapping.
17:57:59 - r321340
(5 days 22 hours ago)
by bdrewery
Affects: 
(2 files)
/stable/11/Makefile
MFC r320273:

  Allow ALWAYS_BOOTSTRAP_MAKE to force bmake bootstrapping.
17:57:10 - r321339
(5 days 22 hours ago)
by bdrewery
Affects: 
(2 files)
/stable/11/Makefile.inc1
MFC r320292:

  NO_ROOT: Remove excessive // when DESTDIR/DISTDIR are empty.
17:56:22 - r321338
(5 days 22 hours ago)
by bdrewery
Affects: 
(2 files)
/stable/11/etc/Makefile
MFC r320883:

  Fix INSTALL_AS_USER after r319020.
17:55:40 - r321337
(5 days 22 hours ago)
by bdrewery
Affects: 
(2 files)
/stable/11/Makefile.inc1
MFC r320806:

  SYSTEM_COMPILER: Ensure there is not a stale compiler in WORLDTMP.
17:42:54 - r321336
(5 days 23 hours ago)
by sbruno
Affects:  /head/sys/dev/e1000/if_em.c
Do not update stats counter in SWI context. Defer to the already existing
admin thread.

Submitted by: Matt Macy <mmacy@mattmacy.io>
Sponsored by: Limelight Networks
17:11:36 - r321335
(5 days 23 hours ago)
by rlibby
Affects:  /head/sys/amd64/amd64/pmap.c
/head/sys/x86/x86/mp_x86.c
__pcpu: gcc -Wredundant-decls

Pollution from counter.h made __pcpu visible in amd64/pmap.c. Delete
the existing extern decl of __pcpu in amd64/pmap.c and avoid referring
to that symbol, instead accessing the pcpu region via PCPU_SET macros.
Also delete an unused extern decl of __pcpu from mp_x86.c.

Reviewed by: kib
Approved by: markj (mentor)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D11666
16:14:35 - r321334
(6 days ago)
by bdrewery
Affects:  /head/share/mk/bsd.files.mk
Respect INSTALL_AS_USER for FILES.

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
16:14:06 - r321333
(6 days ago)
by bdrewery
Affects:  /head/lib/libc/tests/sys/Makefile
Properly set userid for truncate_test.

MFC after: 1 week
Sponsored by: Dell EMC Isilon
15:09:24 - r321332
(6 days 1 hour ago)
by asomers
Affects:  /head/lib/librt/Symbol.map
/head/lib/librt/aio.c
/head/tests/sys/aio/lio_test.c
Implement SIGEV_THREAD notifications for lio_listio(2)

Our man pages have always indicated that this was supported, but in fact the
feature was never implemented for lio_listio(2).

Reviewed by: jhb, kib (earlier version)
MFC after: 20 days
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D11680
14:50:32 - r321331
(6 days 2 hours ago)
by br
Affects:  /head/share/mk/bsd.sys.mk
Add warning flags for GCC 7.1.0 compiler.

Sponsored by: DARPA, AFRL
14:14:47 - r321330
(6 days 2 hours ago)
by br
Affects:  /head/sys/vm/vm_object.h
Fix style: change spaces to tabs.

Sponsored by: DARPA, AFRL
13:58:51 - r321329
(6 days 2 hours ago)
by trasz
Affects:  /head/usr.bin/truss/truss.1
Make truss(1) cross-reference dtrace(1) and bump .Dd.

MFC after: 2 weeks
Sponsored by: DARPA, AFRL
13:50:59 - r321328
(6 days 2 hours ago)
by trasz
Affects:  /head/usr.bin/truss/truss.1
Use more usual formatting for the EXAMPLES section of truss(1).

MFC after: 2 weeks
Sponsored by: DARPA, AFRL
13:27:25 - r321327
(6 days 3 hours ago)
by trasz
Affects:  /head/usr.bin/ktrace/ktrace.1
Use more usual formatting for the EXAMPLES section of ktrace(1).

MFC after: 2 weeks
Sponsored by: DARPA, AFRL
08:50:22 - r321326
(6 days 8 hours ago)
by robak
Affects:  /head/usr.sbin/bsdinstall/scripts/hardening
Remove stack guard option from hardening menu.

Since kib's change the stack guard is now ON by default,
this option in hardening menu of bsdinstall is no longer needed.

Submitted by: Bartlomiej Rutkowski <robak@FreeBSD.org>
Reviewed by: bapt
Approved by: bapt
MFC after: 1 day
Sponsored by: Pixeware LTD
Differential Revision: https://reviews.freebsd.org/D11686
07:44:43 - r321325
(6 days 9 hours ago)
by tuexen
Affects:  /head/sys/kern/uipc_socket.c
Fix getsockopt() for listening sockets when using SO_SNDBUF, SO_RCVBUF,
SO_SNDLOWAT, SO_RCVLOWAT. Since r31972 it only worked for non-listening
sockets.

Sponsored by: Netflix, Inc.
06:56:06 - r321324
(6 days 9 hours ago)
by kib
Affects: 
(8 files)
/stable/11/sys/*
MFC r319871:
Make struct syscall_args visible to userspace compilation environment
from machine/proc.h, consistently on all architectures.
06:52:40 - r321323
(6 days 9 hours ago)
by kib
Affects: 
(2 files)
/stable/11/sys/vm/vm_map.c
MFC r321173:
Convert assertion that only vmspace owner grows the stack, into a
check blocking grow from other processes accesses.

MFC r321230:
Disable stack growth when accessed by AIO daemons.
06:48:47 - r321322
(6 days 10 hours ago)
by kib
Affects: 
(6 files)
/stable/11/sys/*
MFC r320982:
Correct sysent flags for dynamically loaded syscalls.
03:59:56 - r321321
(6 days 12 hours ago)
by loos
Affects:  /head/sys/dev/netmap/netmap_freebsd.c
/head/sys/dev/netmap/netmap_mem2.c
Restore the changes done in r313982: Replace zero with NULL for pointers.

Spotted by: Harry Schmalzbauer
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC (Netgate)
03:48:09 - r321320
(6 days 13 hours ago)
by jhibbits
Affects:  /head/sys/conf/files.powerpc
Compile the atomic64 emulation for powerpcspe

With this, ZFS builds for and runs (not quite stablely) on powerpcspe.
03:42:09 - r321319
(6 days 13 hours ago)
by loos
Affects:  /head/sys/net/netmap_user.h
Update netmap_user.h with the current version of netmap. This file should
have been committed together with r319881.

MFC after: 1 week
MFC with: r319881
Pointy hat to: loos
03:40:05 - r321318
(6 days 13 hours ago)
by jhibbits
Affects:  /head/sys/conf/files.powerpc
/head/sys/powerpc/cpufreq/mpc85xx_jog.c
Add cpufreq support for P1022 and MPC8536

P1022 and MPC8536 include a 'jog' feature for clock control
(jog being a slower form of run mode). This is done by changing the
PLL multiplier, and cannot be done if any core is in doze or sleep mode.
03:28:35 - r321317
(6 days 13 hours ago)
by loos
Affects:  /head/sys/dev/netmap/netmap_generic.c
Do not allow the use of the loopback interface in netmap.

The generic support in netmap send the packets using if_transmit() and the
loopback do not support packets coming from if_transmit()/if_start().

This avoids the use of the loopback interface and the subsequent crash that
happens when the application send packets to the loopback interface.

Details in: https://github.com/luigirizzo/netmap/issues/322
Reported by: Vincenzo Maffione <v.maffione@gmail.com>
Sponsored by: Rubicon Communications, LLC (Netgate)
03:04:55 - r321316
(6 days 13 hours ago)
by loos
Affects:  /head/sys/netpfil/ipfw/ip_fw_table.c
Fix a couple of typos in a comment.

MFC after: 1 week
Sponsored by: Rubicon Communications, LLC (Netgate)
01:35:55 - r321315
(6 days 15 hours ago)
by kevans
Affects:  /head/contrib/netbsd-tests/lib/libc/regex/data/subexp.in
Add regression test for recent regex(3) breakage

BREs recently became prematurely sensitive to the branching operator, which
outright broke expressions that used it instead of failing silently. Test
that \| is matching a literal | for the time being.

Reviewed by: cem, emaste, ngie
Approved by: emaste (mentor)
Differential Revision: https://reviews.freebsd.org/D11577
00:14:43 - r321314
(6 days 16 hours ago)
by rmacklem
Affects:  /head/sys/fs/nfsclient/nfs_clrpcops.c
r320062 introduced a bug when doing NFSv4.1 mounts against some non-FreeBSD
servers.

r320062 used nm_rsize, nm_wsize to set the maximum request/response sizes for
the NFSv4.1 session. If rsize,wsize are not specified as options, the
value of nm_rsize, nm_wsize is 0 at session creation, resulting in
values for request/response that are too small.
This patch fixes the problem. A workaround is to specify rsize=N,wsize=N
mount options explicitly, so they are set before session creation.
This bug only affects NFSv4.1 mounts against some non-FreeBSD servers.

MFC after: 1 week

 


Powered by Python FreeBSD support by secnetix GmbH & Co. KG

Page generated in 54 ms, 312 revisions printed. Current time is 2017-07-27 16:50:53. All times are in UTC/GMT.