]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoProperly implement pmap_[get|set]_memattr
cognet [Wed, 19 Dec 2012 00:24:31 +0000 (00:24 +0000)]
Properly implement pmap_[get|set]_memattr

Submitted by: Ian Lepore <freebsd@damnhippie.dyndns.org>

11 years agoMap BAR 4/5, because NVMe spec says devices may place the MSI-X table
jimharris [Tue, 18 Dec 2012 23:27:18 +0000 (23:27 +0000)]
Map BAR 4/5, because NVMe spec says devices may place the MSI-X table
behind BAR 4/5, rather than in BAR 0/1 with the control/doorbell registers.

Sponsored by: Intel

11 years agoAdd sysctls for changing GPIO pins function
gonzo [Tue, 18 Dec 2012 22:18:54 +0000 (22:18 +0000)]
Add sysctls for changing GPIO pins function

Submitted by: Luiz Otavio O Souza

11 years agoSimplify module definition by adding nvme_modevent to DRIVER_MODULE()
jimharris [Tue, 18 Dec 2012 22:10:40 +0000 (22:10 +0000)]
Simplify module definition by adding nvme_modevent to DRIVER_MODULE()
definition.

Submitted by:   Carl Delsey <carl.r.delsey@intel.com>

11 years agoDo not use taskqueue to defer completion work when using INTx. INTx now
jimharris [Tue, 18 Dec 2012 21:50:48 +0000 (21:50 +0000)]
Do not use taskqueue to defer completion work when using INTx.  INTx now
matches MSI-X behavior.

Sponsored by: Intel

11 years agoAdd an additional regression tests for other cases to ensure these do not get fixed...
eadler [Tue, 18 Dec 2012 21:42:45 +0000 (21:42 +0000)]
Add an additional regression tests for other cases to ensure these do not get fixed by accident.

11 years agoNo reason to install debug data with the schg flag
emaste [Tue, 18 Dec 2012 21:13:03 +0000 (21:13 +0000)]
No reason to install debug data with the schg flag

11 years agoPOSIX requires that non-existent or null arguments be treated as if a
eadler [Tue, 18 Dec 2012 21:02:38 +0000 (21:02 +0000)]
POSIX requires that non-existent or null arguments be treated as if a
zero argument were supplied.

Add a regression test to catch this case as well.

PR: bin/174521
Submitted by: Daniel Shahaf <danielsh@elego.de> (pr)
Submitted by: Mark Johnston <markjdb@gmail.com> (initial patch)
Reviewed by: jilles
Approved by: cperciva (implicit)
MFC after: 3 weeks

11 years agoUpdate arcmsr(4) to vendor version 1.20.00.26, this adds
delphij [Tue, 18 Dec 2012 20:47:23 +0000 (20:47 +0000)]
Update arcmsr(4) to vendor version 1.20.00.26, this adds
support for their new RAID adapter ARC-1214.

Many thanks to Areca for continuing to support FreeBSD.

Submitted by: 黃清隆 Ching-Lung Huang <ching2048 areca com tw>
MFC after: 2 weeks

11 years agopsm: Support detection of Synaptics touchpad v7.5 and above
dumbbell [Tue, 18 Dec 2012 20:02:53 +0000 (20:02 +0000)]
psm: Support detection of Synaptics touchpad v7.5 and above

Starting with firmware v7.5, the "Read TouchPad Modes" ($01) and "Read
Capabilities" ($02) commands changed: previously constant bytes now
carry variable information.

We now compare those bytes to expected constants only for firmware prior
to v7.5.

Tested by: Zeus Panchenko <zeus@gnu.org.ua>
MFC after: 1 week

11 years agoprison_racct_detach can be called for not fully initialized jail, so make it check...
mjg [Tue, 18 Dec 2012 18:34:36 +0000 (18:34 +0000)]
prison_racct_detach can be called for not fully initialized jail, so make it check that the jail has racct before doing anything

PR: kern/174436
Reviewed by: trasz
MFC after: 3 days

11 years agoReplace our implementation of the vis(3) and unvis(3) APIs with
brooks [Tue, 18 Dec 2012 16:37:24 +0000 (16:37 +0000)]
Replace our implementation of the vis(3) and unvis(3) APIs with
NetBSD's.  This output size limited versions of vis and unvis functions
as well as a set of vis variants that allow arbitrary characters to be
specified for encoding.

Finally, MIME Quoted-Printable encoding as described in RFC 2045 is
supported.

