]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoImplement iSCSI TARGET COLD RESET task management function.
mav [Sun, 13 Sep 2015 20:22:18 +0000 (20:22 +0000)]
Implement iSCSI TARGET COLD RESET task management function.

Implement it as CTL_TASK_TARGET_RESET plus termination of all sessions.

8 years agoDisable mgmt frame sending in if_rsu.
adrian [Sun, 13 Sep 2015 19:17:26 +0000 (19:17 +0000)]
Disable mgmt frame sending in if_rsu.

The firmware in this NIC sends management frames.  So far I'm not sure which
ones it handles and which ones it doesn't handle - but this is what openbsd
does.

The association messages are handled by the firmware; the key negotiation
for 802.1x and WPA are done as raw frames, not management frames.

This successfully allows it to associate to my home networks whereas it didn't
work beforehand.

Tested:

* RTL8712, cut 3, STA mode

TODO:

* The firmware does send a join response with a status code; that should be
  logged in a more obvious way to assist with debugging.  Ie, the firmware
  is the thing that is saying "couldn't join, sorry!", not net80211.

8 years agoUpdate em(4) with D3162 after testing further on hardware that failed
sbruno [Sun, 13 Sep 2015 18:26:05 +0000 (18:26 +0000)]
Update em(4) with D3162 after testing further on hardware that failed
to attach with the last version of this commit. This commit fixes
attach failures on "ICH8" class devices via modifications to
e1000_init_nvm_params_ich8lan()

-   Fix compiler warning in 80003es2lan.c
-   Add return value handler for e1000_*_kmrn_reg_80003es2lan
-   Fix usage of DEBUGOUT
-   Remove unnecessary variable initializations.
-   Removed unused variables (complaints from gcc).
-   Edit defines in 82571.h.
-   Add workaround for igb hw errata.
-   Shared code changes for Skylake/I219 support.
-   Remove unused OBFF and LTR functions.

Tested by some of the folks that reported breakage in previous incarnation.
Thanks to AllanJude, gjb, gnn, tijl for tempting fate with their machines.

Submitted by: erj@freebsd.org
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D3162

8 years agodb/recno: Open with close-on-exec like btree and hash do.
jilles [Sun, 13 Sep 2015 17:17:52 +0000 (17:17 +0000)]
db/recno: Open with close-on-exec like btree and hash do.

8 years agoImprove read-only support.
mav [Sun, 13 Sep 2015 16:49:41 +0000 (16:49 +0000)]
Improve read-only support.

8 years agodd DTrace probe points, translators and a corresponding script
gnn [Sun, 13 Sep 2015 15:50:55 +0000 (15:50 +0000)]
dd DTrace probe points, translators and a corresponding script
to provide the TCPDEBUG functionality with pure DTrace.

Reviewed by: rwatson
MFC after: 2 weeks
Sponsored by: Limelight Networks
Differential Revision: D3530

8 years agoReannounce port to HA peer if LUN map changed after online.
mav [Sun, 13 Sep 2015 15:31:55 +0000 (15:31 +0000)]
Reannounce port to HA peer if LUN map changed after online.

8 years agoWhen updating port, apply only change of LUN map, not whole.
mav [Sun, 13 Sep 2015 15:08:06 +0000 (15:08 +0000)]
When updating port, apply only change of LUN map, not whole.

8 years agoReport INQUIRY DATA HAS CHANGED for related LUNs on port on-/offline.
mav [Sun, 13 Sep 2015 14:52:31 +0000 (14:52 +0000)]
Report INQUIRY DATA HAS CHANGED for related LUNs on port on-/offline.

8 years agoReport CTL_UA_LUN_CHANGE on LUN map change.
mav [Sun, 13 Sep 2015 14:04:42 +0000 (14:04 +0000)]
Report CTL_UA_LUN_CHANGE on LUN map change.

8 years agosetuid(2): Suggest O_CLOEXEC instead of fcntl(F_SETFD).
jilles [Sun, 13 Sep 2015 14:00:49 +0000 (14:00 +0000)]
setuid(2): Suggest O_CLOEXEC instead of fcntl(F_SETFD).

8 years agoMake TARGET RESET respect LUN mapping.
mav [Sun, 13 Sep 2015 13:00:20 +0000 (13:00 +0000)]
Make TARGET RESET respect LUN mapping.

