Commit Graph

197655 Commits

Author SHA1 Message Date
avg
36fdb56baa MFC r275045: callout(9): add sbt flavors of callout_schedule
Not applicable to earlier releases.
2014-12-08 13:13:17 +00:00
avg
c07a7147df MFC r274628: l2arc: restore correct rounding up of asize of compressed data 2014-12-08 13:06:44 +00:00
trasz
379a1af59c MFC r274277:
ctld(8) doesn't require -lcam or -lssl; remove those from DPADD and LDADD.

Sponsored by:	The FreeBSD Foundation
2014-12-08 11:28:08 +00:00
mav
16ad04df25 MFC r275368:
When passing LUN IDs through treat ASCII values as fixed-length, not
interpreating NULLs as EOLs, but converting them to spaces.

SPC-4 does not tell that T10-based IDs should be NULL-terminated/padded.
And while it tells that it should include only ASCII chars (0x20-0x7F),
there are some USB sticks (SanDisk Ultra Fit), that have NULLs inside
the value.  Treating NULLs as EOLs there made those LUN IDs non-unique.
2014-12-08 09:47:49 +00:00
jilles
26dad09e50 MFC r267265: truncate: Detect integer overflow, fix relative sizes, add tests.
The change to expand_number (r204654) broke detection of too large sizes and
relative sizes ('+'/'-').

Also add some tests.

The usr.bin/truncate/Makefile is slightly different in the MFC because
src.opts.mk does not exist in stable/10.

PR:		190735
Submitted by:	Kirk Russell
2014-12-07 22:30:54 +00:00
brooks
0ba04a3a67 MFC r263928:
Use the correct variable name in the example code.

PR:		195749
2014-12-06 17:50:37 +00:00
mav
72641b76c8 MFC r274843, r274845:
Move icl_pdu_get_data() and xpt_done() out of initiator's session lock.

During heavy reads data copying in icl_pdu_get_data() may consume large
percent of CPU time.  Moving it out of the lock significantly reduces
lock hold time and respectively lock congestion on read operations.
2014-12-06 07:30:08 +00:00
markj
dd6a87838b MFC r271695:
Fix some incorrect endianness checks.
2014-12-05 18:55:31 +00:00
ngie
bb7db53959 MFC r275170:
Convert sbin/mdconfig/tests from prove format tests to ATF format tests

  As a side effect...
  1. The tests now checks for the root user before continuing with kyua, which is
     more visible than the test being skipped with the TAP protocol
  2. The tests work with devices that aren't /dev/md0 by caching the device
     attached during the test to a file, and later use the cached information to
     detach the device in the cleanup routine
  3. The tests no longer require perl to run

  PR: 191191
  Sponsored by: EMC / Isilon Storage Division
2014-12-05 12:51:27 +00:00
ngie
dabf881564 MFC r274365:
Revert WiP to contrib/tzcode accidentally committed with r274364
2014-12-05 12:25:36 +00:00
ngie
32112cfc28 MFC r274364:
Add baud rate support to telnet(1)

  This implements part of RFC-2217

  It's based off a patch originally written by Sujal Patel at Isilon, and
  contributions from other Isilon employees.

  PR: 173728
  Phabric: D995
  Reviewed by: markj, markm
  Sponsored by: EMC / Isilon Storage Division
2014-12-05 12:23:29 +00:00
ngie
2ceba1b134 MFC r272057,r272083,r272084,r272087,r274016:
r272057:

  Import pjdfstest from ^/vendor/pjdfstest/abf03c3a47745d4521b0e4aa141317553ca48f91

  - Remove tools/regression/pjdfstest
  - Add upgrade directions for contrib/pjdfstest
  - Add a note to UPDATING for the move (the reachover Makefiles are coming
    soon)

  Functional differences:
  - ftruncate testcases are added from upstream (github)

  Non-functional differences:
  - The copyright for the project has been updated to 2012
  - pjd's contact information has been updated

  Discussed with: -testing, jmmv, pjd
  Sponsored by: EMC / Isilon Storage Division

r272083:

  Expect ELOOP on Darwin/Linux with "O_NOFOLLOW was specified and the target is a
  symbolic link" case. Assume EMLINK on the rest of the OSes (FreeBSD, Solaris,
  etc)

  Sponsored by: EMC / Isilon Storage Division

r272084:

  Fix the executed testplan count

  Sponsored by: EMC / Isilon Storage Division

r272087:

  Increase the memory disk size in the following testcases to avoid mount
  failures, which would cause cascade failures in the rest of the test
  run:

  link/15.t, open/19.t, mkdir/11.t, mkfifo/11.t, symlink/11.t

  Fail quickly in all of the testcases if mdconfig, mount, umount, etc
  fails to avoid issues similar to this in the future

  Submitted by: Casey Peel <cpeel@isilon.com>
  Sponsored by: EMC / Isilon Storage Division