11 years agowtap should not set the IEEE80211_F_DATAPAD flag;
monthadar [Tue, 18 Dec 2012 16:15:20 +0000 (16:15 +0000)]
wtap should not set the IEEE80211_F_DATAPAD flag;

Approved by: adrian (mentor)

11 years agowtap fix malloc/free.
monthadar [Tue, 18 Dec 2012 16:11:13 +0000 (16:11 +0000)]
wtap fix malloc/free.

* Remove malloc/free pointer cast;
* Check return value from malloc;

Submitted by: glebius
Approved by: adrian (mentor)

11 years agowtap should check if ieee80211_vap_setup fails.
monthadar [Tue, 18 Dec 2012 08:44:59 +0000 (08:44 +0000)]
wtap should check if ieee80211_vap_setup fails.

* If ieee80211_vap_setup fails, we free allocated M_80211_VAP
  memory and return NULL;

Approved by: adrian (mentor)

11 years agowtap: fix clang warning.
monthadar [Tue, 18 Dec 2012 08:41:23 +0000 (08:41 +0000)]
wtap: fix clang warning.

* The warning message was:
    'warning error: format string is not a string literal';
* Changed how make_dev is called, now a string literal
  for formatting is used;

Approved by: adrian (mentor)

11 years agoFix !INET6 build after r244365.
glebius [Tue, 18 Dec 2012 08:14:16 +0000 (08:14 +0000)]
Fix !INET6 build after r244365.

11 years agoClear correct flag in INET6 case.
glebius [Tue, 18 Dec 2012 08:09:44 +0000 (08:09 +0000)]
Clear correct flag in INET6 case.

11 years ago- Add sysctl to allow unprivileged users to call mlock(2)-family system
zont [Tue, 18 Dec 2012 07:36:45 +0000 (07:36 +0000)]
- Add sysctl to allow unprivileged users to call mlock(2)-family system
  calls and turn it on.
- Do not allow to call them inside jail. [1]

Pointed out by: trasz [1]
Reviewed by: avg
Approved by: kib (mentor)
MFC after: 1 week

11 years ago- Fix locked memory accounting for maps with MAP_WIREFUTURE flag.
zont [Tue, 18 Dec 2012 07:35:01 +0000 (07:35 +0000)]
- Fix locked memory accounting for maps with MAP_WIREFUTURE flag.
- Add sysctl vm.old_mlock which may turn such accounting off.

Reviewed by: avg, trasz
Approved by: kib (mentor)
MFC after: 1 week

11 years ago- Set memorylocked limit to 64Kb for default login class.
zont [Tue, 18 Dec 2012 07:27:50 +0000 (07:27 +0000)]
- Set memorylocked limit to 64Kb for default login class.
  This prevents unprivileged users to lock too much memory.
- Set memorylocked limit to 64Mb for daemon login class.
  Some daemons such as amd(8) and watchdogd(8) calls mlockall(2) on
  startup, they are run from init(8) which uses daemon login class.
- Set memorylocked limit to unlimited for root login class.

Suggested by: avg
Approved by: kib (mentor)
MFC after: 1 week

11 years agoGet libcompiler-rt and libgcc building on ARM with clang.
andrew [Tue, 18 Dec 2012 07:26:55 +0000 (07:26 +0000)]
Get libcompiler-rt and libgcc building on ARM with clang.

* Don't provide clear_cache or the __sync_* functions on ARM with clang as
  they are provided by clang as builtin functions.
* Tell clang it is aloud to compile some libgcc code using heinous GCC
  extensions.

11 years agoFix typo in comment.
kevlo [Tue, 18 Dec 2012 06:37:23 +0000 (06:37 +0000)]
Fix typo in comment.

Reviewed by: thompsa

11 years agoMore correct version of prev. fix.
ache [Tue, 18 Dec 2012 04:44:36 +0000 (04:44 +0000)]
More correct version of prev. fix.

11 years agoPiete.Brooks at cl.cam.ac.uk reported via email a crash which was
rmacklem [Tue, 18 Dec 2012 00:25:48 +0000 (00:25 +0000)]
Piete.Brooks at cl.cam.ac.uk reported via email a crash which was
caused by use of an invalid kgss_gssd_handle during an upcall to
the gssd daemon when it has exited. This patch seems to avoid the
crashes by holding a reference count on the kgss_gssd_handle until
the upcall is done. It also adds a new mutex kgss_gssd_lock used to
make manipulation of kgss_gssd_handle SMP safe.