8 years agoAdd ID for Intel Panther Point KT Controller
mav [Sun, 13 Sep 2015 12:08:25 +0000 (12:08 +0000)]
Add ID for Intel Panther Point KT Controller

Found on ASUS P8Q77-M motherboard.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after: 2 weeks

8 years agoMFV r287623: 5997 FRU field not set during pool creation and never
delphij [Sun, 13 Sep 2015 07:15:14 +0000 (07:15 +0000)]
MFV r287623: 5997 FRU field not set during pool creation and never
updated

ZFS already supports storing the vdev FRU in a vdev property.  There
is code in libzfs to work with this property, and there is code in
the zfs-retire FMA module that looks for that information.  But there
is no code actually setting or updating the FRU.

To address this, ZFS is changed to send a handful of new events
whenever a vdev is added, attached, cleared, or onlined, as well
as when a pool is created or imported.

Note that syseventd is not currently available on FreeBSD and thus
some work is needed to actually support the new ZFS events (e.g. in
zfsd) to actually use this capability, this changeset is mostly a
diff reduction from upstream.

illumos/illumos-gate@1437283407f89cab03860accf49408f94559bc34

Illumos issues:

    5997 FRU field not set during pool creation and never updated
    https://www.illumos.org/issues/5997

8 years agoNote r286552 as merged and reduce diff against upstream.
delphij [Sun, 13 Sep 2015 06:49:42 +0000 (06:49 +0000)]
Note r286552 as merged and reduce diff against upstream.

8 years agoAdd RSSI logging to the event survey results.
adrian [Sun, 13 Sep 2015 05:22:20 +0000 (05:22 +0000)]
Add RSSI logging to the event survey results.

8 years agoAfter reading the linux driver, document what this bit is doing
adrian [Sun, 13 Sep 2015 04:41:13 +0000 (04:41 +0000)]
After reading the linux driver, document what this bit is doing
(doing a full NIC awake.)

8 years ago* fiddle with some more of the debugging output
adrian [Sun, 13 Sep 2015 04:12:51 +0000 (04:12 +0000)]
* fiddle with some more of the debugging output
* yes, when a "sta disconnect" message comes through we should, like,
  disconnect things.  We're not currently generating beacon miss messages,
  and net80211 isn't disconnecting things via software beacon miss receive.

Tested:

* RTL8712, cut 3, STA mode

8 years agoMerge r286374 from x86:
marius [Sun, 13 Sep 2015 00:08:04 +0000 (00:08 +0000)]
Merge r286374 from x86:

Formally pair store_rel(&smp_started) with load_acq(&smp_started).
Similarly to x86, this change is mostly a NOP due to the kernel
being run in total store order.

MFC after: 1 week

8 years agoif_rsu debug fixes:
adrian [Sat, 12 Sep 2015 23:10:34 +0000 (23:10 +0000)]
if_rsu debug fixes:

* use an ath/iwn style debug bitmap - it's still global rather than per-device,
  but it's better than debug levels
* disable bgscan - it just makes things unstable/unpredictable for now.

Tested:

* if_rsu - RTL8712 cut 3, STA mode

8 years ago- Factor out the common and generic parts of the sparc64 host-PCI-bridge
marius [Sat, 12 Sep 2015 22:49:32 +0000 (22:49 +0000)]
- Factor out the common and generic parts of the sparc64 host-PCI-bridge
  drivers into the revived sys/sparc64/pci/ofw_pci.c, previously already
  serving a similar purpose. This has been done with sun4v in mind, which
  explains a) the otherwise not that obvious scheme employed and b) why
  reusing sys/powerpc/ofw/ofw_pci.c was even lesser an option.
- Add a workaround for QEMU once again not emulating real machines, in
  this case by not providing the OFW_PCI_CS_MEM64 range. [1]

Submitted by: jhb [1]
MFC after: 1 week

8 years agoFix compilation issue introduced in r287717.
tuexen [Sat, 12 Sep 2015 21:23:24 +0000 (21:23 +0000)]
Fix compilation issue introduced in r287717.
Thanks to bz@ for making me aware of it.

MFC after: 1 week

8 years agoCheck for obsolete NUL bin in CSCD descriptor.
mav [Sat, 12 Sep 2015 20:45:09 +0000 (20:45 +0000)]
Check for obsolete NUL bin in CSCD descriptor.

