bapt [Tue, 15 Jan 2013 09:17:07 +0000 (09:17 +0000)]
MFC r244553,244594,244608,244639
In preparation for making 'pkg -N' the one true method of determining
whether a system has been configured to use pkgng, cause /usr/sbin/pkg
recognise a -N option and exit with a failure code when the pkg port
is not installed
bapt [Sun, 13 Jan 2013 22:36:12 +0000 (22:36 +0000)]
MFC: r243883
if PACKAGESITE url scheme is not 'file://', always try to revolv SRV records and
use them if any. It allows the bootstrap to use directly pkg.FreeBSD.org instead
of pkgbeta.FreeBSD.org
markj [Sun, 13 Jan 2013 04:14:30 +0000 (04:14 +0000)]
MFC r244995 r244996 r244997.
MFC r244995:
Fix a typo in an error message.
MFC r244996:
Have -n imply -r, since dry-run mode obviously doesn't require root
privileges.
MFC r244997:
Make sure to update the mtime of a logfile after archiving it. This
ensures that the next rotation happens at the correct time when using
interval-based rotations.
markj [Sun, 13 Jan 2013 04:13:14 +0000 (04:13 +0000)]
MFC r244719:
Add the NO_SYNC_CACHE quirk for all Apple USB MSC devices, as they
typically do not handle the SYNCHRONIZE_CACHE command - they either
return an error or the firmware enters a reset loop.
wblock [Thu, 10 Jan 2013 23:39:28 +0000 (23:39 +0000)]
MFC r245012:
Document the output of the show command. Modified version of patch
provided by Bas Smeelen <b.smeelen@ose.nl>. Use of 'gpart list'
suggested by by Andrey V. Elsukov <ae@FreeBSD.org>.
yongari [Tue, 8 Jan 2013 05:35:18 +0000 (05:35 +0000)]
MFC r244341:
Make sure to stop both TX and RX MACs in ale_stop_mac(). Previously
it used to stop TX MAC only such that MAC reconfiguration after
getting a link didn't work as expected.
rmacklem [Sun, 6 Jan 2013 01:17:58 +0000 (01:17 +0000)]
MFC: r244331
Fix the gssd daemon so that it uses syslog() to report
an error instead of calling err() when it is daemonized,
so that the error gets logged.
rmacklem [Sun, 6 Jan 2013 01:11:45 +0000 (01:11 +0000)]
MFC: r244226
The group list for a non-default export entry (a host/subnet one)
was being copied from the wrong place. This patch fixes that.
This could cause access failures for mapped users, when the group
permissions were needed.
markj [Sat, 5 Jan 2013 22:55:34 +0000 (22:55 +0000)]
- Add IFT_L2VLAN (vlan(4)) support.
- Add a -P option to support PID files. When -a is specified
/var/run/rarpd.pid is used by default, and when an interface is
specified /var/run/rarpd.<ifname>.pid is used by default.
pfg [Fri, 4 Jan 2013 04:03:39 +0000 (04:03 +0000)]
MFC r244941:
libedit: bind the correct command when using "bind -k".
"ed-argument-digit" (i. e. command 0) was incorrectly used
instead.
This bug comes from the original sources imported in 1994
and has been confirmed in upstream NetBSD.
Reported by: Yamagi Burmeister
Submitted by: Christoph Mallon
pfg [Fri, 4 Jan 2013 03:54:22 +0000 (03:54 +0000)]
MFC 244776, 244792:
gcc: avoid generating negative values to DW_AT_byte_size.
There is a bug in gcc (GCC/35998) where dwarf reports
sizes of unsigned -1 (0xffffffff).
On NetBSD this generated a faulty CTF entry which then
caused a segfault in ctfmerge. The issue was worked
around in NetBSD's Dtrace but since the issue originated
in gcc, it seems reasonable to fix it here.
Thanks to Christoph Mallon for pointing out a correct fix.
wblock [Thu, 3 Jan 2013 21:35:25 +0000 (21:35 +0000)]
MFC r242697,r242704:
r242697:
Add devd.conf(5) and devd(8) to SEE ALSO xrefs. Give users a pointer to
seemingly mysterious actions that are not done by ifconfig itself, but
by devd triggering on events caused by ifconfig.
r242704:
Remove fifteen-year-old notes on media selection (suggested by simon@).
Add commas after "e.g." and "i.e.".
delphij [Tue, 1 Jan 2013 07:04:25 +0000 (07:04 +0000)]
MFC r244369 (jimharris):
Use CAM_DEV_NOT_THERE instead of CAM_SEL_TIMEOUT to report nonexistent
LUNs for the virtual processor device. This removes lots of CAM warnings,
and follows similar recent changes to tws(4) and twa(4) drivers.
Also fix case where CAM_REQ_CMP was getting OR'd with CAM_DEV_NOT_THERE
in the nonexistent LUN case, resulting in different CAM status (CAM_UA_TERMIO)
getting reported to CAM. This issue existing previously, but was more subtle
because it changed CAM_SEL_TIMEOUT to CAM_CMD_TIMEOUT.
Sponsored by: Intel
Reported and tested by: Willem Jan Withagen <wjw@digiware.nl>
dim [Mon, 31 Dec 2012 14:21:41 +0000 (14:21 +0000)]
MFC r244600:
Fix a bug in ld --gc-sections: it strips out .note sections, while it
should never do so. This can cause global constructors and destructors
to not be executed at run-time, resulting in crashes and other strange
behaviour.
markj [Mon, 31 Dec 2012 03:35:01 +0000 (03:35 +0000)]
MFC 244523:
- Make sure that errno isn't modified before calling logerror() in error
conditions.
- Don't check for AF_INET6 when compiled without INET6 support.
gshapiro [Sat, 29 Dec 2012 19:12:38 +0000 (19:12 +0000)]
MFC: Properly define true/false when defining __bool_true_false_are_defined
for filters which pull in mfapi.h before stdbool.h. Issue reported by
Petr Rehor, maintainer of amavisd-milter port.
dim [Wed, 19 Dec 2012 12:19:56 +0000 (12:19 +0000)]
MFC r243907:
Fix an old bug in devd, where it uses std::sort() to sort the various
lists it reads from its configuration files on the priority field.
Because some items in the lists have the same priority, and std::sort()
is not stable, the exact order in which the items are enumerated does
not have to correspond to the order they appear in the configuration
files.
Apparently this was never noticed with libstdc++, but with libc++ it
could cause the "uhid" entry from /etc/devd/usb.conf to be used instead
of the "ums" entry (which is earlier in the file). This caused the
problem described in the PR: the USB mouse module was never loaded, and
the other actions (such as starting moused) were not executed.
To fix the problem, make devd use std:stable_sort() instead.
Reported by: Jan Beich <jbeich@tormail.org>
PR: bin/172958
delphij [Mon, 17 Dec 2012 06:38:22 +0000 (06:38 +0000)]
MFC r243834:
Note that the manual page of less(1) says:
Note that a preprocessor cannot output an empty file, since that
is interpreted as meaning there is no replacement, and the origi-
nal file is used. To avoid this, if LESSOPEN starts with two ver-
tical bars, the exit status of the script becomes meaningful. If
the exit status is zero, the output is considered to be replace-
ment text, even if it empty. If the exit status is nonzero, any
output is ignored and the original file is used. For compatibil-
ity with previous versions of less, if LESSOPEN starts with only
one vertical bar, the exit status of the preprocessor is ignored.
Use two pipe symbols for zless, so that zless'ing a compressed empty
file will give output rather than being interpreted as its compressed
form, which is typically a binary.
Thanks Mark Nudelman for pointing out this difference and the
suggested solution.
jimharris [Wed, 12 Dec 2012 00:39:32 +0000 (00:39 +0000)]
MFC r243904:
Don't call bus_dmamap_load in CAM_DIR_NONE case, since there is nothing
to map, and technically this isn't allowed.
Functionally, it works OK (at least on x86) to call bus_dmamap_load with
a NULL data pointer and zero length, so this is primarily for correctness
and consistency with other drivers.
While here, remove check in isci_io_request_construct for nseg==0.
Previously, bus_dmamap_load would pass nseg==1, even for case where
buffer is NULL and length = 0, which allowed CAM_DIR_NONE CCBs
to get processed. This check is not correct though, and needed to be
removed both for the changes elsewhere in this patch, as well as jeff's
preliminary bus_dmamap_load_ccb patch (which uncovered all of this in
the first place).
MFC r243503:
Illumos 13879:4eac7a87eff2
3329 spa_sync() spends 10-20% of its time in spa_free_sync_cb()
3330 space_seg_t should have its own kmem_cache
3331 deferred frees should happen after sync_pass 1
3335 make SYNC_PASS_* constants tunable
New loader-only tunables:
vfs.zfs.sync_pass_deferred_free
vfs.zfs.sync_pass_dont_compress
vfs.zfs.sync_pass_rewrite
MFC r243524:
Import the zio nop-write improvement from Illumos. To reduce I/O,
nop-write omits overwriting data if the checksum (cryptographically
secure) of new data matches the checksum of existing data.
It also saves space if snapshots are in use.
It currently works only on datasets with enabled compression, disabled
deduplication and sha256 checksums.
eadler [Mon, 10 Dec 2012 02:33:16 +0000 (02:33 +0000)]
MFC r243084:
Add support for a -q flag. While here make the custom argument parsing
use getopt instead of hacking on it more. This change also fixes the
method of silencing the compiler warning about gfn being used
uninitialized.
eadler [Sat, 8 Dec 2012 00:28:16 +0000 (00:28 +0000)]
MFC r243893:
Remove hack to emulate effective uid and just use the EUID's name in the
first place. I was unaware of this option when originally committing
this change.
I accidently merged this to only one directory last time :(
eadler [Sat, 8 Dec 2012 00:25:51 +0000 (00:25 +0000)]
MFC r243893:
Remove hack to emulate effective uid and just use the EUID's name in the
first place. I was unaware of this option when originally committing
this change.
rwatson [Thu, 6 Dec 2012 11:54:25 +0000 (11:54 +0000)]
Early MFC of portions of r243752 adding an auditdistd user to stable/8
in order to ease future upgrades; the remainder of r243752 is left for
a future MFC of the OpenBSM upgrade:
Merge a number of changes required to hook up OpenBSM 1.2-alpha2's
auditdistd (distributed audit daemon) to the build:
- Manual cross references
- Makefile for auditdistd
- rc.d script, rc.conf entrie
- New group and user for auditdistd; associated aliases, etc.
The audit trail distribution daemon provides reliable,
cryptographically protected (and sandboxed) delivery of audit tails
from live clients to audit server hosts in order to both allow
centralised analysis, and improve resilience in the event of client
compromises: clients are not permitted to change trail contents
after submission.
Submitted by: pjd
Sponsored by: The FreeBSD Foundation (auditdistd)
delphij [Mon, 3 Dec 2012 18:47:25 +0000 (18:47 +0000)]
MFC r242681 (ambrisko):
- Extend the prior commit to use the generic SCSI command building
function use that for JBOD and Thunderbolt disk write command. Now
we only have one implementation in mfi.
- Fix dumping on Thunderbolt cards. Polled IO commands do not seem to
be normally acknowledged by changing cmd_status to MFI_STAT_OK.
In order to get acknowledgement of the IO is complete, the Thunderbolt
command queue needs to be run through. I added a flag MFI_CMD_SCSI
to indicate this command is being polled and to complete the
Thunderbolt wrapper and indicate the result. This flag needs to be
set in the JBOD case in case if that us using Thunderbolt card.
When in the polling loop check for completed commands.
- Remove mfi_tbolt_is_ldio and just do the check when needed.
- Fix an issue when attaching of disk device happens when a device is
already scheduled to be attached but hasn't attached.
- add a tunable to allow raw disk attachment to CAM via:
hw.mfi.allow_cam_disk_passthrough=1
- fixup aborting of commands (AEN and LD state change). Use a generic
abort function and only wait the command being aborted not both.
Thunderbolt cards don't seem to abort commands so the abort times
out.
delphij [Mon, 3 Dec 2012 18:39:29 +0000 (18:39 +0000)]
MFC r242497:
Copy code from scsi_read_write() as mfi_build_syspd_cdb() to build SCSI
command properly. Without this change, mfi(4) always sends 10 byte READ
and WRITE commands, which will cause data corruption when device is
larger than 2^32 sectors.