Tested by: Illias A. Marinos, Herbert Poeckl
Reviewed by: jhb
MFC after: 2 weeks

11 years agoUse CAM_DEV_NOT_THERE instead of CAM_SEL_TIMEOUT to report nonexistent
jimharris [Tue, 18 Dec 2012 00:00:07 +0000 (00:00 +0000)]
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>
MFC after: 1 week

11 years agoHide OBJCOPY and others in POSIX mode
emaste [Mon, 17 Dec 2012 21:09:44 +0000 (21:09 +0000)]
Hide OBJCOPY and others in POSIX mode

Submitted by: Garrett Cooper

11 years agoSince we use different flags to detect tcp forwarding, and we share the
ae [Mon, 17 Dec 2012 20:55:33 +0000 (20:55 +0000)]
Since we use different flags to detect tcp forwarding, and we share the
same code for IPv4 and IPv6 in tcp_input, we should check both
M_IP_NEXTHOP and M_IP6_NEXTHOP flags.

MFC after: 3 days

11 years agoFix:
ache [Mon, 17 Dec 2012 19:17:10 +0000 (19:17 +0000)]
Fix:
line 11: Malformed conditional
(${TARGET} == "arm" || ${TARGET_ARCH} == "powerpc64")

11 years agoUse M_PROTO7 flag for M_IP6_NEXTHOP, because M_PROTO2 was used for
ae [Mon, 17 Dec 2012 14:36:56 +0000 (14:36 +0000)]
Use M_PROTO7 flag for M_IP6_NEXTHOP, because M_PROTO2 was used for
M_AUTHIPHDR.

Pointy hat to: ae
Reported by: Vadim Goncharov
MFC after: 3 days

11 years agoFix warning from valgrind when a failed entry is tested.
eadler [Mon, 17 Dec 2012 12:57:36 +0000 (12:57 +0000)]
Fix warning from valgrind when a failed entry is tested.

PR: kern/173008
Submitted by: Zhihao Yuan <lichray@gmail.com>
Reviewed by: gabor
Approved by: cperciva (implicit)
MFC after: 1 week

11 years agoMinor style tweaks.
pjd [Mon, 17 Dec 2012 10:51:22 +0000 (10:51 +0000)]
Minor style tweaks.

Obtained from: WHEEL Systems

11 years agoBetter variables naming in expand_name() to be more consistent with coredump().
pjd [Mon, 17 Dec 2012 10:48:10 +0000 (10:48 +0000)]
Better variables naming in expand_name() to be more consistent with coredump().

Obtained from: WHEEL Systems

11 years agolibc/iconv: Fix race condition with setting FD_CLOEXEC.
jilles [Mon, 17 Dec 2012 10:38:51 +0000 (10:38 +0000)]
libc/iconv: Fix race condition with setting FD_CLOEXEC.

A fork/exec could happen between open and fcntl, leaking a file descriptor.
Using O_CLOEXEC fixes this and as a side effect simplifies the code.

NetBSD already had this (I checked this after making the change myself).

Reviewed by: gabor

11 years ago- Fix handling of .mps files
gabor [Mon, 17 Dec 2012 10:12:12 +0000 (10:12 +0000)]
- Fix handling of .mps files

PR: bin/161454
Submitted by: Yamaya Takashi <yamayan@kbh.biglobe.ne.jp>

11 years agoWarn about reaching various PF limits.
pjd [Mon, 17 Dec 2012 10:10:13 +0000 (10:10 +0000)]
Warn about reaching various PF limits.

Reviewed by: glebius
Obtained from: WHEEL Systems

11 years ago- Use unsigned int for values obtained with sysctlbyname(). This fixes
gabor [Mon, 17 Dec 2012 09:36:43 +0000 (09:36 +0000)]
- Use unsigned int for values obtained with sysctlbyname().  This fixes
  sparc64 performance problems.

Submitted by: Oleg Moskalenko <oleg.moskalenko@citrix.com>
Tested by: trasz

11 years agoMake sure to stop both TX and RX MACs in ale_stop_mac(). Previously
yongari [Mon, 17 Dec 2012 06:01:57 +0000 (06:01 +0000)]
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.

PR: kern/173652

11 years agoamd64 only has rela sections.
rpaulo [Mon, 17 Dec 2012 00:34:07 +0000 (00:34 +0000)]
amd64 only has rela sections.