8 years agoAdd HA support for CTL_TASK_I_T_NEXUS_RESET.
mav [Sat, 12 Sep 2015 20:06:22 +0000 (20:06 +0000)]
Add HA support for CTL_TASK_I_T_NEXUS_RESET.

8 years agoFix false CTL_UA_RES_RELEASE on secondary HA node.
mav [Sat, 12 Sep 2015 18:29:05 +0000 (18:29 +0000)]
Fix false CTL_UA_RES_RELEASE on secondary HA node.

8 years agoAddress a compile warning.
tuexen [Sat, 12 Sep 2015 18:00:06 +0000 (18:00 +0000)]
Address a compile warning.

MFC after: 1 week

8 years agoDecode WRITE ATOMIC(16) command.
mav [Sat, 12 Sep 2015 17:53:49 +0000 (17:53 +0000)]
Decode WRITE ATOMIC(16) command.

8 years agoCleanup the handling of error causes for ERROR chunks. This fixes
tuexen [Sat, 12 Sep 2015 17:08:51 +0000 (17:08 +0000)]
Cleanup the handling of error causes for ERROR chunks. This fixes
an inconsistency of the padding handling. The final padding is
now considered to be a chunk padding.

MFC after: 1 week

8 years agoDo not call mii_mediachg() from NIC interrupt handler.
loos [Sat, 12 Sep 2015 16:46:41 +0000 (16:46 +0000)]
Do not call mii_mediachg() from NIC interrupt handler.

This fixes the link instability on banana pi (A20).

Suggested by: yongari

8 years agoImprove XCOPY error reporting.
mav [Sat, 12 Sep 2015 16:30:01 +0000 (16:30 +0000)]
Improve XCOPY error reporting.

8 years agoReport that we have no limit on POPULATE TOKEN segment size.
mav [Sat, 12 Sep 2015 14:20:11 +0000 (14:20 +0000)]
Report that we have no limit on POPULATE TOKEN segment size.

8 years agoCorrect RTPG bitmask.
mav [Sat, 12 Sep 2015 13:53:41 +0000 (13:53 +0000)]
Correct RTPG bitmask.

8 years agoSome HA polishing.
mav [Sat, 12 Sep 2015 12:46:04 +0000 (12:46 +0000)]
Some HA polishing.

8 years agoCTL documentation update, mostly for HA.
mav [Sat, 12 Sep 2015 10:23:23 +0000 (10:23 +0000)]
CTL documentation update, mostly for HA.

8 years agoMFV r287699: 6214 zpools going south
delphij [Sat, 12 Sep 2015 09:56:23 +0000 (09:56 +0000)]
MFV r287699: 6214 zpools going south

In r286570 (MFV of r277426) an unprotected write to b_flags to
set the compression mode was introduced.  This would open a race
window where data is partially decompressed, modified, checksummed
and written to the pool, resulting in pool corruption due to the
partial decompression.

Prevent this by reintroducing b_compress

illumos/illumos-gate@d4cd038c92c36fd0ae35945831a8fc2975b5272c

Illumos issues:

    6214 zpools going south
    https://www.illumos.org/issues/6214

8 years agoFix build (r287703). Lesson learned: no matter how a change looks like an
delphij [Sat, 12 Sep 2015 09:28:02 +0000 (09:28 +0000)]
Fix build (r287703).  Lesson learned: no matter how a change looks like an
innocent one, always do a build test first.

Pointy hat to: delphij

8 years agoPoint potential geom_fox(4) users to gmultipath(8).
trasz [Sat, 12 Sep 2015 08:54:24 +0000 (08:54 +0000)]
Point potential geom_fox(4) users to gmultipath(8).

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoMFV r287684: 6091 avl_add doesn't assert on non-debug builds
delphij [Sat, 12 Sep 2015 08:50:43 +0000 (08:50 +0000)]
MFV r287684: 6091 avl_add doesn't assert on non-debug builds

Use assfail() from libuutil instead of ASSERT() in userland
AVL avl_add.

illumos/illumos-gate@faa2b6be2fc102adf9ed584fc1a667b4ddf50d78

Illumos issues:

    6091 avl_add doesn't assert on non-debug builds
    https://www.illumos.org/issues/6091

8 years agoMFV r287624: 5987 zfs prefetch code needs work
delphij [Sat, 12 Sep 2015 08:35:51 +0000 (08:35 +0000)]
MFV r287624: 5987 zfs prefetch code needs work

