]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
9 years agoMerge r268295 from head:
gavin [Wed, 16 Jul 2014 12:41:50 +0000 (12:41 +0000)]
Merge r268295 from head:
  Fix equation and limerick to be correct.  NetBSD fixed this 14 years ago
  (src/games/fortune/datfiles/fortunes2 1.7).

PR: 188714
Submitted by: ksmakoto dd.iij4u.or.jp

git-svn-id: svn://svn.freebsd.org/base/stable/10@268755 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMerge r268292 from head:
gavin [Wed, 16 Jul 2014 12:37:36 +0000 (12:37 +0000)]
Merge r268292 from head:
  Dominion Day became Canada Day in 1982, update the holiday calendar.

PR: 191533
Submitted by: db

git-svn-id: svn://svn.freebsd.org/base/stable/10@268752 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268471:
kib [Wed, 16 Jul 2014 08:55:53 +0000 (08:55 +0000)]
MFC r268471:
For safety, ensure that any consumer of the set_regs() and
ptrace_set_pc() use the correct return to userspace using iret.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268742 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268467:
kib [Wed, 16 Jul 2014 08:52:44 +0000 (08:52 +0000)]
MFC r268467:
Implement sysconf(_SC_GETGR_R_SIZE_MAX) and sysconf(_SC_GETPW_R_SIZE_MAX).

git-svn-id: svn://svn.freebsd.org/base/stable/10@268741 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268583:
hselasky [Wed, 16 Jul 2014 06:22:35 +0000 (06:22 +0000)]
MFC r268583:
Turn off blinking device leds at attach.

PR: 183735

git-svn-id: svn://svn.freebsd.org/base/stable/10@268738 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268582:
hselasky [Wed, 16 Jul 2014 06:20:18 +0000 (06:20 +0000)]
MFC r268582:
Fix performance problems with AXGE network adapter in RX direction:
- Remove 4 extra bytes from the ethernet payload.
- The maximum RX buffer was incorrectly set. Increase it to 64K for
now, until the exact limit is understood.
- Enable hardware checksumming again.
- Make hardware data structure packed.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268737 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268097:
pfg [Wed, 16 Jul 2014 02:02:46 +0000 (02:02 +0000)]
MFC r268097:

MFV r260708
4427 pid provider rejects probes with valid UTF-8 names

This make use of Solaris' u8_validate() which we happen to
use since r185029 for ZFS.
Use of u8_textprep.c required -Wno-cast-qual for powerpc.

Illumos Revision: 1444d846b126463eb1059a572ff114d51f7562e5

Reference:
https://www.illumos.org/issues/4427

Obtained from: Illumos

git-svn-id: svn://svn.freebsd.org/base/stable/10@268734 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268381
wblock [Wed, 16 Jul 2014 00:41:47 +0000 (00:41 +0000)]
MFC r268381

Make synopsis version of -3 flag match other uses in the page.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268732 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268187:
wblock [Wed, 16 Jul 2014 00:36:55 +0000 (00:36 +0000)]
MFC r268187:

Improve markup, change references to nonexistent vt_vga(4), remove some
language redundancy, and move the examples so sections are in the
standard order.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268730 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267617:
wblock [Tue, 15 Jul 2014 23:20:25 +0000 (23:20 +0000)]
MFC r267617:

Fix spelling, typos, missing articles, contractions.  Expanded version
of patch supplied with PR.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268724 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267618:
wblock [Tue, 15 Jul 2014 22:44:10 +0000 (22:44 +0000)]
MFC r267618:

Fix syntax error.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268721 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoDocument CTL and iSCSI ABI breakages.
mav [Tue, 15 Jul 2014 18:41:30 +0000 (18:41 +0000)]
Document CTL and iSCSI ABI breakages.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268708 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoFix build on stable/10.
mav [Tue, 15 Jul 2014 18:27:18 +0000 (18:27 +0000)]
Fix build on stable/10.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268707 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268388:
mav [Tue, 15 Jul 2014 18:23:14 +0000 (18:23 +0000)]
MFC r268388:
Add XPT_ABORT support to iSCSI initiator.