11 years agoFix the gssd daemon so that it uses syslog() to report
rmacklem [Mon, 17 Dec 2012 00:31:55 +0000 (00:31 +0000)]
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.

Discussed with: rwatson, jhb
Tested by: Illias A. Marinos, Herbert Poeckl
MFC after: 2 weeks

11 years ago- Fix strtol() error handling.
hrs [Sun, 16 Dec 2012 23:46:59 +0000 (23:46 +0000)]
- Fix strtol() error handling.
- Add a range condition of given FIB number and the related error messages.
- Fix free() problem.

Spotted by: Artyom Mirgorodskiy
Discussed with: glebius

11 years agoUse new savecore(8) option and limit number of kernel dumps that will
pjd [Sun, 16 Dec 2012 23:29:56 +0000 (23:29 +0000)]
Use new savecore(8) option and limit number of kernel dumps that will
be kept around to the 10 most recent ones.

Add UPDATING entry with info how to return to the previous behaviour (no
limits).

Obtained from: WHEEL Systems

11 years agoWith rotating kernel dumps the higest dump number is not necessarily the
pjd [Sun, 16 Dec 2012 23:09:27 +0000 (23:09 +0000)]
With rotating kernel dumps the higest dump number is not necessarily the
last one. To make it easier to find the last one create symlinks with 'last'
suffix that will point to the files of the last coredump, eg.:

info.last -> info.5
textdump.tar.last.gz -> textdump.tar.5.gz

Reviewed by: avg
Obtained from: WHEEL Systems

11 years agoImplement -m option to savecore(8) that allows to limit number of kernel
pjd [Sun, 16 Dec 2012 23:06:12 +0000 (23:06 +0000)]
Implement -m option to savecore(8) that allows to limit number of kernel
dumps stored. Once the limit is reached it restarts from 0.

Reviewed by: avg
Obtained from: WHEEL Systems

11 years agoMake use of the fact that we changed working directory to the dump directory
pjd [Sun, 16 Dec 2012 23:04:31 +0000 (23:04 +0000)]
Make use of the fact that we changed working directory to the dump directory
earlier.

Obtained from: WHEEL Systems

11 years agoMinor wording improvments to some manual pages
eadler [Sun, 16 Dec 2012 23:00:13 +0000 (23:00 +0000)]
Minor wording improvments to some manual pages

Approved by: bcr (mentor)
Obtained from: DragonflyBSD (a5294ca835317c68c919ab43936da4f05ab6e926)
MFC after: 3 days

11 years agoSort flags properly.
pjd [Sun, 16 Dec 2012 22:59:58 +0000 (22:59 +0000)]
Sort flags properly.

Obtained from: WHEEL Systems

11 years agoPrefer snprintf() over sprintf().
pjd [Sun, 16 Dec 2012 22:59:25 +0000 (22:59 +0000)]
Prefer snprintf() over sprintf().

Obtained from: WHEEL Systems

11 years agoRevert r237842 and switch back to SCHED_ULE. All problems I encountered
marius [Sun, 16 Dec 2012 20:54:07 +0000 (20:54 +0000)]
Revert r237842 and switch back to SCHED_ULE. All problems I encountered
with the latter have been fixed with r241780.

MFC after: 3 days

11 years agoRestore pre-r234898 printing of boot loader and path.
marius [Sun, 16 Dec 2012 20:43:29 +0000 (20:43 +0000)]
Restore pre-r234898 printing of boot loader and path.

MFC after: 3 days

11 years agoMove expand_name() after process lock is released.
pjd [Sun, 16 Dec 2012 14:53:27 +0000 (14:53 +0000)]
Move expand_name() after process lock is released.

This fixed panic where we hold mutex (process lock) and try to obtain sleepable
lock (vnode lock in expand_name()). The panic could occur when %I was used
in kern.corefile.

Additionally we avoid expand_name() overhead when coredumps are disabled.

Obtained from: WHEEL Systems

11 years agoWhen growing a filesystem, don't leave unused space at the end
trasz [Sun, 16 Dec 2012 14:37:25 +0000 (14:37 +0000)]
When growing a filesystem, don't leave unused space at the end
if there is not enough room for a full cylinder group.

Reviewed by: mckusick@

11 years agoDon't add audit record when coredumps are disabled or name cannot be expanded.
pjd [Sun, 16 Dec 2012 14:24:59 +0000 (14:24 +0000)]
Don't add audit record when coredumps are disabled or name cannot be expanded.