Rewrite the ZFS prefetch code to detect only forward, sequential
streams.

The following kstats have been added:

    kstat.zfs.misc.arcstats.sync_wait_for_async

How many sync reads have waited for async read
to complete. (less is better)

    kstat.zfs.misc.arcstats.demand_hit_predictive_prefetch

How many demand read didn't have to wait for I/O
because of predictive prefetch.  (more is better)

zfetch kstats have been similified to hits, misses, and max_streams,
with max_streams representing times when we were not able to create
new stream because we already have the maximum number of sequences
for a file.

The sysctl variable/loader tunable vfs.zfs.zfetch.block_cap have been
replaced by vfs.zfs.zfetch.max_distance, which controls maximum bytes
to prefetch per stream.

illumos/illumos-gate@cf6106c8a0d6598b045811f9650d66e07eb332af

Illumos ZFS issues:

    5987 zfs prefetch code needs work
    https://www.illumos.org/issues/5987

8 years agoRegression: fix pw usermod -d
bapt [Sat, 12 Sep 2015 08:24:25 +0000 (08:24 +0000)]
Regression: fix pw usermod -d

Mark the user has having been edited if -d option is passed to usermod and
so the request change of home directory actually happen

PR: 203052
Reported by: lenzi.sergio@gmail.com
MFC after: 2 days

8 years agoFixing a memory leak on module unloading.
avatar [Fri, 11 Sep 2015 22:43:35 +0000 (22:43 +0000)]
Fixing a memory leak on module unloading.

MFC after: 3 weeks

8 years agoWhitespace alignment
dteske [Fri, 11 Sep 2015 22:42:26 +0000 (22:42 +0000)]
Whitespace alignment

MFC after: 3 weeks
X-MFC-to: stable/10
X-MFC-with: 287696

8 years agoThe <arch>/mkisoimages.sh script in release knows how to add
dteske [Fri, 11 Sep 2015 21:45:41 +0000 (21:45 +0000)]
The <arch>/mkisoimages.sh script in release knows how to add
extra bits from an "xtra-bits-dir". This feature is unusable
from release/Makefile. Add an XTRADIR setting to use it.

Differential Revision: https://reviews.freebsd.org/D3633
Reviewed by: kmacy
MFC after: 3 weeks
X-MFC-to: stable/10
Relnotes: yes

8 years agoReplace `return' outside of function with exit
dteske [Fri, 11 Sep 2015 21:18:21 +0000 (21:18 +0000)]
Replace `return' outside of function with exit

MFC after: 3 days
X-MFC-to: stable/10
Pointy hat to: me

8 years agoUse a variable for readability
dteske [Fri, 11 Sep 2015 21:14:48 +0000 (21:14 +0000)]
Use a variable for readability

MFC after: 3 days
X-MFC-to: stable/10

8 years agoUpdate copyright
dteske [Fri, 11 Sep 2015 21:13:34 +0000 (21:13 +0000)]
Update copyright

MFC after: 3 days
X-MFC-to: stable/10

8 years agoBetter to reset trap and explicitly exit success
dteske [Fri, 11 Sep 2015 21:12:41 +0000 (21:12 +0000)]
Better to reset trap and explicitly exit success

MFC after: 3 days
X-MFC-to: stable/10

8 years agoRemove trailing newline at EOF
dteske [Fri, 11 Sep 2015 21:09:39 +0000 (21:09 +0000)]
Remove trailing newline at EOF

MFC after: 3 days
X-MFC-to: stable/10

8 years agoProduce meaningful exit code
dteske [Fri, 11 Sep 2015 21:08:46 +0000 (21:08 +0000)]
Produce meaningful exit code

MFC after: 3 days
X-MFC-to: stable/10

8 years agoExplicitly exit with success
dteske [Fri, 11 Sep 2015 21:01:26 +0000 (21:01 +0000)]
Explicitly exit with success

MFC after: 3 days
X-MFC-to: stable/10

8 years agoExplicitly exit with success
dteske [Fri, 11 Sep 2015 20:59:13 +0000 (20:59 +0000)]
Explicitly exit with success

MFC after: 3 days
X-MFC-to: stable/10

8 years agoUpdate copyrights
dteske [Fri, 11 Sep 2015 20:58:00 +0000 (20:58 +0000)]
Update copyrights

MFC after: 3 days
X-MFC-to: stable/10