While CAM does not use it normally, it is useful for targets testing.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268705 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268370:
mav [Tue, 15 Jul 2014 18:22:17 +0000 (18:22 +0000)]
MFC r268370:
Make XPT_GET_TRAN_SETTINGS to report CAM that command queueing is enabled,
but make couple changes to handle non-queued commands too, if happen.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268704 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268326:
mav [Tue, 15 Jul 2014 18:21:26 +0000 (18:21 +0000)]
MFC r268326:
Make iSCSI initiator keep Initiator Session ID (ISID) across reconnects.

Previously ISID was changed every time, that made impossible correct
persistent reservation, because reconnected session was identified as
completely new one.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268703 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268240 (by ken):
mav [Tue, 15 Jul 2014 17:26:43 +0000 (17:26 +0000)]
MFC r268240 (by ken):
Add persistent reservation support to camcontrol(8).

camcontrol(8) now supports a new 'persist' subcommand that allows users to
issue SCSI PERSISTENT RESERVE IN / OUT commands.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268700 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268447:
mav [Tue, 15 Jul 2014 17:20:40 +0000 (17:20 +0000)]
MFC r268447:
Add LUN options to specify 64-bit EUI and NAA identifiers.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268699 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268421:
mav [Tue, 15 Jul 2014 17:19:43 +0000 (17:19 +0000)]
MFC r268421:
Remove status setting from datamove() path.  Leave that to other places.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268698 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268418:
mav [Tue, 15 Jul 2014 17:18:50 +0000 (17:18 +0000)]
MFC r268418:
Enable TAS feature: notify initiator if its command was aborted by other.

That should make operation more kind to multi-initiator environment.
Without this, other initiators may find out that something bad happened
to their commands only via command timeout.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268697 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268387:
mav [Tue, 15 Jul 2014 17:17:52 +0000 (17:17 +0000)]
MFC r268387:
Fix task management functions status: task not found is not an error,
while not implemented function is.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268696 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268364:
mav [Tue, 15 Jul 2014 17:16:58 +0000 (17:16 +0000)]
MFC r268364:
Fix "use after free" on port creation error in r268291.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268695 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268363:
mav [Tue, 15 Jul 2014 17:16:06 +0000 (17:16 +0000)]
MFC r268363:
Add support for READ FULL STATUS action of PERSISTENT RESERVE IN command.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268694 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268362:
mav [Tue, 15 Jul 2014 17:14:53 +0000 (17:14 +0000)]
MFC r268362:
Teach ctl_add_initiator() to dynamically allocate IIDs from pool.

If port passed negative IID value, the function will try to allocate IID
from the pool of unused, based on passed wwpn or name arguments.  It does
all its best to make IID unique and persistent across reconnects.

This makes persistent reservation properly work for iSCSI.  Previously,
in case of reconnects, reservation could be unexpectedly lost, or even
migrate between intiators.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268692 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268356, r268357:
mav [Tue, 15 Jul 2014 17:13:49 +0000 (17:13 +0000)]
MFC r268356, r268357:
When new connection comes in, check whether we already have session from
the same intiator (Name+ISID).  If so -- terminate the old session and let
the new one take its place, as required by iSCSI RFC.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268691 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268353:
mav [Tue, 15 Jul 2014 17:12:37 +0000 (17:12 +0000)]
MFC r268353:
Implement ABORT TASK SET and I_T NEXUS RESET task management functions.

Use the last one to terminate active commands on iSCSI session termination.
Previous code was aborting only commands doing some data moves.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268690 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268330:
mav [Tue, 15 Jul 2014 17:11:42 +0000 (17:11 +0000)]
MFC r268330:
Make gcc happy, init idlen2.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268689 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268328:
mav [Tue, 15 Jul 2014 17:10:48 +0000 (17:10 +0000)]
MFC r268328:
Close race in r268291 between port destruction, delayed by sessions
teardown, and new port creation during `service ctld restart`.

Close it by returning iSCSI port internal state, that allows to identify
dying ports, which should not be counted as existing, from really alive.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268688 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268309:
mav [Tue, 15 Jul 2014 17:09:52 +0000 (17:09 +0000)]
MFC r268309:
Add support for SCSI Ports (88h) VPD page.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268687 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268308:
mav [Tue, 15 Jul 2014 17:09:02 +0000 (17:09 +0000)]
MFC r268308:
Make REPORT TARGET PORT GROUPS command report realistic data instead of
hardcoded garbage.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268686 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268307:
mav [Tue, 15 Jul 2014 17:08:04 +0000 (17:08 +0000)]
MFC r268307:
Move lun_map() method from command nexus to port.

