Commit Graph

195371 Commits

Author SHA1 Message Date
brooks
5b893a150d MFC r265201
Fix a 2038 bug.

If time_t is 64-bit (i.e. isn't 32-bit) allow any value of year, not
just years less than 2038.

Don't bother fixing the underflow in the case of years before 1903.

MFC after:	1 week
Sponsored by:	DARPA, AFRL
2014-05-08 16:12:38 +00:00
mav
1cf59d11f4 MFC r260234, r260328:
Remove extra conversion to nanoseconds from ddi_get_lbolt64().

As result this uses one multiplication and shifts instead of one division
and two multiplications.
2014-05-08 13:31:01 +00:00
mav
44963562b0 MFC r264145:
Add property and sysctl to control how ZVOLs are exposed to OS.

New ZFS property volmode and sysctl vfs.zfs.vol.mode allow switching ZVOL
between three modes:
 geom -- existing fully functional behavior (default);
 dev -- exposing volumes only as raw disk device file in devfs;
 none -- not exposing volumes outside ZFS.

The "dev" mode is less functional (can't be partitioned, mounted, etc),
but it is faster, and in some scenarios with untrusted consumers safer.
It can be useful for NAS, VM block storages, etc.
The "none" mode may be convenient for backup servers, etc. that don't
need direct data access.

Due to the way ZVOL is integrated with main ZFS code, those property
and sysctl are checked only during pool import and volume creation.
2014-05-08 13:12:24 +00:00
mav
da286974ab MFC r264086:
3580 Want zvols to return volblocksize when queried for physical block size

illumos/illumos-gate@a0b60564df

It is irrelevant for FreeBSD, just reducing diff.
2014-05-08 13:10:39 +00:00
mav
df9f601cbc MFC r265054:
Reduce number of opens by REOM RAID during provider taste.

Instead opening/closing provider by each of metadata classes, do it only
once in core code.  Since for SCSI disks open/close means sending some
SCSI commands to the device, this change reduces taste time.

Sponsored by:	iXsystems, Inc.
2014-05-08 12:07:40 +00:00
mav
69f94d7a6b MFC r264313:
Do not increment bio_data in case of BIO_DELETE.

This fixes KASSERT() panic in g_io_request().
2014-05-08 12:04:40 +00:00
rmacklem
710b5b6515 MFC: r264888
The PR reported that the old NFS server did not set uio_td == NULL
for the VOP_READ() call. This patch fixes both the old and new
server for this case.
2014-05-08 11:59:23 +00:00
smh
82003879bc MFC r264853
Add some new ATA defines for SATA 3.1 spec

Sponsored by:	Multiplay
2014-05-08 08:30:18 +00:00
smh
aaa39d2970 MFC r264849 & r264883
Exposed debug.acpi.max_tasks and debug.acpi.max_threads via sysctls so their
values can be viewed.

Sponsored by:	Multiplay
2014-05-08 08:23:24 +00:00
smh
f471b51045 MFC r264878
Increase ACPI_MAX_TASKS to be 4 x the number of CPU's as 2 x was still
insufficient on some machines

Sponsored by:	Multiplay
2014-05-08 08:20:23 +00:00
smh
d4010b5267 MFC r264863
Add information about supported NCQ functionality to camcontrol identify.

Sponsored by:	Multiplay
2014-05-08 08:18:48 +00:00
smh
c84c4e2d80 MFC r264851
Eliminated optarg global being used outside of the function which called getopt

Sponsored by:	Multiplay
2014-05-08 08:17:12 +00:00
mav
8c42300872 MFC r265159:
Respect MAXIMUM TRANSFER LENGTH field of Block Limits VPD page.

Nobody yet reported disk supporting I/Os less then our MAXPHYS value, but
since we any way have code to read Block Limits VPD page, that is easy.
2014-05-08 07:13:22 +00:00
mav
878513ca7d MFC r265150:
Do not reread SCSI disk VPD pages on every device open.

Instead of rereading VPD pages on every device open, do it only on initial
device probe, and in cases when device reported via UNIT ATTENTIONs that
something has changed.  Capacity is still rereaded on every open because
it is more critical for operation and more probable to change in run time.

On my tests with Intel 530 SSDs on mps(4) HBA this change reduces time
GEOM needs to retaste the device (that includes few open/close cycles)
from ~150ms to ~30ms.
2014-05-08 07:12:06 +00:00
mav
c2e87a8026 MFC r264886:
Remove limits on size of READ/WRITE operations.

Instead of allocating up to 16MB or RAM at once to handle whole I/O,
allocate up to 1MB at a time, but do multiple ctl_datamove() and storage
I/Os if needed.
2014-05-08 07:10:38 +00:00
mav
e2d7108ca8 MFC r264884:
Make CAM target CTL frontend respect SIM I/O size limitations.

If datamove size is bigger then SIM can handle, or it has more segments
then this code can handle -- split it into several CTIO requests.
2014-05-08 07:08:47 +00:00
mav
84e0de396e MFC r264880 (by trasz):
Modify CTL iSCSI frontend to properly handle situations where datamove
routine is called multiple times per SCSI task.
2014-05-08 07:07:51 +00:00
mav
df5d1f3a9b MFC r264834:
Disable UNMAP support for STEC 842 SSDs.

In some unknown cases UNMAP commands make device firmware stuck.
2014-05-08 07:05:19 +00:00
mav
1252c77788 MFC r264407:
Join CTL worker threads into one process for convenience.
Report their idle state as "-".
2014-05-08 07:04:13 +00:00
mav
9f15393e22 MFC r264406:
Report more readable state "-" for idle CAM scan thread.
2014-05-08 07:01:54 +00:00
mav
2d5dc4736b MFC r264274, r264279, r264283, r264296, r264297:
Add support for SCSI UNMAP commands to CTL.

This patch adds support for three new SCSI commands: UNMAP, WRITE SAME(10)
and WRITE SAME(16).  WRITE SAME commands support both normal write mode
and UNMAP flag.  To properly report UNMAP capabilities this patch also adds
support for reporting two new VPD pages: Block limits and Logical Block
Provisioning.

UNMAP support can be enabled per-LUN by adding "-o unmap=on" to `ctladm
create` command line or "option unmap on" to lun sections of /etc/ctl.conf.

At this moment UNMAP supported for ramdisks and device-backed block LUNs.
It was tested to work great with ZFS ZVOLs.  For file-backed LUNs UNMAP
support is unfortunately missing due to absence of respective VFS KPI.

Sponsored by:   iXsystems, Inc
2014-05-08 07:00:45 +00:00
mav
246a5ae3a0 MFC r260509:
Replace several instances of -1 with appropriate CAM_*_WILDCARD and types.

It was equal before r259397, but for good or bad, not any more for LUNs.

This change fixes at least CAM debugging.
2014-05-08 06:55:48 +00:00
rmacklem
48c2f6d38b MFC: r264845
Remove an unnecessary level of indirection for an argument.
This simplifies the code and should avoid the clang sparc
port from generating an abort() call.
2014-05-07 22:33:36 +00:00
rmacklem
bd43d1e404 MFC: r264842
Modify the NFSv4 client's Pathconf RPC (actually a Getattr Op.)
so that it only does the RPC for names that are answered by the RPC.
Doing the RPC for other names is harmless, but unnecessary.
2014-05-07 22:27:03 +00:00
gavin
d41ec318f9 Merge r259393 from head:
Fix several panics when initialization of an ISA or PC-CARD device fails:

  o  Assign sc->an_dev in an_probe() (which isn't really a probe function in
     the standard newbus sense) as we may need it for printing errors.
  o  Use device_printf() rather than if_printf() in an_reset() - this is
     called from an_probe() long before the ifp structure is initialised
     in an_attach().
  o  Initialize the ifp structure early in an_attach() as we use if_printf()
     in cases where allocation of descriptors etc fails.
2014-05-07 21:38:33 +00:00
gavin
ff6061264f Merge r256782 from head:
Add 26 new device IDs to uslcom(4).  This brings us in sync with Linux
  v3.12 rc5
2014-05-07 20:57:16 +00:00
scottl
96be897ce1 Merge r264984
Retire smp_active.  It was racey and caused demonstrated problems with
the cpufreq code.  Replace its use with smp_started.  There's at least
one userland tool that still looks at the kern.smp.active sysctl, so
preserve it but point it to smp_started as well.

Obtained from:	Netflix, Inc.
2014-05-07 20:28:27 +00:00
scottl
76892e1ddc Merged r262424-262425,265085
Add the -a option to pmcstat.  This produces a full stack track on the
sampled points.  See the man page for details on how this works.

Obtained from:  Netflix, Inc.
2014-05-07 20:20:52 +00:00
asomers
b9bac26480 MFC r263445 and r265385. Note that the change to ObsoleteFiles.inc in
r265385 does not need to be MFCed, because the obsolete files in question
were never MFCed to any stable branch.

r265385
Remove the ifconfig test added in rev 263445.  After discussion with
melifaro, we agreed that ifconfig's behavior was not a bug.  The main
motivation for bin/187551 was to partially resolve kern/187549, but we
resolved kern/187549 in a different way instead.

ObsoleteFiles.inc
etc/mtree/BSD.tests.dist
sbin/ifconfig/tests/fibs_test.sh
sbin/ifconfig/tests/Makefile
sbin/ifconfig/Makefile
        Remove /usr/tests/sbin/ifconfig

r263445
Add several ATF tests that deal with multiple fibs.  They're described in
several different PRs, but the tests share some common code, so I'm
committing them together.

sbin/ifconfig/tests
sbin/ifconfig/tests/fibs_test.sh
sbin/ifconfig/tests/Makefile
sbin/ifconfig/Makefile
        Add fibs_test.sh, which regresses bin/187551

tests/sys/netinet
tests/sys/netinet/fibs_test.sh
tests/sys/netinet/udp_dontroute.c
tests/sys/netinet/Makefile
tests/sys/Makefile
        Add fibs_test.sh, which regresses kern/167947, kern/187552
        kern/187549, kern/187550, and kern/187553

etc/mtree/BSD.tests.dist
        Add newly created directories
2014-05-07 18:49:25 +00:00
jimharris
e6ff98d436 MFC r263311:
nvme: Allocate all MSI resources up front so that we can fall back to
INTx if necessary.
2014-05-07 17:20:15 +00:00
jimharris
a9f6691698 MFC r263310:
nvme: Close hole where nvd(4) would not be notified of all nvme(4)
instances if modules loaded during boot.
2014-05-07 17:18:51 +00:00
jimharris
4577290c4a MFC r263303:
Update nvme(4) and nvd(4) man pages to clarify the differences between
their respective device nodes.
2014-05-07 17:17:16 +00:00
jimharris
d510ab88e7 MFC r263278:
nvme:  NVMe specification dictates 4-byte alignment for PRPs (not 8).
2014-05-07 17:02:15 +00:00
jimharris
9063c98097 MFC r263277:
nvme: Remove the software progress marker SET_FEATURE command during
controller initialization.

The spec says OS drivers should send this command after controller
initialization completes successfully, but other NVMe OS drivers are
not sending this command.  This change will therefore reduce differences
between the FreeBSD and other OS drivers.
2014-05-07 17:00:39 +00:00
jimharris
34268f6d13 MFC r263276:
Base the max number of SG elements on MAXPHYS.
2014-05-07 16:57:33 +00:00
jimharris
636363f8c2 MFC r263275:
isci: Ensure ATA passthrough commands with RETURN_RESPONSE bit set
translate their response.
2014-05-07 16:56:20 +00:00
jimharris
559a6cde69 MFC r260382:
For IDENTIFY passthrough commands to Chatham prototype controllers, copy
the spoofed identify data into the user buffer rather than issuing the
command to the controller, since Chatham IDENTIFY data is always spoofed.

While here, fix a bug in the spoofed data for Chatham submission and
completion queue entry sizes.
2014-05-07 16:55:08 +00:00
jimharris
9f6b11fff3 MFC r260381:
For "nvmecontrol devlist", show namespace sizes in terms of MB instead of
GB to improve granularity of the reporting - especially for namespaces
that are on the order of 1 or 2 GB.
2014-05-07 16:53:42 +00:00
jimharris
3f0fde84c4 MFC r258071:
Check for special status code from FIRMWARE_ACTIVATE command
signifying that a reboot is required to complete activation
of the requested firmware image.
2014-05-07 16:52:29 +00:00
gjb
722b26e3c0 Document r265388, addition of mpr(4).
Sponsored by:	The FreeBSD Foundation
2014-05-07 12:48:18 +00:00
marius
c1f0e5c458 MFC: r265248
Allow GEOM_VINUM to be statically compiled into the kernel.

Submitted by:	gleb
2014-05-07 09:55:47 +00:00
delphij
ebef83dbd2 MFC r264573+264608+264609:
Sync with OpenBSD.
2014-05-07 08:06:54 +00:00
trasz
d6c003e920 MFC r264405:
Fix periph listing when IOCTL buffer border hits result for wanted bus.
2014-05-07 08:04:41 +00:00
trasz
e278af05e2 MFC r264355 by mav@:
Remove unused val argument value from SYSCTL_INT() calls.
2014-05-07 08:03:30 +00:00
trasz
73fdbcd002 MFC r264877:
Style fixes.

Sponsored by:	The FreeBSD Foundation
2014-05-07 08:00:59 +00:00
trasz
09692139dc MFC r264876:
Grammar fix.
2014-05-07 07:59:44 +00:00
trasz
721f1b951c MFC r264604:
Remove redundant code.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:57:53 +00:00
trasz
c8af11f514 MFC r264549:
Make it possible for the initiator side to operate in both proxy
and normal mode; this makes it possible to compile with the former
by default, but use it only when neccessary.  That's especially
important for the userland part.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:56:36 +00:00
trasz
6f6c510356 MFC r264545:
Fix typo.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:54:47 +00:00
trasz
16f70f6ffb MFC r264348 by mav@:
Improve use of socket buffer upcalls.

Use soreadable()/sowriteable() in socket upcalls to avoid extra wakeups
until we have enough data to read or space to write.

Increase partial receive len from 1K to 128K to not wake up on every
received packet.

This significantly reduces locks congestion and CPU usage and improves
throughput for large I/Os on NICs without TSO and LRO.

MFC r264552 by mav@:

Close the race in older code, that caused connection stuck after r264348.

Sponsored by:	iXsystems, Inc.
2014-05-07 07:53:24 +00:00