Discussed with: rwatson
Obtained from: WHEEL Systems

11 years agoMake the check easier to read.
pjd [Sun, 16 Dec 2012 14:14:18 +0000 (14:14 +0000)]
Make the check easier to read.

Obtained from: WHEEL Systems

11 years agoUse 'cred' variable.
pjd [Sun, 16 Dec 2012 13:56:38 +0000 (13:56 +0000)]
Use 'cred' variable.

Obtained from: WHEEL Systems

11 years agoFix comment to represent actual file purpose
gonzo [Sun, 16 Dec 2012 00:20:16 +0000 (00:20 +0000)]
Fix comment to represent actual file purpose

Spotted by: gavin@

11 years agosbuf_trim() cannot be used on sbuf with drain function set.
pjd [Sat, 15 Dec 2012 22:26:16 +0000 (22:26 +0000)]
sbuf_trim() cannot be used on sbuf with drain function set.
This fixes panic when listing sysctls on INVARIANTS-enabled kernel while
having wbwd loaded.

This panic was not fatal, at worst one additional space was printed.

Also sbuf_trim() makes some sense even if drain function is set. The drain
function is called only when buffer is to be expanded. So we could still trim
existing buffer before drain is called. In this case it worked just fine - the
trailing space was correctly trimmed.

Obtained from: WHEEL Systems
MFC after: 1 week

11 years agoIgnore a warning in ubldr where clang doesn't understand the %D printf
andrew [Sat, 15 Dec 2012 21:47:05 +0000 (21:47 +0000)]
Ignore a warning in ubldr where clang doesn't understand the %D printf
specifier from libstand.

11 years agoAlso remove -Werror on arm with clang as there are warnings.
andrew [Sat, 15 Dec 2012 21:33:12 +0000 (21:33 +0000)]
Also remove -Werror on arm with clang as there are warnings.

11 years agoDon't define CTORS_SECTION_ASM_OP and DTORS_SECTION_ASM_OP on arm when
andrew [Sat, 15 Dec 2012 21:24:31 +0000 (21:24 +0000)]
Don't define CTORS_SECTION_ASM_OP and DTORS_SECTION_ASM_OP on arm when
built with clang. When these are defined the lists are defined similar to:

asm(".section .ctors");
STATIC func_ptr __CTOR_LIST__[1] = { (func_ptr) (-1) };
asm(".section .dtors");
STATIC func_ptr __DTOR_LIST__[1] = { (func_ptr) (-1) };

The problem is clang will move the two arrays out of the .ctors and .dtors
sections causing these sections to contain a single null address. By not
defining these macros we use the version of the code that places the arrays
is their sections by using __attribute__((section(".ctors"))) and similar
for .dtors.

Submitted by: Daisuke Aoyama <aoyama AT peach.ne.jp>

11 years agoRecognise vfpv2 as a value for the ARM .fpu asm directive. Clang generates
andrew [Sat, 15 Dec 2012 21:12:13 +0000 (21:12 +0000)]
Recognise vfpv2 as a value for the ARM .fpu asm directive. Clang generates
these even when building soft floating-point code

Submitted by: Daisuke Aoyama <aoyama AT peach.ne.jp>

11 years agoFix a comment in an asm block to work with compilers other than GCC
andrew [Sat, 15 Dec 2012 21:06:14 +0000 (21:06 +0000)]
Fix a comment in an asm block to work with compilers other than GCC

11 years agoIn additional to the tailq of IPv6 addresses add the hash table.
ae [Sat, 15 Dec 2012 20:04:24 +0000 (20:04 +0000)]
In additional to the tailq of IPv6 addresses add the hash table.
For now use 256 buckets and fnv_hash function. Use xor'ed 32-bit
s6_addr32 parts of in6_addr structure as a hash key. Update
in6_localip and in6_is_addr_deprecated to use hash table for fastest
lookup.

Sponsored by: Yandex LLC
Discussed with: dwmalone, glebius, bz

11 years agoChange `iostat -Ix` to display total duration of transactions instead
trociny [Sat, 15 Dec 2012 18:21:09 +0000 (18:21 +0000)]
Change `iostat -Ix` to display total duration of transactions instead
of average duration, and total busy time instead of %.

This looks more useful when one runs `iostat -Ix` periodically to
collect statistics: e.g. now it is possible to calculate busy %
between two runs subtracting total busy times and dividing per time
period.

Average duration and % busy are still available via `iostat -x`.