Previous implementation made impossible to do some things, such as calling
it for ports other then one through which command arrived.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268685 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268302:
mav [Tue, 15 Jul 2014 17:07:07 +0000 (17:07 +0000)]
MFC r268302:
Pass through iSCSI session ISID from LOGIN request to the CTL frontend.

ISID is an important part of initiator transport ID for iSCSI.  It is not
used now, but should be to properly implement persistent reservation.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268684 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268293:
mav [Tue, 15 Jul 2014 17:06:10 +0000 (17:06 +0000)]
MFC r268293:
Burry devid port method, which was a gross hack.

Instead make ports provide wanted port and target IDs, and LUNs provide
wanted LUN IDs.  After that core Device ID VPD code only had to link all
of them together and add relative port and port group numbers.

LUN ID for iSCSI LUNs no longer created by CTL, but by ctld, and passed
to CTL as "scsiname" LUN option.  This makes LUNs to report the same set
of IDs, independently from the port through which it is accessed, as
required by SCSI specifications.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268683 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268291:
mav [Tue, 15 Jul 2014 17:05:11 +0000 (17:05 +0000)]
MFC r268291:
Create separate CTL port for every iSCSI target (and maybe portal group).

Having single port for all iSCSI connections makes problematic implementing
some more advanced SCSI functionality in CTL, that require proper ports
enumeration and identification.

This change extends CTL iSCSI API, making ctld daemon to control list of
iSCSI ports in CTL.  When new target is defined in config fine, ctld will
create respective port in CTL.  When target is removed -- port will be
also removed after all active commands through that port properly aborted.
This change require ctld to be rebuilt to match the kernel.

As a minor side effect, this allows to have iSCSI targets without LUNs.
While that may look odd and not very useful, that is not incorrect.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268682 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268288:
mav [Tue, 15 Jul 2014 17:01:39 +0000 (17:01 +0000)]
MFC r268288:
Improve CTL_BEARG_* flags support, including optional values copyout.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268681 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268287:
mav [Tue, 15 Jul 2014 17:00:41 +0000 (17:00 +0000)]
MFC r268287:
Implement and use ctl_frontend_find().

git-svn-id: svn://svn.freebsd.org/base/stable/10@268680 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268284:
mav [Tue, 15 Jul 2014 16:59:46 +0000 (16:59 +0000)]
MFC r268284:
Introduce new IOCTL CTL_PORT_LIST reporting in more flexible XML format.

Leave old CTL_GET_PORT_LIST in place so far.  Garbage-collect it later.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268679 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268280:
mav [Tue, 15 Jul 2014 16:58:38 +0000 (16:58 +0000)]
MFC r268280:
Make options KPI more generic to allow it to be used for ports too,
not only for LUNs.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268678 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268266, r268275:
mav [Tue, 15 Jul 2014 16:57:30 +0000 (16:57 +0000)]
MFC r268266, r268275:
Separate concepts of frontend and port.

Before iSCSI implementation CTL had no knowledge about frontend drivers,
it had only frontends, which really were ports (alike to LUNs, if comparing
to backends).  But iSCSI added there ioctl() method, which does not belong
to frontend as a port, but belongs to a frontend driver.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268677 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268265:
mav [Tue, 15 Jul 2014 16:55:13 +0000 (16:55 +0000)]
MFC r268265:
Remove targ_enable()/targ_disable() frontend methods.

Those methods were never implemented, and I believe that their concept is
wrong, since single frontend (SCSI port) can not handle several targets.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268676 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268103:
mav [Tue, 15 Jul 2014 16:54:04 +0000 (16:54 +0000)]
MFC r268103:
Add support for REPORT TIMESTAMP command.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268675 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268096, r268306, r268361:
mav [Tue, 15 Jul 2014 16:53:04 +0000 (16:53 +0000)]
MFC r268096, r268306, r268361:
Add more formal and strict command parsing and validation.