r274016:

  Integrate pjdfstest test suite execution into kyua

  pjdfstest execution is opt-in and must be done as root due to some of the
  assumptions made by the test suite and lack of error checking in the non-root
  case

  A description of how to execute pjdfstest with kyua is provided in
  share/pjdfstest/README

  Phabric: D824 (an earlier prototype patch)
  Relnotes: yes
  Sponsored by: EMC / Isilon Storage Division
2014-12-05 11:44:18 +00:00
kib
f88754a36c MFC r275206:
Assert the state of the process lock and sigact mutex in
kern_sigprocmask() and reschedule_signals().
2014-12-05 09:30:07 +00:00
ngie
d21006ce12 MFC r271796 (by will):
Use 'cc' for the C compiler instead of 'gcc'.

  Sponsored by:	Spectra Logic
  MFSpectraBSD:	1079507 on 2014/07/24
2014-12-05 08:46:15 +00:00
rpaulo
2add70e7a9 MFC r275420:
gpioctl: don't print the command line arguments.

PR:	  	195330
Submitted by:	Scott Ellis jumpnowtek at gmail.com
2014-12-05 07:51:50 +00:00
mav
f55f3b5eab MFC r272937: Fix r272936 build with old GCC. 2014-12-05 07:48:22 +00:00
mav
2ba95e01e3 MFC r268395:
Pass correct command that should be aborted to ISPCTL_ABORT_CMD.

This makes XPT_ABORT to work for me on initiator side of isp(4).
Previous code was trying to abort the XPT_ABORT itself and failed.
2014-12-05 07:46:28 +00:00
mav
19732a0540 MFC r274248: Remove unused assignments, noticed by Clang analyzer. 2014-12-05 07:29:31 +00:00
mav
c2a2522fc4 MFC r274805:
Make cfiscsi_offline() synchronous, waiting for connections termination
before return.  This should make ctld restart more clean and predictable.
2014-12-05 07:25:02 +00:00
mav
0d78a1c549 MFC r274795:
Close race between cfiscsi_offline() and new connection arrival.

Incoming connection should be either rejected or accepted and terminated.
2014-12-05 07:24:17 +00:00
mav
cc2f0f4af5 MFC r274785: Partially reconstruct Active/Standby clusting.
In this mode one head is in Active state, supporting all commands, while
another is in Standby state, supporting only minimal LUN discovery subset.

It is still incomplete since Standby state requires reservation support,
which is impossible to do right without having interlink between heads.
But it allows to run some basic experiments.
2014-12-05 07:23:25 +00:00
delphij
ebd3bcb845 MFC r274172 (avg)
fix l2arc compression buffers leak

We have observed that arc_release() can be called concurrently with a
l2arc in-flight write.
Also, we have observed that arc_hdr_destroy() can be called from
arc_write_done() for a zio with ZIO_FLAG_IO_REWRITE flag in similar
circumstances.

Previously the l2arc headers would be freed while leaking their
associated compression buffers.  Now the buffers are placed on
l2arc_free_on_write list for delayed freeing.  This is similar to what
was already done to arc buffers that were supposed to be freed
concurrently with in-flight writes of those buffers.

In addition to fixing the discovered leaks this change also adds some
protective code to assert that a compression buffer associated with a
l2arc header is never leaked.

A new kstat l2_cdata_free_on_write is added.  It keeps a count of
delayed compression buffer frees which previously would have been leaks.

Tested by:      Vitalij Satanivskij <satan@ukr.net> et al
Requested by:   many
Sponsored by:   HybridCluster / ClusterHQ

This is a 10.1-RELEASE errata candidate.
2014-12-05 00:32:33 +00:00
delphij
7fa7d519b4 MFC r274370:
Rename variable name from 'index' to 'idx' to avoid shadowing index(3).

Noticed by:	dim
2014-12-04 23:27:29 +00:00
delphij
d663d42637 MFC r274674:
Add a tunable for spa_slop_shift which controls how much space we
would reserve by default.  Tuning is not recommended.

Relnotes:	yes
2014-12-04 23:26:15 +00:00
delphij
f96a33a8ab MFC r274636:
Sync with userland variant.
2014-12-04 23:21:42 +00:00
delphij
a26baf65aa MFC r274276: MFV r274271:
Improve zdb -b performance:

 - Reduce gethrtime() call to 1/100th of blkptr's;
 - Skip manipulating the size-ordered tree;
 - Issue more (10, previously 3) async reads;
 - Use lighter weight testing in traverse_visitbp();

