195460 Commits

Author SHA1 Message Date
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
trasz
a3b0c7e4a8 MFC r264544:
Add kern.iscsi.fail_on_disconnection; this is required for gmultipath
to work.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:48:32 +00:00
trasz
5498c3860b MFC r264538:
Remove useless debug.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:47:29 +00:00
trasz
85e3b0d2dc MFC r264537:
Be more strict with locking for is_waiting_for_iscsid variable.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:46:23 +00:00
trasz
6dac0bfb68 MFC r264536:
Get rid of ISCSIDCLOSE; it wasn't used and is redundant anyway,
because of ISCSIDFAIL.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:45:22 +00:00
trasz
4dda47a3fa MFC r264535:
English.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:44:17 +00:00
trasz
854e04966d MFC r264534:
If we fail to create LUN, try again on next configuration reload.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:43:13 +00:00
trasz
db043740d7 MFC r264533:
Use consistent punctuation.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:41:58 +00:00
trasz
25fa6ec500 MFC r264532:
Use proper terminology in debug messages.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:40:45 +00:00
trasz
4eacdf9453 MFC r264531:
Constify.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:39:16 +00:00
trasz
21ec0cf2d0 MFC r264530:
Properly pass the initiator address when running in proxy mode.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:37:55 +00:00
trasz
a59839947c MFC r264529:
Use socket address from accept(2) instead of retrieving it via
getpeername(2).

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:36:46 +00:00