8 years agoProduce meaningful exit code
dteske [Fri, 11 Sep 2015 20:56:36 +0000 (20:56 +0000)]
Produce meaningful exit code

MFC after: 3 days
X-MFC-to: stable/10

8 years agoRemove use of return outside of function
dteske [Fri, 11 Sep 2015 20:45:41 +0000 (20:45 +0000)]
Remove use of return outside of function

MFC after: 3 days
X-MFC-to: stable/10

8 years agoIgnore error results from newaliases(1)
dteske [Fri, 11 Sep 2015 20:39:41 +0000 (20:39 +0000)]
Ignore error results from newaliases(1)

MFC after: 3 days
X-MFC-to: stable/10

8 years agoSince contrib/libc++'s ancestry was never correct, subversion 1.8 and
dim [Fri, 11 Sep 2015 17:14:58 +0000 (17:14 +0000)]
Since contrib/libc++'s ancestry was never correct, subversion 1.8 and
higher cannot merge to it from the vendor area.

Re-bootstrap the ancestry by doing (apologies to your retinas):
* svn rm contrib/libc++
* svn cp ^/vendor/libc++/dist@276792 contrib/libc++
* svn cp ^/head/contrib/libc++/FREEBSD-upgrade@287629 contrib/libc++
* svn cp ^/head/contrib/libc++/include/__bit_reference@287629 contrib/libc++/include
* svn cp ^/head/contrib/libc++/include/__config@287629 contrib/libc++/include
* svn cp ^/head/contrib/libc++/include/__tree@287629 contrib/libc++/include
* svn cp ^/head/contrib/libc++/include/algorithm@287629 contrib/libc++/include
* svn cp ^/head/contrib/libc++/include/stdexcept@287629 contrib/libc++/include
* svn cp ^/head/contrib/libc++/include/type_traits@287629 contrib/libc++/include
* svn pd -R svn:mergeinfo contrib/libc++
* svn ps -F mergeinfo.txt contrib/libc++

8 years agoRevert ip_fil_freebsd.c -r287674. This should not have gone in yet.
cy [Fri, 11 Sep 2015 16:52:13 +0000 (16:52 +0000)]
Revert ip_fil_freebsd.c -r287674. This should not have gone in yet.

8 years agoFix ipfilter bug 3600459 NAT bucket count wrong.
cy [Fri, 11 Sep 2015 16:49:52 +0000 (16:49 +0000)]
Fix ipfilter bug 3600459 NAT bucket count wrong.

Obtained from: ipfilter cvs repo r1.48.2.25
MFC after: 2 weeks

8 years agoradeon_suspend_kms: don't mess with pci state that's managed by the bus
avg [Fri, 11 Sep 2015 15:51:20 +0000 (15:51 +0000)]
radeon_suspend_kms: don't mess with pci state that's managed by the bus

The pci bus driver handles the power state, it also manages
configuration state saving and restoring for its child devices.  Thus a
PCI device driver does not have to worry about those things.  In fact, I
observe a hard system hang when trying to suspend a system with active
radeonkms driver where both the bus driver and radeonkms driver try to
do the same thing.  I suspect that it could be because of an access to a
PCI configuration register after the device is placed into D3 state.

Reviewed by: dumbbell, jhb
MFC after: 13 days
Differential Revision: https://reviews.freebsd.org/D3561

8 years agoMake ctld restart on primary HA node less invasive for secondary.
mav [Fri, 11 Sep 2015 14:47:35 +0000 (14:47 +0000)]
Make ctld restart on primary HA node less invasive for secondary.

8 years agoClose races between device close and request processing.
mav [Fri, 11 Sep 2015 14:33:05 +0000 (14:33 +0000)]
Close races between device close and request processing.

All requests arriving for processing after OFFLINE flag set are rejected
with BUSY status.  Races around OFFLINE flag setting are closed by calling
taskqueue_drain_all().

8 years agoEnsure that ERROR chunks are always padded by implementing this
tuexen [Fri, 11 Sep 2015 13:54:33 +0000 (13:54 +0000)]
Ensure that ERROR chunks are always padded by implementing this
in the routine, which queues an ERROR chunk, instead on relyinh
on the callers to do so. Since one caller missed this, this actially
fixes a bug.

MFC after: 1 week

