summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MFC r268370:mav2014-07-151-18/+36
| | | | | 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.
* MFC r268326:mav2014-07-156-30/+23
| | | | | | | | 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.
* MFC r268240 (by ken):mav2014-07-157-43/+2684
| | | | | | | 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.
* MFC r268447:mav2014-07-152-2/+32
| | | | Add LUN options to specify 64-bit EUI and NAA identifiers.
* MFC r268421:mav2014-07-151-8/+1
| | | | Remove status setting from datamove() path. Leave that to other places.
* MFC r268418:mav2014-07-157-17/+55
| | | | | | | | 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.
* MFC r268387:mav2014-07-151-18/+5
| | | | | Fix task management functions status: task not found is not an error, while not implemented function is.
* MFC r268364:mav2014-07-151-4/+4
| | | | Fix "use after free" on port creation error in r268291.
* MFC r268363:mav2014-07-155-2/+132
| | | | Add support for READ FULL STATUS action of PERSISTENT RESERVE IN command.
* MFC r268362:mav2014-07-157-145/+167
| | | | | | | | | | | | 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.
* MFC r268356, r268357:mav2014-07-152-8/+32
| | | | | | 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.
* MFC r268353:mav2014-07-156-55/+142
| | | | | | | 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.
* MFC r268330:mav2014-07-151-1/+1
| | | | Make gcc happy, init idlen2.
* MFC r268328:mav2014-07-154-0/+28
| | | | | | | | 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.
* MFC r268309:mav2014-07-152-8/+153
| | | | Add support for SCSI Ports (88h) VPD page.
* MFC r268308:mav2014-07-152-81/+101
| | | | | Make REPORT TARGET PORT GROUPS command report realistic data instead of hardcoded garbage.
* MFC r268307:mav2014-07-155-34/+30
| | | | | | | 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.
* MFC r268302:mav2014-07-156-0/+16
| | | | | | | 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.
* MFC r268293:mav2014-07-159-340/+196
| | | | | | | | | | | | | 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.
* MFC r268291:mav2014-07-1510-154/+593
| | | | | | | | | | | | | | | | | 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.
* MFC r268288:mav2014-07-152-25/+43
| | | | Improve CTL_BEARG_* flags support, including optional values copyout.
* MFC r268287:mav2014-07-153-7/+23
| | | | Implement and use ctl_frontend_find().
* MFC r268284:mav2014-07-153-1/+369
| | | | | | 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.
* MFC r268280:mav2014-07-157-50/+58
| | | | | Make options KPI more generic to allow it to be used for ports too, not only for LUNs.
* MFC r268266, r268275:mav2014-07-159-412/+438
| | | | | | | | | 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.
* MFC r268265:mav2014-07-156-130/+0
| | | | | | | 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.
* MFC r268103:mav2014-07-154-1/+89
| | | | Add support for REPORT TIMESTAMP command.
* MFC r268096, r268306, r268361:mav2014-07-154-441/+765
| | | | | | | | | | | | | | 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.
* MFC r267639:mav2014-07-153-56/+38
| | | | | | | | | | | | | | | 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.
* MFC r268385:kib2014-07-151-2/+7
| | | | Make this compilable on latest Linux'es without warnings.
* MFC r268383:kib2014-07-152-0/+8
| | | | Correct si_code for the SIGBUS signal generated by the alignment trap.
* MFC r268128: MFV r268122:delphij2014-07-153-1/+10
| | | | 4929 want prevsnap property
* MFC r268126: MFV r268121:delphij2014-07-155-44/+44
| | | | 4924 LZ4 Compression for metadata
* MFC r268123: MFV r268119:delphij2014-07-1527-129/+133
| | | | 4914 zfs on-disk bookmark structure should be named *_phys_t
* MFC r268086: MFV r267570:delphij2014-07-152-4/+25
| | | | 4756 metaslab_group_preload() could deadlock
* MFC r268085: MFV r267569:delphij2014-07-151-5/+13
| | | | 4897 Space accounting mismatch in L2ARC/zpool
* MFC r268084: MFV r267568:delphij2014-07-154-7/+49
| | | | 4891 want zdb option to dump all metadata
* MFC r268082: MFV r267567:delphij2014-07-151-15/+20
| | | | | 4881 zfs send performance degradation when embedded block pointers are encountered
* MFC r268079: MFV r267566:delphij2014-07-1518-159/+297
| | | | | 4390 i/o errors when deleting filesystem/zvol can lead to space map corruption
* MFC r268075: MFV r267565:delphij2014-07-1555-292/+1630
| | | | | 4757 ZFS embedded-data block pointers ("zero block compression") 4913 zfs release should not be subject to space checks
* MFC r260142: MFV r258972:delphij2014-07-152-4/+123
| | | | 4373 add block contents print to zstreamdump
* MFC r266771: MFV r266766:delphij2014-07-157-24/+125
| | | | | | | | | | | | | | | | | | | 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
* MFC r267572: MFV r249332 (illumos-gate 14005:55fc53126003)delphij2014-07-151-1/+38
| | | | | Illumos ZFS issues: 3654 zdb should print number of ganged blocks
* Revert r268629:pfg2014-07-141-6/+5
| | | | This was supposed to go to head first :(
* fsck_msdosfs: be a bit more permissivepfg2014-07-141-5/+6
| | | | | | | | | | | | | 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)
* MFC r268538:pfg2014-07-141-1/+1
| | | | | | | | | | 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
* MFC r268354:hselasky2014-07-142-0/+5
| | | | | Improve support for Intel Lynx Point USB 3.0 controllers by masking the port routing bits like done in Linux.
* MFC r268290:pfg2014-07-131-14/+64
| | | | | | | | | | | | | 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)
* MFC 267963:jhb2014-07-131-1/+1
| | | | | | | | | | 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.
* MFC r268487:kevlo2014-07-131-3/+5
| | | | | | Enable 8051 before downloading firmware. Tested by: Carlos Jacobo Puga Medina <cpm at fbsd dot es
OpenPOWER on IntegriCloud