For every supported command define CDB length and mask of bits that are
allowed to be set.  This allows to remove bunch of checks through the code
and still make the validation more strict.  To properly do it for commands
supporting multiple service actions, formalize their parsing by adding
subtables for each of such commands.

As visible effect, this change allows to add support for REPORT SUPPORTED
OPERATION CODES command, reporting to client all the data about supported
SCSI commands, except timeouts.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268674 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267639:
mav [Tue, 15 Jul 2014 16:49:35 +0000 (16:49 +0000)]
MFC r267639:
Increase CTL_DEVID_LEN from 16 to 64 bytes.

SPC-4 recommends T10 vendor ID based LUN ID was created by concatenating
product name and serial number (and istgt follows that).  But product name
is 16 bytes long by itself, so 16 bytes total length is clearly not enough
to fit both.

To keep compatibility with existing configurations, pad short device IDs
to old length of 16, same as before.

This change probably breaks CTL user-level ABI, so control tools should
be rebuilt after this change.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268673 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268385:
kib [Tue, 15 Jul 2014 10:05:52 +0000 (10:05 +0000)]
MFC r268385:
Make this compilable on latest Linux'es without warnings.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268663 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268383:
kib [Tue, 15 Jul 2014 10:01:33 +0000 (10:01 +0000)]
MFC r268383:
Correct si_code for the SIGBUS signal generated by the alignment trap.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268661 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268128: MFV r268122:
delphij [Tue, 15 Jul 2014 05:45:50 +0000 (05:45 +0000)]
MFC r268128: MFV r268122:

4929 want prevsnap property

git-svn-id: svn://svn.freebsd.org/base/stable/10@268659 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268126: MFV r268121:
delphij [Tue, 15 Jul 2014 05:42:09 +0000 (05:42 +0000)]
MFC r268126: MFV r268121:

4924 LZ4 Compression for metadata

git-svn-id: svn://svn.freebsd.org/base/stable/10@268658 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268123: MFV r268119:
delphij [Tue, 15 Jul 2014 05:39:22 +0000 (05:39 +0000)]
MFC r268123: MFV r268119:

4914 zfs on-disk bookmark structure should be named *_phys_t

git-svn-id: svn://svn.freebsd.org/base/stable/10@268657 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268086: MFV r267570:
delphij [Tue, 15 Jul 2014 05:36:26 +0000 (05:36 +0000)]
MFC r268086: MFV r267570:

4756 metaslab_group_preload() could deadlock

git-svn-id: svn://svn.freebsd.org/base/stable/10@268656 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268085: MFV r267569:
delphij [Tue, 15 Jul 2014 05:32:53 +0000 (05:32 +0000)]
MFC r268085: MFV r267569:

4897 Space accounting mismatch in L2ARC/zpool

git-svn-id: svn://svn.freebsd.org/base/stable/10@268654 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268084: MFV r267568:
delphij [Tue, 15 Jul 2014 05:28:58 +0000 (05:28 +0000)]
MFC r268084: MFV r267568:

4891 want zdb option to dump all metadata

git-svn-id: svn://svn.freebsd.org/base/stable/10@268653 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268082: MFV r267567:
delphij [Tue, 15 Jul 2014 05:12:16 +0000 (05:12 +0000)]
MFC r268082: MFV r267567:

4881 zfs send performance degradation when embedded block pointers are
     encountered

git-svn-id: svn://svn.freebsd.org/base/stable/10@268651 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268079: MFV r267566:
delphij [Tue, 15 Jul 2014 05:00:46 +0000 (05:00 +0000)]
MFC r268079: MFV r267566:

4390 i/o errors when deleting filesystem/zvol can lead to space map
     corruption

git-svn-id: svn://svn.freebsd.org/base/stable/10@268650 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268075: MFV r267565:
delphij [Tue, 15 Jul 2014 04:53:34 +0000 (04:53 +0000)]
MFC r268075: MFV r267565:

4757 ZFS embedded-data block pointers ("zero block compression")
4913 zfs release should not be subject to space checks