8 years agoReference/release devices on every I/O, rather on open/close.
mav [Fri, 11 Sep 2015 12:50:52 +0000 (12:50 +0000)]
Reference/release devices on every I/O, rather on open/close.

While this may be slower, it allows device destruction to complete,
rather then block waiting for indefinitely long time.

8 years agoAdd support for PPP-Max-Payload PPPoE tag (RFC4638).
mav [Fri, 11 Sep 2015 09:15:27 +0000 (09:15 +0000)]
Add support for PPP-Max-Payload PPPoE tag (RFC4638).

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after: 2 weeks

8 years agoRevert $FreeBSD$.
cy [Fri, 11 Sep 2015 08:48:16 +0000 (08:48 +0000)]
Revert $FreeBSD$.

8 years agoFix mutex errors.
cy [Fri, 11 Sep 2015 08:35:53 +0000 (08:35 +0000)]
Fix mutex errors.

Obtained from: NetBSD r1.4.
MFC after: 1 week

8 years agoFixup typos in comments.
cy [Fri, 11 Sep 2015 08:27:32 +0000 (08:27 +0000)]
Fixup typos in comments.

Obtained from: NetBSD r1.4.
MFC after: 1 week

8 years agoUse strlcpy() in favor of strncpy() as it's defined to have a nul character
delphij [Fri, 11 Sep 2015 06:52:57 +0000 (06:52 +0000)]
Use strlcpy() in favor of strncpy() as it's defined to have a nul character
at the end of string buffer, and the code context do expects this to behave
correctly (e.g. strchr).

Note that we do not believe there is real-world impact for gstat(8)'s usage
because the strings are length checked, and the on-stack buffer belongs to
main() and we can expect to have zeros in them.

MFC after: 2 weeks

8 years agoUse a common subroutine to fetch and zero protocol stats instead of
markj [Fri, 11 Sep 2015 04:37:01 +0000 (04:37 +0000)]
Use a common subroutine to fetch and zero protocol stats instead of
duplicating roughly similar code for each protocol.

MFC after: 2 weeks

8 years agobufdonebio is now unused. Retire it too.
imp [Fri, 11 Sep 2015 04:20:04 +0000 (04:20 +0000)]
bufdonebio is now unused. Retire it too.

8 years agoRemove prototypes for undefined functions from netstat.h.
markj [Fri, 11 Sep 2015 04:02:05 +0000 (04:02 +0000)]
Remove prototypes for undefined functions from netstat.h.

8 years agoDocument stack_save_td(9) and stack_save_td_running(9).
markj [Fri, 11 Sep 2015 03:56:04 +0000 (03:56 +0000)]
Document stack_save_td(9) and stack_save_td_running(9).

Reviewed by: wblock
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D3243

8 years agoAdd stack_save_td_running(), a function to trace the kernel stack of a
markj [Fri, 11 Sep 2015 03:54:37 +0000 (03:54 +0000)]
Add stack_save_td_running(), a function to trace the kernel stack of a
running thread.

It is currently implemented only on amd64 and i386; on these
architectures, it is implemented by raising an NMI on the CPU on which
the target thread is currently running. Unlike stack_save_td(), it may
fail, for example if the thread is running in user mode.

This change also modifies the kern.proc.kstack sysctl to use this function,
so that stacks of running threads are shown in the output of "procstat -kk".
This is handy for debugging threads that are stuck in a busy loop.

Reviewed by: bdrewery, jhb, kib
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D3256

8 years agoRemove the arg0 field from struct amd64_frame. Its existence was a bug,
markj [Fri, 11 Sep 2015 03:31:22 +0000 (03:31 +0000)]
Remove the arg0 field from struct amd64_frame. Its existence was a bug,
since on amd64 the first argument to a function is generally not on the
stack.

Revert an old DTrace bug fix to some code that assumed that
sizeof(struct amd64_frame) == 16.

Reviewed by: jhb, kib
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D3255

8 years agoMerge stack(9) implementations for i386 and amd64 under x86/.
markj [Fri, 11 Sep 2015 03:24:07 +0000 (03:24 +0000)]
Merge stack(9) implementations for i386 and amd64 under x86/.

Reviewed by: jhb, kib
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D3255

8 years agoMFV r283513:
markj [Fri, 11 Sep 2015 03:06:34 +0000 (03:06 +0000)]
MFV r283513:
5930 fasttrap_pid_enable() panics when prfind() fails in forking process
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Bryan Cantrill <bryan@joyent.com>