Illumos issue:
    5243 zdb -b could be much faster
2014-12-04 23:20:44 +00:00
delphij
36b0a2ac49 MFC r274458,274523:
Derive copyright year from src/COPYRIGHT.
2014-12-04 23:19:04 +00:00
delphij
0c96bfd67d MFC r274303:
Apply upstream 13597:3eac1e8e0f4c (git: illumos-gate@aa846ad9):

Initialize tqent_flags in the userland taskq implementation.  Without
this the assertion of tq->tq_freelist != NULL may fail in taskq_destroy.

The problem is that tqent_flags is never initialized in the userland
implementation while the kernel one does initialize it.  Without proper
initialization, the flag may have its lowest bit set, making it treated
as TQENT_FLAG_PREALLOC and never removing taskq_ent_t from tq_freelist.
2014-12-04 23:17:35 +00:00
delphij
0b08d45457 MFC r272044:
Constify a parameter of name2oid.  No functional change.
2014-12-04 23:15:44 +00:00
dim
c882aa6bee MFC r275366:
Pull in r209785 from upstream libc++ trunk (by Marshall Clow):

  Fix a problem exposed by r208825, which caused bind (and other bits of
  libc++) to stop working. And tests

This fix is needed to support clang 3.5.0 and higher, which are more
strict about forming pointer-to-function types with cv-qualifiers or
ref-qualifiers.  See also the upstream PR <http://llvm.org/PR19742> and
<http://llvm.org/viewvc/llvm-project?rev=208825&view=rev>

Reported by:	amdmi3
2014-12-04 01:21:56 +00:00
dim
856a793432 MFC r274922:
Fix the following -Werror warning from clang 3.5.0, while building the
ath kernel module:

