r327787 emaste Jan. 10, 2018, 8:49 p.m.
Sponsored by:	The FreeBSD Foundation
r327784 emaste Jan. 10, 2018, 8:36 p.m.
(I missed the Reviewed by and review link from r327783.)

Reviewed by:	brooks, dim, bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D13827
r327783 emaste Jan. 10, 2018, 8:28 p.m.
For some time we have been planning to migrate to LLVM's lld linker.
Having a man page was the last blocking issue for using ld.lld to link
the base system kernel + userland, now addressed by r327770.  Link the
kernel and userland libraries and binaries with ld.lld by default, for
additional test coverage.

This has been a long time in the making.  On 2013-04-13 I submitted an
upstream tracking issue in LLVM PR 23214: [META] Using LLD as FreeBSD's
system linker.  Since then 85 individual issues were identified, and
submitted as dependencies.  These have been addressed along with two
and a half years of other lld development and improvement.

I'd like to express deep gratitude to upstream lld developers Rui
Ueyama, Rafael Espindola, George Rimar and Davide Italiano.  They put in
substantial effort in addressing the issues we found affecting

To revert to using ld.bfd as the bootstrap linker, in /etc/src.conf set


If you need to set this, please follow up with a PR or post to the
freebsd-toolchain mailing list explaining how default WITH_LLD_BOOTSTRAP
failed for your use case.

Note that GNU ld.bfd is still installed as /usr/bin/ld, and will still
be used for linking ports.  ld.lld can be installed as /usr/bin/ld by
setting in /etc/src.conf


A followup commit will set WITH_LLD_IS_LD by default, possibly after
Clang/LLVM/lld 6.0 is merged to FreeBSD.

Release notes:	Yes
Sponsored by:	The FreeBSD Foundation
r327782 pfg Jan. 10, 2018, 8:05 p.m.
Use mallocarray in a couple of cases where a calloc-like operation is
taking place.
r327781 pfg Jan. 10, 2018, 7:45 p.m.
Basic use of mallocarray to prevent overflows. Here allocation is done
with M_NOWAIT so the code is prepared for the possibility of returning
NULL values. Since mallocarray expects unsigned parameters, unsign some
related variables to minimize sign conversions.

Reviewed by:	mckusick
r327780 markj Jan. 10, 2018, 7:41 p.m.
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
r327779 markj Jan. 10, 2018, 7:37 p.m.
We would previously just free the request BIO, which would either cause
the disk to stay stuck in the SYNCHRONIZING state, or result in
synchronization completing without having copied the block which
returned an error.

With this change, if the disk which returned an error is the only active
disk in the mirror, the synchronizing disk is kicked out. Otherwise, the
read is retried.

Reported and tested by:	pho (previous version)
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
r327778 emaste Jan. 10, 2018, 6:15 p.m.
Sponsored by:	The FreeBSD Foundation
r327777 trasz Jan. 10, 2018, 5:51 p.m.
instead of copying from the underlying filesystem.

PR:		224851
Reported by:	Jamie Landeg-Jones <jamie at dyslexicfish.net>
Tested by:	Jamie Landeg-Jones <jamie at dyslexicfish.net>
MFC after:	2 weeks
r327776 jhb Jan. 10, 2018, 5:36 p.m.
r327775 avg Jan. 10, 2018, 5:35 p.m.
The driver now fully observes watchdog(9) protocol.
Previously a too large timeout was silently clamped while the correct
behavior is to disable the watchdog and leave the error as is
(i.e. to not report success).

Also, previously a too small value caused the timer to stop while the
correct behavior is to use the minimal supported value.

MFC after:	2 weeks
r327774 imp Jan. 10, 2018, 5:25 p.m.
tc_setclock(). It's redundant. Tweak UPDATING based on code review of
past releases.

Relnotes: yes (for the removal of pmtimer)
r327773 imp Jan. 10, 2018, 4:56 p.m.
r327772 imp Jan. 10, 2018, 4:52 p.m.
r327771 imp Jan. 10, 2018, 4:51 p.m.