illumos/illumos-gate@9df7e4e12eb093557252d3bec029b5c382613e36

8 years agoMFV r283512:
markj [Fri, 11 Sep 2015 03:04:24 +0000 (03:04 +0000)]
MFV r283512:
3599 dtrace_dynvar tail calls can blow stack
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Bryan Cantrill <bryan@joyent.com>

illumos/illumos-gate@d47448f09aae3aa1a87fc450a0c44638e7ce7b51

8 years agoRemove the v_cache_min and v_cache_max sysctls. They are unused and have
markj [Fri, 11 Sep 2015 03:00:24 +0000 (03:00 +0000)]
Remove the v_cache_min and v_cache_max sysctls.  They are unused and have
no effect.

Reviewed by: alc
Sponsored by: EMC / Isilon Storage Division

8 years agodev_strategy and dev_strategy_csw are unused since r281825. Remove
imp [Fri, 11 Sep 2015 00:38:58 +0000 (00:38 +0000)]
dev_strategy and dev_strategy_csw are unused since r281825. Remove
them.

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

8 years agoHandle default MAKEOBJDIR for META_MODE.
sjg [Fri, 11 Sep 2015 00:19:49 +0000 (00:19 +0000)]
Handle default MAKEOBJDIR for META_MODE.
If MAKEOBJDIRPREFIX is set, use it for default OBJROOT.
If MAKEOBJDIR is empty or not a suitable value (no '/')
set a default that works.

Reviewed by: bdrewery

8 years agoFix argument quoting and remove unnecessary braces
dteske [Thu, 10 Sep 2015 22:47:26 +0000 (22:47 +0000)]
Fix argument quoting and remove unnecessary braces

MFC after: 3 weeks
X-MFC-to: stable/10

8 years agologin.c doesn't really need libutil.h, don't include it.
delphij [Thu, 10 Sep 2015 22:25:40 +0000 (22:25 +0000)]
login.c doesn't really need libutil.h, don't include it.

login_fbtab.c includes paths.h and pathnames.h, and pathnames.h includes
paths.h.  Eliminate the paths.h inclusion in login_fbtab.c.

MFC after: 2 weeks

8 years ago - Avoid accessing window properties directly, instead, use accessors.
delphij [Thu, 10 Sep 2015 22:07:52 +0000 (22:07 +0000)]
 - Avoid accessing window properties directly, instead, use accessors.
   This should be no-op for now, but allows the code to work if we
   move to NCURSES_OPAQUE.
 - Use calloc() instead of malloc+bzero.

MFC after: 2 weeks

8 years agoAdd a comment that to clarify how to determine the amount of received DDP
jhb [Thu, 10 Sep 2015 21:41:11 +0000 (21:41 +0000)]
Add a comment that to clarify how to determine the amount of received DDP
data.

Reviewed by: np
Differential Revision: https://reviews.freebsd.org/D3619

8 years agoDo not hold the process around the vm_fault() call from the trap()s.
kib [Thu, 10 Sep 2015 17:46:48 +0000 (17:46 +0000)]
Do not hold the process around the vm_fault() call from the trap()s.
The only operation which is prevented by the hold is the kernel stack
swapout for the faulted thread, which should be fine to allow.

Remove useless checks for NULL curproc or curproc->p_vmspace from the
trap_pfault() wrappers on x86 and powerpc.