11 years agoNew devstat metrics for devstat_compute_statistics():
trociny [Sat, 15 Dec 2012 18:19:48 +0000 (18:19 +0000)]
New devstat metrics for devstat_compute_statistics():

  DSM_TOTAL_DURATION
  DSM_TOTAL_DURATION_READ
  DSM_TOTAL_DURATION_WRITE
  DSM_TOTAL_DURATION_FREE
  DSM_TOTAL_DURATION_OTHER
  DSM_TOTAL_BUSY_TIME

11 years agoUpdate to the new and brighter pkg world
phk [Sat, 15 Dec 2012 17:54:29 +0000 (17:54 +0000)]
Update to the new and brighter pkg world

11 years agoIn pfioctl, if the permission checks failed we returned with vnet context
trociny [Sat, 15 Dec 2012 17:19:36 +0000 (17:19 +0000)]
In pfioctl, if the permission checks failed we returned with vnet context
set.

As the checks don't require vnet context, this is fixed by setting
vnet after the checks.

PR: kern/160541
Submitted by: Nikos Vassiliadis (slightly different approach)

11 years agoFour .c files from OpenBSM are used, in modified form, by the kernel to
rwatson [Sat, 15 Dec 2012 15:21:09 +0000 (15:21 +0000)]
Four .c files from OpenBSM are used, in modified form, by the kernel to
implement the BSM audit trail format.  Rename the kernel versions of the
files to match the userspace filenames so that it's easier to work out
what they correspond to, and therefore ensure they are kept in-sync.

Obtained from: TrustedBSD Project

11 years agoMerge OpenBSM 1.2-alpha3 from the vendor branch to 10-CURRENT; this version
rwatson [Sat, 15 Dec 2012 14:59:00 +0000 (14:59 +0000)]
Merge OpenBSM 1.2-alpha3 from the vendor branch to 10-CURRENT; this version
included various upstreamed patches from the FreeBSD base to make OpenBSM
compile more easily with bmake, higher warning levels, clang, and several
other loose ends.

Obtained from: TrustedBSD Project

11 years agoRegenerate usb.conf
hselasky [Sat, 15 Dec 2012 10:56:16 +0000 (10:56 +0000)]
Regenerate usb.conf

MFC after: 1 week

11 years agoMFV r244245:
mm [Sat, 15 Dec 2012 10:02:11 +0000 (10:02 +0000)]
MFV r244245:

Merge two zdb bugfixes from vendor (illumos)

illumos-gate 13894:f4af77f6bbd2
3397 zdb <pool> <objnum> output is too verbose
3398 zdb can't dump feature flags zap objects

References:
https://www.illumos.org/issues/3397
https://www.illumos.org/issues/3398

MFC after: 1 week

11 years agoFix extending filesystems of weird size by making sure the actual size
trasz [Sat, 15 Dec 2012 08:53:58 +0000 (08:53 +0000)]
Fix extending filesystems of weird size by making sure the actual size
is always multiple of fragment size.

11 years agoWhen mnt_vnode_next_active iterator cannot lock the next vnode and
kib [Sat, 15 Dec 2012 02:04:46 +0000 (02:04 +0000)]
When mnt_vnode_next_active iterator cannot lock the next vnode and
yields, specify the user priority for the yield.  Otherwise, a
higher-priority (kernel) thread could fall into the priority-inversion
with the thread owning the mutex lock.

On single-processor machines or UP kernels, do not loop adaptively
when the next vnode cannot be locked, instead yield unconditionally.

Restructure the iteration initializer and the iterator to remove code
duplication.  Put the code to fetch and lock a vnode next to the
current marker, into the mnt_vnode_next_active() function, and use it
instead of repeating the loop.

Reported by: hrs, rmacklem
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

11 years agoFix a typo, resulting in the NULL pointer dereference.
kib [Sat, 15 Dec 2012 02:03:59 +0000 (02:03 +0000)]
Fix a typo, resulting in the NULL pointer dereference.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

11 years agoLine up the continuation backslashes.
kib [Sat, 15 Dec 2012 02:03:06 +0000 (02:03 +0000)]
Line up the continuation backslashes.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

11 years agoRemove a special case for XEN, which is erronous and makes vfork(2)
kib [Sat, 15 Dec 2012 02:02:11 +0000 (02:02 +0000)]
Remove a special case for XEN, which is erronous and makes vfork(2)
behaviour to differ from the documented, only on XEN.  If there are
any issues with XEN pmap left, they should be fixed in pmap.

