197526 Commits

Author SHA1 Message Date
delphij
6bc23f0b46 MFC r272584: MFV r272501:
Illumos issue:
    5177 remove dead code from dsl_scan.c
2014-10-20 22:09:30 +00:00
delphij
5e5e0768f2 MFC r272511: MFV r272499:
Illumos issue:
    5174 add sdt probe for blocked read in dbuf_read()
2014-10-20 22:04:49 +00:00
delphij
cc4935ee8d MFC r272510: MFV r272498:
Add a new sysctl, vfs.zfs.vol.unmap_enabled, which allows the system
administrator to toggle whether ZFS should ignore UNMAP requests.

Illumos issue:
    5149 zvols need a way to ignore DKIOCFREE
2014-10-20 21:59:11 +00:00
delphij
ac9149e73f MFC r272507: MFV r272496:
Add tunable for number of metaslabs per vdev
(vfs.zfs.vdev.metaslabs_per_vdev).  The default remains
at 200.

Illumos issue:
    5161 add tunable for number of metaslabs per vdev
2014-10-20 21:53:51 +00:00
delphij
c02aa9ff18 MFC r272504: MFV r272494:
Make space_map_truncate() always do space_map_reallocate().  Without
this, setting space_map_max_blksz would cause panic for existing pool,
as dmu_objset_set_blocksize would fail if the object have multiple blocks.

Illumos issues:
   5164 space_map_max_blksz causes panic, does not work
   5165 zdb fails assertion when run on pool with recently-enabled
	spacemap_histogram feature
2014-10-20 18:58:45 +00:00
delphij
e5880e7052 MFC r272884:
accept(2) may and can return EAGAIN, document it.
2014-10-20 18:53:54 +00:00
des
f034b440f1 MFH (r273273): Merge upstream r825: fix line continuation in whitespace 2014-10-20 08:59:30 +00:00
mav
173113fe4e MFC r273072: Add LBPERE mode bit definition. 2014-10-20 08:09:36 +00:00
mav
ad16b79ee7 MFC r273046:
Don't confuse frontend with zero length data moves, just return immediately.
2014-10-20 08:08:43 +00:00
mav
7cb7c8f153 MFC r273038: Add support for READ DEFECT DATA (10/12) commands.
SPC-4 r2 allows to return empty defect list if the list is not supported.
We don't reallu support defect data lists, but this suppresses some errors.
2014-10-20 08:07:29 +00:00
mav
9281ac4831 MFC r273029:
Report physical block size for file-backed LUNs, using vattr.va_blocksize.
2014-10-20 08:06:17 +00:00
mav
d6db3716e1 MFC r273008: Remove stale comments. 2014-10-20 08:04:46 +00:00
mav
d8647fe277 MFC r272978: Improve and document ctladm portlist subcommand.
Make this subcommand less FC-specific, reporting target and port addresses
in more generic way.  Also make it report list of connected initiators in
unified way, working for both FC and iSCSI, and potentially others.
2014-10-20 08:03:23 +00:00
mav
deb98691d8 MFC r272947: Give physical and virtual ports numbers some more meaning. 2014-10-20 07:59:29 +00:00
mav
d9f8df105f MFC r272939: Shorten frontend name. 2014-10-20 07:58:01 +00:00
mav
e2ad56a41d MFC r272938: Filter out duplicate AC_PATH_REGISTERED async events.
Queued async events handling in CAM opened race, that may lead to duplicate
AC_PATH_REGISTERED events delivery during boot.  That was not happening
before r272935 because the driver was initialized later.  After that change
it started create duplicate ports in CTL.
2014-10-20 07:57:07 +00:00
mav
a0796a04ee MFC r272935: Mark CTL frontend's CAM driver as CAM_PERIPH_DRV_EARLY.
Target mode operation does not depend on the initiator mode scan process.
This change allows the target driver to attach earlier and receive some
async events (like AC_CONTRACT) that could be lost otherwise.
2014-10-20 07:52:48 +00:00
mav
b61a1b5706 MFC r272911:
Make ctld start even if some LUNs are unable to open backing storage.

Such LUNs will be visible to initiators, but return "not ready" status
on media access commands.  If backing storage become available later,
`ctladm modify ...` or `service ctld reload` can trigger its reopen.
2014-10-20 07:41:37 +00:00
mav
db78e6d004 MFC r272893:
Store persistent reservation keys as uint64_t instead of uint8_t[8].

This allows to simplify the code and save 512KB of RAM per LUN (8%)
by removing no longer needed "registered" keys flags.
2014-10-20 07:38:36 +00:00
mav
5889805f1c MFC r272812: Make iSCSI connection close somewhat less aggressive.
It allows to push out some final data from the send queue to the socket
before its close.  In particular, it increases chances for logout response
to be delivered to the initiator.
2014-10-20 07:35:46 +00:00
mav
cc6cca3f1e MFC r272748:
Implement software (mode page) and hardware (config) write protection.
2014-10-20 07:34:37 +00:00
mav
29253fce18 MFC r272734:
Add support for WRITE ATOMIC (16) command and report SBC-4 compliance.