Reviewed by: alc (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoReimplement CTL High Availability.
mav [Thu, 10 Sep 2015 12:40:31 +0000 (12:40 +0000)]
Reimplement CTL High Availability.

CTL HA functionality was originally implemented by Copan many years ago,
but large part of the sources was never published.  This change includes
clean room implementation of the missing code and fixes for many bugs.

This code supports dual-node HA with ALUA in four modes:
 - Active/Unavailable without interlink between nodes;
 - Active/Standby with second node handling only basic LUN discovery and
reservation, synchronizing with the first node through the interlink;
 - Active/Active with both nodes processing commands and accessing the
backing storage, synchronizing with the first node through the interlink;
 - Active/Active with second node working as proxy, transfering all
commands to the first node for execution through the interlink.

Unlike original Copan's implementation, depending on specific hardware,
this code uses simple custom TCP-based protocol for interlink.  It has
no authentication, so it should never be enabled on public interfaces.

The code may still need some polishing, but generally it is functional.

Relnotes: yes
Sponsored by: iXsystems, Inc.

8 years agoRemove unused target and initiator IDs.
mav [Thu, 10 Sep 2015 10:46:21 +0000 (10:46 +0000)]
Remove unused target and initiator IDs.

8 years agoZero out a local variable also when PURIFY is not defined.
tuexen [Thu, 10 Sep 2015 10:23:23 +0000 (10:23 +0000)]
Zero out a local variable also when PURIFY is not defined.
This silence a warning brought up by valgrind whenever if_nametoindex
is used. This was already discussed in PR 166483, but the code
committed in r234329 guards the initilization with #ifdef PURIFY.
Therefore, valgrind still complains. Since this code is not performance
critical, always zero out the local variable to silence valgrind.

PR: 166483
Discussed with: eadler@
MFC after: 4 weeks

8 years agoDisable CTL_IO_DELAY feature.
mav [Thu, 10 Sep 2015 09:27:22 +0000 (09:27 +0000)]
Disable CTL_IO_DELAY feature.

It is too developer-oriented to be enabled by default.

8 years agoRemove SIOCGDRLST_IN6 and SIOCGPRLST_IN6 forgotten in the previous commit.
hrs [Thu, 10 Sep 2015 08:37:03 +0000 (08:37 +0000)]
Remove SIOCGDRLST_IN6 and SIOCGPRLST_IN6 forgotten in the previous commit.

MFC after: 3 days

8 years agoUpdate USB quirk.
hselasky [Thu, 10 Sep 2015 07:36:54 +0000 (07:36 +0000)]
Update USB quirk.

MFC after: 1 month
PR: 202968

8 years agoUse read to parse a line instead of set.
hrs [Thu, 10 Sep 2015 06:56:56 +0000 (06:56 +0000)]
Use read to parse a line instead of set.

MFC after: 3 days

8 years ago- Add uid check.
hrs [Thu, 10 Sep 2015 06:55:28 +0000 (06:55 +0000)]
- Add uid check.
- Report delay<0 as a warning.

MFC after: 3 days

8 years agoUpdate only static routes when an interface is specified. This fixed
hrs [Thu, 10 Sep 2015 06:47:23 +0000 (06:47 +0000)]
Update only static routes when an interface is specified.  This fixed
a bad side-effect reported in PR 202144.

PR: 202144
MFC after: 3 days

8 years ago- Remove #ifdef HAVE_POLL_H.
hrs [Thu, 10 Sep 2015 06:40:28 +0000 (06:40 +0000)]
- Remove #ifdef HAVE_POLL_H.
- Use nitems().

MFC after: 3 days

8 years ago- Remove SIOCGDRLST_IN6 and SIOCGPRLST_IN6. These are quite old APIs and
hrs [Thu, 10 Sep 2015 06:31:24 +0000 (06:31 +0000)]
- Remove SIOCGDRLST_IN6 and SIOCGPRLST_IN6.  These are quite old APIs and
  there is no consumer now.

MFC after: 3 days

8 years ago- Remove SIOCGDRLST_IN6 and SIOCGPRLST_IN6. These are quite old APIs and
hrs [Thu, 10 Sep 2015 06:29:18 +0000 (06:29 +0000)]
- Remove SIOCGDRLST_IN6 and SIOCGPRLST_IN6.  These are quite old APIs and
  there is no consumer now.

- Simplify first and duplicate LLA check.

MFC after: 3 days

8 years agoDo not add IN6_IFF_TENTATIVE when ND6_IFF_NO_DAD.
hrs [Thu, 10 Sep 2015 06:10:30 +0000 (06:10 +0000)]
Do not add IN6_IFF_TENTATIVE when ND6_IFF_NO_DAD.

MFC after: 3 days

8 years agoRemove IN6_IFF_NOPFX. This flag was no longer used.
hrs [Thu, 10 Sep 2015 06:08:42 +0000 (06:08 +0000)]
Remove IN6_IFF_NOPFX.  This flag was no longer used.

MFC after: 3 days

8 years ago- Remove GIF_{SEND,ACCEPT}_REVETHIP.
hrs [Thu, 10 Sep 2015 05:59:39 +0000 (05:59 +0000)]
- Remove GIF_{SEND,ACCEPT}_REVETHIP.
- Simplify EADDRNOTAVAIL and EAFNOSUPPORT conditions.

MFC after: 3 days