git-svn-id: svn://svn.freebsd.org/base/stable/10@268649 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r260142: MFV r258972:
delphij [Tue, 15 Jul 2014 04:44:06 +0000 (04:44 +0000)]
MFC r260142: MFV r258972:

4373 add block contents print to zstreamdump

git-svn-id: svn://svn.freebsd.org/base/stable/10@268648 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r266771: MFV r266766:
delphij [Tue, 15 Jul 2014 04:39:55 +0000 (04:39 +0000)]
MFC r266771: MFV r266766:

Add a new zfs property, "redundant_metadata" which can have values "all" or
"most".  The default will be "all", which is the current behavior.  When set
to all, ZFS stores an extra copy of all metadata.  If a single on-disk block
is corrupt, at worst a single block of user data (which is recordsize bytes
long) can be lost.

Setting to "most" will cause us to only store 1 copy of level-1 indirect
blocks of user data files.  This can improve performance of random writes,
because less metadata has to be written.  In practice,  at worst about
100 blocks (of recordsize bytes each) of user data can be lost if a single
on-disk block is corrupt.

The exact behavior of which metadata blocks are stored redundantly may change
in future releases.

Illumos issue: 3835 zfs need not store 2 copies of all metadata

git-svn-id: svn://svn.freebsd.org/base/stable/10@268647 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267572: MFV r249332 (illumos-gate 14005:55fc53126003)
delphij [Tue, 15 Jul 2014 04:33:11 +0000 (04:33 +0000)]
MFC r267572: MFV r249332 (illumos-gate 14005:55fc53126003)

Illumos ZFS issues:
  3654 zdb should print number of ganged blocks

git-svn-id: svn://svn.freebsd.org/base/stable/10@268645 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoRevert r268629:
pfg [Mon, 14 Jul 2014 20:13:24 +0000 (20:13 +0000)]
Revert r268629:

This was supposed to go to head first :(

git-svn-id: svn://svn.freebsd.org/base/stable/10@268630 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agofsck_msdosfs: be a bit more permissive
pfg [Mon, 14 Jul 2014 20:07:23 +0000 (20:07 +0000)]
fsck_msdosfs: be a bit more permissive

The free space value in the FSInfo block is merely unitialized when it is
0xffffffff. This fixes a bug found in NetBSD.

It must be noted that we never supported all the checks that NetBSD does
as some of them would cause failures with a freshly created FAT32
from MS-Windows.

While here, bring some space fixes.

Obtained from: NetBSD (rev. 1.22)

git-svn-id: svn://svn.freebsd.org/base/stable/10@268629 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268538:
pfg [Mon, 14 Jul 2014 15:54:50 +0000 (15:54 +0000)]
MFC r268538:

Avoid hardcoding "gcc" in the DTrace tests.

At least one test doesn't work yet without gcc, however gcc is
not always available in base. Using the environment compiler
is more trustable and will also work with an external compiler.

Reviewed by: markj

git-svn-id: svn://svn.freebsd.org/base/stable/10@268622 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268354:
hselasky [Mon, 14 Jul 2014 07:30:04 +0000 (07:30 +0000)]
MFC r268354:
Improve support for Intel Lynx Point USB 3.0 controllers by masking
the port routing bits like done in Linux.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268604 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268290:
pfg [Sun, 13 Jul 2014 17:50:50 +0000 (17:50 +0000)]
MFC r268290:
Merge from OpenSolaris (24-Jul-2010):

6679140 asymmetric alloc/dealloc activity can induce dynamic variable drops
6679193 dtrace_dynvar walker produces flood of dtrace_dynhash_sink

This finishes a set of merges from the older OpenSolaris releases.
Still the FreeBSD port has many differences that are difficult to
account for but that seems normal given that the kernels are different.

Obtained from: OpenSolaris (through Illumos)

git-svn-id: svn://svn.freebsd.org/base/stable/10@268595 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC 267963:
jhb [Sun, 13 Jul 2014 17:49:27 +0000 (17:49 +0000)]
MFC 267963:
The latest versoin of file/libmagic identifes a filesystem image
is identified as "DOS/MBR boot sector" as opposed to "x86 boot sector".

This trips up vmrun.sh when using the new file(1) and makes it want to boot
into the installer instead.

Fix this by just looking for "boot sector" instead.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268594 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268487:
kevlo [Sun, 13 Jul 2014 15:13:25 +0000 (15:13 +0000)]
MFC r268487:

Enable 8051 before downloading firmware.

Tested by: Carlos Jacobo Puga Medina <cpm at fbsd dot es

git-svn-id: svn://svn.freebsd.org/base/stable/10@268586 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: r268008
rmacklem [Sun, 13 Jul 2014 00:19:39 +0000 (00:19 +0000)]
MFC: r268008
There might be a potential race condition for the NFSv4 client
when a newly created file has another open done on it that
update the open mode. This patch moves the code that updates
the open mode up into the block where the mutex is held to
ensure this cannot happen. No bug caused by this potential
race has been observed, but this fix is a safety belt to ensure
it cannot happen.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268580 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC 267929, 267937, 267939, 267940, 267941, 267942, 267987, 268006:
rpaulo [Sat, 12 Jul 2014 22:56:41 +0000 (22:56 +0000)]
MFC 267929, 267937, 267939, 267940, 267941, 267942, 267987, 268006:

 2915 DTrace in a zone should see "cpu", "curpsinfo", et al
 2916 DTrace in a zone should be able to access fds[]
 2917 DTrace in a zone should have limited provider access
 4477 DTrace should speak JSON
 Add stubs for CTF functions which are not yet implemented.
 4474 DTrace Userland CTF Support
 4475 DTrace userland Keyword
 4476 DTrace tests should be better citizens
 4479 pid provider types
 4480 dof emulation is missing checks
 4471 DTrace count() with histogram
 4472 DTrace full width distribution histograms
 4473 DTrace frequency trails

git-svn-id: svn://svn.freebsd.org/base/stable/10@268578 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268130, r268224, r268230, r268231:
pfg [Sat, 12 Jul 2014 18:23:35 +0000 (18:23 +0000)]
MFC r268130, r268224, r268230, r268231:

Various DTrace Merges from OpenSolaris/Illumos:

15-Sep-2008:
6735480 race between probe enabling and provider registration

20-Apr-2008:
6822482 DOF validation needs to handle loadable sections flagged as unloadable

22-Apr-2009:
6823388 DTrace ioctl handlers must validate all structure members

30-Jun-2009:
6851093 system drops to kmdb with anonymous dtrace probes + kmdb

Obtained from: OpenSolaris

git-svn-id: svn://svn.freebsd.org/base/stable/10@268572 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268272:
pfg [Sat, 12 Jul 2014 17:39:13 +0000 (17:39 +0000)]
MFC r268272:

minor perf enhancement for UTF-8

Reduce some duplicate code.

Reference:
https://www.illumos.org/issues/628

Obtained from: Illumos

git-svn-id: svn://svn.freebsd.org/base/stable/10@268571 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268286: Fix compile-time errors when NO_WERROR and WITHOUT_INET6_SUPPORT
cy [Sat, 12 Jul 2014 05:59:19 +0000 (05:59 +0000)]
MFC r268286: Fix compile-time errors when NO_WERROR and WITHOUT_INET6_SUPPORT
(NO_INET6) are specified.

Approved by: glebius (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@268563 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267643, r267873, r268391, r268398:
mav [Sat, 12 Jul 2014 04:34:39 +0000 (04:34 +0000)]
MFC r267643, r267873, r268391, r268398:
Introduce fine-grained CTL locking to improve SMP scalability.

Split global ctl_lock, historically protecting most of CTL context:
 - remaining ctl_lock now protects lists of fronends and backends;
 - per-LUN lun_lock(s) protect LUN-specific information;
 - per-thread queue_lock(s) protect request queues.
This allows to radically reduce congestion on ctl_lock.

Create multiple worker threads, depending on number of CPUs, and assign
each LUN to one of them.  This allows to spread load between multiple CPUs,
still avoiging congestion on queues and LUNs locks.

On 40-core server, exporting 5 LUNs, each backed by gstripe of SATA SSDs,
accessed via 6 iSCSI connections, this change improves peak request rate
from 250K to 680K IOPS.

Sponsored by: iXsystems, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268556 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268283:
mav [Sat, 12 Jul 2014 02:40:25 +0000 (02:40 +0000)]
MFC r268283:
Improve readability of XML generated by CTL_LUN_LIST.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268555 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268392:
mav [Sat, 12 Jul 2014 02:33:03 +0000 (02:33 +0000)]
MFC r268392:
Do not return statuses for aborted iSCSI commands.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268554 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268204:
mav [Sat, 12 Jul 2014 02:29:33 +0000 (02:29 +0000)]
MFC r268204:
Use separate memory type M_CTLIO for I/Os.

CTL allocate large amount of RAM.  This change give some more stats.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268553 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267933:
mav [Sat, 12 Jul 2014 02:28:11 +0000 (02:28 +0000)]
MFC r267933:
Simplify statistics calculation.

Instead of trying to guess size of disk I/O operations (it just won't work
that way for newly added commands, and is equal to data move size for old
ones), account data move traffic.  If disk I/Os are that interesting, then
backends have to account and provide that information.

Block backend already exports the information about disk I/Os via devstat,
so having it here too is excessive.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268552 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267906:
mav [Sat, 12 Jul 2014 02:26:11 +0000 (02:26 +0000)]
MFC r267906:
Allow MODE SENSE commands through Write Exclusive persistent reservation,
as required by SPC-4.

Report that fact in persistent reservation capabilities.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268551 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267905:
mav [Sat, 12 Jul 2014 02:24:52 +0000 (02:24 +0000)]
MFC r267905:
Add READ BUFFER and improve WRITE BUFFER SCSI commands support.

This gives some use to 512KB per-LUN buffers, allocated for Copan-specific
processor code and not used.  It allows, for example, to test transport
performance and/or correctness without accessing the media, as supported
by Linux version of sg3_utils.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268550 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267877:
mav [Sat, 12 Jul 2014 02:17:10 +0000 (02:17 +0000)]
MFC r267877:
Lock devstat updates in block backend to make it usable.  Polish lock names.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268549 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268419:
mav [Sat, 12 Jul 2014 02:03:29 +0000 (02:03 +0000)]
MFC r268419:
Fix use-after-free on XPT_RESET_BUS.

That command is not queued, so does not use later status update.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268546 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267986:
mav [Sat, 12 Jul 2014 01:59:07 +0000 (01:59 +0000)]
MFC r267986:
Remove odd practice of inverting error codes.

-EPERM is equal to ERESTART, returning which from ioctl() handler causes
infinite syscall restart.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268545 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267984:
delphij [Fri, 11 Jul 2014 00:26:57 +0000 (00:26 +0000)]
MFC r267984:

Use Intel's official name (Secure Key) per IntelĀ® Digital Random Number
Generator (DRNG) Software Implementation Guide.

Reviewed by: kib
Approved by: so

git-svn-id: svn://svn.freebsd.org/base/stable/10@268519 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoCorrect memset size.
delphij [Fri, 11 Jul 2014 00:14:29 +0000 (00:14 +0000)]
Correct memset size.

Submitted by: Sascha Wildner (swildner at dragonflybsd dot org)
Reviewed by: Kashyap Desai <kashyap.desai avagotech.com>

git-svn-id: svn://svn.freebsd.org/base/stable/10@268518 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267886:
delphij [Fri, 11 Jul 2014 00:11:24 +0000 (00:11 +0000)]
MFC r267886:

Use correct length for buffer.

Submitted by: Sascha Wildner <swildner dragonflybsd org>

git-svn-id: svn://svn.freebsd.org/base/stable/10@268517 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267887:
delphij [Fri, 11 Jul 2014 00:08:13 +0000 (00:08 +0000)]
MFC r267887:

Correct buffer size.

Submitted by: Sascha Wildner <swildner dragonflybsd org>

git-svn-id: svn://svn.freebsd.org/base/stable/10@268516 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267897: MFV r267843:
delphij [Fri, 11 Jul 2014 00:00:00 +0000 (00:00 +0000)]
MFC r267897: MFV r267843:

Update file/libmagic to 5.19.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268515 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268212:
kib [Thu, 10 Jul 2014 09:09:37 +0000 (09:09 +0000)]
MFC r268212:
Note that most errors are possible for all syscalls from utimes(2)
family.  Minor wording corrections.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268484 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268211:
kib [Thu, 10 Jul 2014 09:08:02 +0000 (09:08 +0000)]
MFC r268211:
Micro-manage clang to get the expected inlining for cpu_search().

git-svn-id: svn://svn.freebsd.org/base/stable/10@268483 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoBump __FreeBSD_version after last SA-14:17.kmem so we have something
peter [Wed, 9 Jul 2014 00:12:15 +0000 (00:12 +0000)]
Bump __FreeBSD_version after last SA-14:17.kmem so we have something
to test against in the freebsd.org cluster.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268442 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoDocument FreeBSD-SA-14:17.kmem
gjb [Tue, 8 Jul 2014 23:07:09 +0000 (23:07 +0000)]
Document FreeBSD-SA-14:17.kmem

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@268439 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoFix kernel memory disclosure in control message and SCTP notifications.
delphij [Tue, 8 Jul 2014 21:54:50 +0000 (21:54 +0000)]
Fix kernel memory disclosure in control message and SCTP notifications.

Security: FreeBSD-SA-14:17.kmem
Security: CVE-2014-3952, CVE-2014-3953

git-svn-id: svn://svn.freebsd.org/base/stable/10@268432 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoDocument r268091, disklabel64 partition scheme.
gjb [Tue, 8 Jul 2014 15:11:33 +0000 (15:11 +0000)]
Document r268091, disklabel64 partition scheme.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@268412 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoDocument r268161, mkimg(1) merged to stable/10.
gjb [Tue, 8 Jul 2014 15:09:55 +0000 (15:09 +0000)]
Document r268161, mkimg(1) merged to stable/10.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@268411 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoRegen src.conf(5) after r268399
emaste [Tue, 8 Jul 2014 14:11:28 +0000 (14:11 +0000)]
Regen src.conf(5) after r268399

git-svn-id: svn://svn.freebsd.org/base/stable/10@268400 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268022: Rename the WITHOUT_VT_SUPPORT knob to WITHOUT_VT
emaste [Tue, 8 Jul 2014 14:04:36 +0000 (14:04 +0000)]
MFC r268022: Rename the WITHOUT_VT_SUPPORT knob to WITHOUT_VT

  The _SUPPORT knobs have a consistent meaning which differs from the
  behaviour controlled by this knob.  As the knob is opt-out and has not
  appeared in a release the impact should be low.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268399 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268393: [mdoc] Fix previous.
pluknet [Tue, 8 Jul 2014 13:16:03 +0000 (13:16 +0000)]
MFC r268393: [mdoc] Fix previous.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268396 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268059: Add missing VT_ kernel config knobs
emaste [Tue, 8 Jul 2014 09:47:52 +0000 (09:47 +0000)]
MFC r268059: Add missing VT_ kernel config knobs

git-svn-id: svn://svn.freebsd.org/base/stable/10@268389 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268090:
ae [Tue, 8 Jul 2014 01:01:30 +0000 (01:01 +0000)]
MFC r268090:
  Document all aliases supported by GEOM_PART class.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268379 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268089:
ae [Tue, 8 Jul 2014 00:59:35 +0000 (00:59 +0000)]
MFC r268089:
  Linux uses its own UUID for data partitions.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268378 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoTemporary disable build of vt_efifb vt(4) driver, not all parts of UEFI support
ray [Mon, 7 Jul 2014 21:27:47 +0000 (21:27 +0000)]
Temporary disable build of vt_efifb vt(4) driver, not all parts of UEFI support
here yet.
This direct commit to STABLE-10, because HEAD already support UEFI FB.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@268372 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC of r263873.
ray [Mon, 7 Jul 2014 19:31:02 +0000 (19:31 +0000)]
MFC of r263873.

Pointed by:     Ivan Klymenko <fidaj@ukr.net>

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@268371 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268049:
ume [Mon, 7 Jul 2014 15:31:46 +0000 (15:31 +0000)]
MFC r268049:
Fix ifconfig to show pltime and vltime with -L option,
again after usage change from time_second to time_uptime.

PR: 188520
Submitted by: Guy Yur <guyyur__at__gmail.com>

git-svn-id: svn://svn.freebsd.org/base/stable/10@268367 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f