MFC after: 2 weeks

11 years agoPut shared library debug info into separate .symbols file
emaste [Sat, 15 Dec 2012 00:03:35 +0000 (00:03 +0000)]
Put shared library debug info into separate .symbols file

Sponsored by: ADARA Networks

11 years agoAdd a guide to upgrading (un)vis(3) imports.
brooks [Fri, 14 Dec 2012 23:07:25 +0000 (23:07 +0000)]
Add a guide to upgrading (un)vis(3) imports.

11 years agoTag 2nd 2012-12-14 import of NetBSD's (un)vis(3)
brooks [Fri, 14 Dec 2012 23:06:31 +0000 (23:06 +0000)]
Tag 2nd 2012-12-14 import of NetBSD's (un)vis(3)

11 years agoVendor import of NetBSD's (un)vis(3) at 2012-12-14 (2nd one)
brooks [Fri, 14 Dec 2012 23:04:56 +0000 (23:04 +0000)]
Vendor import of NetBSD's (un)vis(3) at 2012-12-14 (2nd one)

11 years agoTag 2012-12-14 import of NetBSD's (un)vis(3)
brooks [Fri, 14 Dec 2012 22:47:09 +0000 (22:47 +0000)]
Tag 2012-12-14 import of NetBSD's (un)vis(3)

11 years agoVendor import of NetBSD's (un)vis(3) at 2012-12-14
brooks [Fri, 14 Dec 2012 22:45:03 +0000 (22:45 +0000)]
Vendor import of NetBSD's (un)vis(3) at 2012-12-14

11 years agoThe group list for a non-default export entry (a host/subnet one)
rmacklem [Fri, 14 Dec 2012 21:49:06 +0000 (21:49 +0000)]
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.

PR: 147998
Submitted by: Christopher Key (cjk32 at cam.ac.uk)
MFC after: 2 weeks

11 years agoMinor refactoring prior to .symbols file changes
emaste [Fri, 14 Dec 2012 18:30:01 +0000 (18:30 +0000)]
Minor refactoring prior to .symbols file changes

- Combine .if x and .if !x using .else
- Separate out beforelinking dependency
- Add comments to clarify .if nesting

Sponsored by: ADARA Networks

11 years ago- When checking if a dump exists on the given device there is no need to
pjd [Fri, 14 Dec 2012 15:12:08 +0000 (15:12 +0000)]
- When checking if a dump exists on the given device there is no need to
  provide dump directory. Eliminate this redundant argument. This changes
  the usage, but the only risk here is that a warning will be printed
  about directory given as device.

- Update usage of -C option.

- When clearing dump header from the given device there is also no need to
  provide dump directory, although additional arguments for -c were not
  documented.

- Document that -v can be used with -c and that list of devices can be given.

Obtained from: WHEEL Systems

11 years agoThe clear option (-c) is not compatible with keep (-k) and compress (-z)
pjd [Fri, 14 Dec 2012 15:04:39 +0000 (15:04 +0000)]
The clear option (-c) is not compatible with keep (-k) and compress (-z)
options.

Obtained from: WHEEL Systems