Atomic writes are only supported for ZVOLs in "dev" mode.  In other cases
atomicity can not be guarantied and so the command is blocked.
2014-10-20 07:33:41 +00:00
mav
f7c3270824 MFC r272613:
Add support for MaxBurstLength and Expected Data transfer Length parameters.

Before this change target could send R2T request for write transfer of any
size, that could violate iSCSI RFC, which allows initiator to limit maximum
R2T size by negotiating MaxBurstLength connection parameter.

Also report an error in case of write underflow, when initiator provides
less data than initiator expects.  Previously in such case our target
sent R2T request for non-existing data, violating the RFC, and confusing
some initiators.  SCSI specs don't explicitly define how write underflows
should be handled and there are different oppinions, but reporting error
is hopefully better then violating iSCSI RFC with unpredictable results.
2014-10-20 07:32:33 +00:00
mav
5b5dd1452a MFC r272597: Fix length of Extended INQUIRY Data VPD page. 2014-10-20 07:31:23 +00:00
mav
df2c4c17fc MFC r271718 (by bdrewery): Correct a comment 2014-10-20 07:29:43 +00:00
mav
072d9b12ca MFC r271395 (by trasz):
Make sure we handle less than zero timeouts in iSCSI initiator and target
in a reasonable way.

Sponsored by:	The FreeBSD Foundation
2014-10-20 07:28:18 +00:00
yongari
7aaab4b0ed MFC r271073:
Do not blindly announce 1000baseT half-duplex capability in
  autonegotiation.  Some controllers like cgem(4) do not support
  half-duplex at gigabit speeds.
2014-10-20 07:25:57 +00:00
rpaulo
1a4e934f15 MFC r271975:
Improvements to asmc(4):

 1. changed the code so that 2**16 keys are supported
 2. changed the number of possible fans in a system from 2 to 6
 3. added write support for some fan sysctls
 4. added a new sysctl which shows the ID of the fan
 5. added four more apple models with their temperature keys
 6. changed the maxnumber of temperature keys from 36 to 80
 7. replaced several fixed buf sizes to sizeof buf

 Obtained from:	     Denis Ahrens denis at h3q.com
2014-10-20 04:42:28 +00:00
emaste
ae8c60e6aa MFC r273219: Do nothing in vt_upgrade if there is no vt driver
Previously, if no drivers attached at boot we would panic with
  "vtbuf_fill_locked begin.tp_row 0 must be < screen height 0".

PR:		192248
2014-10-20 01:01:55 +00:00
emaste
f22cd31080 MFC r273178: Update vt(4) for UEFI defaults and special keys
vt(4) is the default console for UEFI boot [1], and the bitmapped
  kern.vt.spclkeys sysctl has been replaced with individual kern.vt.kbd_*
  enable sysctls.

PR:		193710
2014-10-20 00:22:08 +00:00
ache
537ec842e6 MFC r272562,r272678,r272679
1) Fix the case we have less arguments for format string than we expected.
2) Return error on unsupported format specs.
(both according to POSIX)
3) For %Z format, understand "UTC" name too.

PR:     93197
2014-10-19 21:16:24 +00:00
hrs
525f95cd64 MFC r273285:
- Honer MK_KERBEROS for Heimdal rc.d scripts.
- Add rc.c/kerberos to OLD_FILES.
2014-10-19 20:54:04 +00:00
antoine
3da91303cf Restore ABI compatibility with 10.0-RELEASE, so that stable/10 users can use
official freebsd packages
2014-10-19 12:11:25 +00:00
tuexen
84b9f624de MFC 273168:
Fix the reported streams in a SCTP_STREAM_RESET_EVENT, if a
sent incoming stream reset request was responded with failed
or denied.
Thanks to Peter Bostroem from Google for reporting the issue.
2014-10-19 11:31:23 +00:00
mav
7f2e56c17d MFC r273143: Remove setting BIO_DONE flag for BIOs that have done() method.
This fixes use-after-free, caused by geom_disk, completing same BIO twice
to save extra allocation, and getting BIO_DONE set after the first.
2014-10-19 08:47:27 +00:00
pfg
f2b9523abe MFC r272958, r273006:
ddb: space/tab fixes and ANSI-fy function declarations.

No functional change.
2014-10-18 19:22:59 +00:00
kib
fafa0f4166 MFC r272952:
Do not set IN_ACCESS flag for read-only mounts.
2014-10-18 15:31:53 +00:00
kib
08803fec5e MFC r272534:
Add IO_RANGELOCKED flag for vn_rdwr(9), which specifies that vnode is
not locked, but range is.
2014-10-18 15:28:01 +00:00
hselasky
09684679cf MFC r273135:
Update the OFED Linux compatibility layer and
Mellanox hardware driver(s):

- Properly name an inclusion guard
- Fix compile warnings regarding unsigned enums
- Add two new sysctl nodes
- Remove all empty linux header files
- Make an error printout more verbose
- Use "mod_delayed_work()" instead of
  cancelling and starting a timeout.
- Implement more Linux scatterlist
  functions.