sys/dev/ath/ath_hal/ar5212/ar5212_reset.c:2642:7: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                if (abs(lp[0] * EEP_SCALE - target) < EEP_DELTA) {
                    ^
sys/dev/ath/ah_osdep.h:74:18: note: expanded from macro 'abs'
#define abs(_a)         __builtin_abs(_a)
                        ^
sys/dev/ath/ath_hal/ar5212/ar5212_reset.c:2642:7: note: remove the call to '__builtin_abs' since unsigned values cannot be negative
sys/dev/ath/ah_osdep.h:74:18: note: expanded from macro 'abs'
#define abs(_a)         __builtin_abs(_a)
                        ^
1 error generated.

This warning occurs because both lp[0] and target are unsigned, so the
subtraction expression is also unsigned, and calling abs() is a no-op.

However, the intention was to look at the absolute difference between
the two unsigned quantities.  Introduce a small static function to
clarify what we're doing, and call that instead.

Reviewed by:	adrian
Differential Revision: https://reviews.freebsd.org/D1212
2014-12-04 01:10:50 +00:00
markj
b431d8bfcf MFC r273488:
Fix some bugs in the error handling of getdevice().

PR:	194506
2014-12-03 19:44:22 +00:00
kib
ec597a3d4e MFC r275120:
Fix SA_SIGINFO | SA_RESETHAND handling, reset disposition after sv_sendsig()
is called.
2014-12-03 10:42:10 +00:00
hselasky
a0061de774 MFC r275110:
Add new USB quirk.

PR:		195372
2014-12-03 09:14:14 +00:00
hselasky
405a965719 MFC r275328 and r275330:
Add missing libraries when linking and fix building of some infiniband
utilities by updating some header file locations and compiler include
directives.

Sponsored by:	Mellanox Technologies
2014-12-03 09:08:04 +00:00
trasz
ea68673881 MFC r274703:
Fix typo.

Sponsored by:	The FreeBSD Foundation
2014-12-03 08:22:13 +00:00
mav
2c60f5a12d MFC r275124: Fix WWNN/WWPN generation for virtual channels. 2014-12-03 07:05:17 +00:00
mav
1986eab03e MFC r275123: Fix incorrect check, blocking MULTIID functionality. 2014-12-03 07:04:28 +00:00
mav
a486cdc239 MFC r275101:
Add bunch of PCI IDs of Intel Wildcat Point (9 Series) chipsets.
2014-12-03 06:53:49 +00:00
brooks
68673ca7df MFC r274821:
Merge from CheriBSD:

commit d0c7d235c09fc65dbdb278e7016a96f79c6a49cc
  Make the Altera JTAG UART device driver slightly more forgiving of
  the foibles of a sub-par hrdware interface by increasing the timeout
  for spotting JTAG polling from one to two seconds.

commit 19ed45a18832560dab967c179d83b71081c3a220
  Update comment.

commit 8edfe803f033cc8e33229f99894c2b7496a44d5f
  Add a comment about a device-driver race condition that could cause the BERI
  pipeline to wedge awaiting JTAG in the event that both the low-level console
  and the tty layer decide to write to the JTAG FIFO just before JTAG is
  disconnected.  Resolving this race is a bit tricky as it looks like there
  isn't a way to 'give the character back' to the tty layer when we discover
  the race.  The easy fix is to drop the character, which we don't yet do, but
  perhaps should as that is a better outcome than wedging the pipeline.

commit 2ea26cf579c9defcf31e413e7c9b0fbc159237fc
  Add a comment about an inherent race with hardware in the Altera JTAG
  UART's low-level console code.

Submitted by:	rwatson
Sponsored by:	DARPA, AFRL
2014-12-02 22:04:27 +00:00
brooks
768a6267bd MFC r274820:
Merge from CheriBSD (2e28d2a3090239b30481f35dc452ad95a5c57389):

Remove initalized, but unused devname variable

Sponsored by:	DARPA, AFRL
2014-12-02 21:23:13 +00:00
brooks
f27f3e0e8e MFC r274818:
Merge from CheriBSD (3422ebe71b6c06fe78b1be73623b240c219e08e3):

Rename beripic to beripic0.

Sponsored by:	DARPA, AFRL
2014-12-02 20:28:05 +00:00
brooks
67bd86774a MFC r274806:
Add a guard against attempting to invoke the buildenv target with -j# as
that silently exits rather than doing something useful.

Sponsored by:	DARPA, AFRL
2014-12-02 19:58:26 +00:00
tijl
f3fce3afbd MFC r269634:
drm: fix usage of vm_phys_fictitious_to_vm_page

vm_phys_fictitious_to_vm_page should not be called directly, even when
operating on a range that has been registered using
vm_phys_fictitious_reg_range. PHYS_TO_VM_PAGE should be used instead
because on arches that use VM_PHYSSEG_DENSE the page might come
directly from vm_page_array.

Reported by:	nwhitehorn
Tested by:	nwhitehorn, David Mackay <davidm.jx8p@gmail.com>
Sponsored by:	Citrix Systems R&D
2014-12-02 14:21:06 +00:00
tijl
5bc138563e MFC r273969:
Use default memory type for TTM buffer objects that may be cached.
2014-12-02 14:12:05 +00:00
tijl
e95768983f MFC r273862,273902:
Port the TTM AGP backend to the FreeBSD agp driver and enable AGP support
in the radeonkms driver.

Note: In PCI mode virtual addresses on the graphics card that map to system
RAM are translated to physical addresses by the graphics card itself.   In
AGP mode address translation is done by the AGP chipset so fictitious
addresses appear on the system bus.  For the CPU cache management to work
correctly when the CPU accesses this memory it needs to use the same
fictitious addresses (and let the chipset translate them) instead of using
the physical addresses directly.

Reviewed by:	kib
2014-12-02 14:09:54 +00:00
tijl
3add3ea367 MFC r273856,273863,273963-273965
- Add two new functions to the AGP driver KPI to bind/unbind arbitrary sets
  of pages into the GTT.
- Avoid possible overflow in agp_generic_alloc_memory.
- In agp(4) avoid the need to flush all cpu caches with wbinvd between
  updating the GTT and flushing the AGP TLB by storing the GTT in
  write-combining memory.
- In agp_amd_bind_page don't flush the AGP TLB.  It's done by the calling
  function.
- agp_generic_unbind_memory: flush AGP TLB before unwiring pages
  agp_bind_pages: assert that pages have been wired down
2014-12-02 13:46:13 +00:00
jch
0e426a7bb8 MFC r264321, r264342, r264351, r264356, r273850, r274629:
Currently, the TCP slow timer can starve TCP input processing while it
walks the list of connections in TIME_WAIT closing expired connections
due to contention on the global TCP pcbinfo lock.

To remediate, introduce a new global lock to protect the list of
connections in TIME_WAIT.  Only acquire the TCP pcbinfo lock when
closing an expired connection.  This limits the window of time when
TCP input processing is stopped to the amount of time needed to close
a single connection.

Approved by:    jhb (mentor)
2014-12-02 11:47:26 +00:00
hselasky
f66f59b794 MFC r274918:
Don't use the synchronization endpoint unless referenced by the
isochronous endpoint descriptor used for the data transfers, hence the
synchronization feature might not be supposed to be supported [yet].
This makes seamless playback synced with the USB HOST clock work with
the DN32-USB module for Midas audio systems and possibly other similar
products from Klark Teknik.
2014-12-01 07:34:25 +00:00
kevlo
aaab2e97e4 MFC r275003:
Add missing headers needed by write().
2014-12-01 03:04:15 +00:00