11 years agoIf we are not going to clear the dump (we are either just checking if the dump
pjd [Fri, 14 Dec 2012 15:03:12 +0000 (15:03 +0000)]
If we are not going to clear the dump (we are either just checking if the dump
exists or we want to keep it), open device read-only.

Obtained from: WHEEL Systems

11 years agoWhitespace cleanups.
pjd [Fri, 14 Dec 2012 15:01:23 +0000 (15:01 +0000)]
Whitespace cleanups.

11 years ago Fix error in r235991. No-sleep version of IFNET_RLOCK() should
glebius [Fri, 14 Dec 2012 13:01:16 +0000 (13:01 +0000)]
  Fix error in r235991. No-sleep version of IFNET_RLOCK() should
be used here, since we may hold the main pf rulesets rwlock.

Reported by: Fleuriot Damien <ml my.gd>

11 years agoAdd an #include guard to the sys/fnv_hash.h.
ae [Fri, 14 Dec 2012 12:37:35 +0000 (12:37 +0000)]
Add an #include guard to the sys/fnv_hash.h.

MFC after: 3 days

11 years agoFix VIMAGE build broken in r244185.
glebius [Fri, 14 Dec 2012 08:02:35 +0000 (08:02 +0000)]
Fix VIMAGE build broken in r244185.

Submitted by: Nikolai Lifanov <lifanov mail.lifanov.com>

11 years agovirtio: Start taskqueues threads after attach cannot fail
bryanv [Fri, 14 Dec 2012 05:27:56 +0000 (05:27 +0000)]
virtio: Start taskqueues threads after attach cannot fail

If virtio_setup_intr() failed during boot, we would hang in
taskqueue_free() -> taskqueue_terminate() for all the taskq
threads to terminate. This will never happen since the
scheduler is not running by this point.

Reported by: neel, grehan
Approved by: grehan (mentor)

11 years agoTeach sysctl(8) about parsing a file (while I'm there also give it
delphij [Thu, 13 Dec 2012 23:32:47 +0000 (23:32 +0000)]
Teach sysctl(8) about parsing a file (while I'm there also give it
capability of parsing both = and : formats).

Submitted by: hrs (initial version, bugs are mine)
MFC after: 3 months

11 years agoAdd support for QEMU's version of Versatile Platform Board
gonzo [Thu, 13 Dec 2012 23:19:13 +0000 (23:19 +0000)]
Add support for QEMU's version of Versatile Platform Board

11 years agoAdd driver for PrimeCell Vectored Interrupt Controller (PL190)
gonzo [Thu, 13 Dec 2012 23:03:37 +0000 (23:03 +0000)]
Add driver for PrimeCell Vectored Interrupt Controller (PL190)

11 years agoFixes zfs receive errors caused by snapshot replication being processed in a
smh [Thu, 13 Dec 2012 22:03:07 +0000 (22:03 +0000)]
Fixes zfs receive errors caused by snapshot replication being processed in a
random order instead of creation order.

Eliminates needless filesystem renames caused by removed parent snapshots
which subsequently causes many more errors.

PR: kern/172259
Submitted by: Steven Hartland
Reviewed by: pjd (mentor)
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoAdd bus_space_read_8 and bus_space_write_8 for amd64.
jimharris [Thu, 13 Dec 2012 21:40:11 +0000 (21:40 +0000)]
Add bus_space_read_8 and bus_space_write_8 for amd64.

Rather than trying to KASSERT for callers that invoke this on
IO tags, either do nothing (for write_8) or return ~0 (for read_8).
Using KASSERT here just makes bus.h too messy from both
polluting bus.h with systm.h (for any number of drivers that include
bus.h without first including systm.h) or ports that use bus.h
directly (i.e. libpciaccess) as reported by zeising@.

Also don't try to implement all of the other bus_space functions for
8 byte access since realistically only these two are needed for some
devices that expose 64-bit memory-mapped registers.

Put the amd64-specific functions here rather than sys/amd64/include/bus.h
so that we can keep this header unified for x86, as requested by mdf@
and tijl@.

Submitted by: Carl Delsey <carl.r.delsey@intel.com>
MFC after: 3 days

11 years agoRevert r243960 based on feedback regarding keeping x86 headers unified
jimharris [Thu, 13 Dec 2012 21:27:20 +0000 (21:27 +0000)]
Revert r243960 based on feedback regarding keeping x86 headers unified
(mdf@, tijl@) and use of KASSERT/systm.h in bus.h (zeising@, bde@).

Alternate implementation will be made in a separate commit.

11 years agoAdded vfs.zfs.vdev.trim_on_init sysctl which allows full vdev trim on
smh [Thu, 13 Dec 2012 17:39:07 +0000 (17:39 +0000)]
Added vfs.zfs.vdev.trim_on_init sysctl which allows full vdev trim on
initialisation to be enabled (1) / disabled (0) defaults to enabled.

This is useful for devices which have a slow trim speed and are either
new or have otherwise already been wiped e.g. secure erase.

PR:     kern/173116
Submitted by:   Steven Hartland
Approved by:    pjd (mentor)

11 years agoUpgrades trim free request sizes before inserting them into to free map,
smh [Thu, 13 Dec 2012 17:06:38 +0000 (17:06 +0000)]
Upgrades trim free request sizes before inserting them into to free map,
making range consolidation much more effective particularly for small
deletes.

This reduces memory used by the free map as well as reducing the number
of bio requests down to geom required to process all deletes.

In tests this achieved a factor of 10 reduction of trim ranges / geom
call downs.

While I'm here correct the description of zio_vdev_io_start.

PR: kern/173254
Submitted by: Steven Hartland
Approved by: pjd (mentor)