Sponsored by:	Mellanox Technologies
2014-10-18 07:07:34 +00:00
adrian
31d0e366f3 MFC r273112: Set the DROP_EN bit before the RX queue is brought up and active.
He noticed issues setting this bit in SRRCTL after the queue was up,
so doing it from the sysctl handler isn't enough and may not actually
work correctly.

This commit doesn't remove the sysctl path or try to change its
behaviour.  I'll talk with others about how to finish fixing that
before I tackle that.

PR:           kern/194311
Submitted by: luigi
MFC after:    3 days
Sponsored by: Norse Corp, Inc
2014-10-18 01:02:30 +00:00
jhb
c818e625dc MFC 268369,268817,272771,272772:
Rewrite timeout(9) to be callout(9)-centric instead.  Move the description
of timeout(9) to the end and mark it prominently as deprecated.  Document
somewhat how times are specified for the 'sbt' variants.  Better explain
how using callout_init_*() to associate a lock with a callout resolves
common races.
2014-10-17 20:03:01 +00:00
jhb
8376a78d70 MFC 272668:
Properly set the timeout in a query_state.  The global query_timeout
configuration value is an integer count of seconds, it is not a timeval.
Using memcpy() to copy a timeval from it put garbage into the tv_usec
field.

PR:		194025
2014-10-17 19:55:12 +00:00
jhb
c8f54eb474 MFC 272449:
Require p_cansched() for changing a process' protection status via
procctl() rather than p_cansee().
2014-10-17 19:28:21 +00:00
emaste
9ea4006705 MFC r257302 by rea:
binutils/bfd: fix printf-like format strings for "bfd *" arguments

  There is a special format argument '%B' that directly handles values
  of type 'bfd *', they must be used instead of '%s'.  Manifestations
  of this bug can be seen in ld(1) error messages, for example,
    http://lists.freebsd.org/pipermail/freebsd-current/2013-August/043580.html
    http://lists.freebsd.org/pipermail/freebsd-current/2013-October/045404.html
2014-10-17 16:23:36 +00:00
jhb
b183e8b3c4 MFC 272182:
Don't panic if a resource is allocated twice.  Instead, print a warning and
fail the allocation request.  Allocations of "reserved" resources such as
PCI BARs already fail the request instead of panic'ing in this case.
2014-10-17 15:29:47 +00:00
gjb
14d211224f MFC r273093, r273096:
r273093:
  Merge the following from ^/projects/release-vmimage:
  r272436, r272437, r272792:

  r272436:
    Remove the first argument to panic(), which was initially
    intended to be the exit code, however when a non-zero exit
    code was returned to release/Makefile, this would prevent
    any remaining (and possibly successful) stages from being
    attempted.

  r272437:

    If the vm-base target fails, prevent the vm-image target
    from being run since it cannot possibly succeed.

  r272792:

    Add /usr/local/bin and /usr/local/sbin to PATH, needed
    if third-party software needs to use utilities outside
    of the base system during post-install stages (indexinfo
    is one culprit).

r273096:
  Merge the following from ^/projects/release-vmimage:
  r273076, r273077, r273079, r273095:

  r273076:
    Add a separate make(1) target to release/Makefile to
    build FreeBSD virtual machine disk images for use on
    the Microsoft Azure service.

    For now, this target is not directly connected to the
    build, however can be manually invoked.

    The 'vm-azure' target invokes {amd64,i386}/mk-azure.sh,
    which does the heavy lifting to produce proper VHDs.
    mk-azure.sh uses a configuration file, defaulting to
    tools/azure.conf if otherwise unset.

  r273077:
    Clear VM_RC_LIST.

  r273079:
    Fix signal list to trigger umount(8).

  r273095:
    Output an informational message when mkimg(1) runs, so it
    does not appear that the process has stopped while waiting
    for a 'y/n' response when waagent is deprovisioned.

Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2014-10-16 23:16:26 +00:00
delphij
4b803d9674 MFC r272583: MFV r272500:
Don't inherit flags other than DS_FLAG_CI_DATASET and DS_FLAG_INCONSISTENT
when cloning.  This prevents DS_FLAG_DEFER_DESTROY being inherited from a
clone that is marked for deferred destroy, which causes snapshots of the
clone being destroyed when getting a hold or clone.

Illumos issue:
    5150 zfs clone of a defer_destroy snapshot causes strangeness
2014-10-16 22:44:30 +00:00
delphij
0615551739 MFC r272527:
Don't make nested definition for range_seg_cache.

Reported by:	ian
2014-10-16 22:40:22 +00:00
delphij
6fe321f152 MFC r272506: MFV r272495:
In arc_kmem_reap_now(), reap range_seg_cache too to reclaim memory in
response of memory pressure.

Illumos issue:
    5163 arc should reap range_seg_cache
2014-10-16 22:33:09 +00:00
delphij
9f9b89ac40 MFV r273060:
Use write_psize instead of write_asize when doing vdev_space_update.
Without this change the accounting of L2ARC usage would be wrong and
give 16EB free space because the number became negative and overflows.

Obtained from:  FreeNAS (issue #6239)
2014-10-16 22:12:23 +00:00