01 Feb, 2014
1 commit
-
Pull SCSI target updates from Nicholas Bellinger:
"The highlights this round include:- add support for SCSI Referrals (Hannes)
- add support for T10 DIF into target core (nab + mkp)
- add support for T10 DIF emulation in FILEIO + RAMDISK backends (Sagi + nab)
- add support for T10 DIF -> bio_integrity passthrough in IBLOCK backend (nab)
- prep changes to iser-target for >= v3.15 T10 DIF support (Sagi)
- add support for qla2xxx N_Port ID Virtualization - NPIV (Saurav + Quinn)
- allow percpu_ida_alloc() to receive task state bitmask (Kent)
- fix >= v3.12 iscsi-target session reset hung task regression (nab)
- fix >= v3.13 percpu_ref se_lun->lun_ref_active race (nab)
- fix a long-standing network portal creation race (Andy)"* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (51 commits)
target: Fix percpu_ref_put race in transport_lun_remove_cmd
target/iscsi: Fix network portal creation race
target: Report bad sector in sense data for DIF errors
iscsi-target: Convert gfp_t parameter to task state bitmask
iscsi-target: Fix connection reset hang with percpu_ida_alloc
percpu_ida: Make percpu_ida_alloc + callers accept task state bitmask
iscsi-target: Pre-allocate more tags to avoid ack starvation
qla2xxx: Configure NPIV fc_vport via tcm_qla2xxx_npiv_make_lport
qla2xxx: Enhancements to enable NPIV support for QLOGIC ISPs with TCM/LIO.
qla2xxx: Fix scsi_host leak on qlt_lport_register callback failure
IB/isert: pass scatterlist instead of cmd to fast_reg_mr routine
IB/isert: Move fastreg descriptor creation to a function
IB/isert: Avoid frwr notation, user fastreg
IB/isert: seperate connection protection domains and dma MRs
tcm_loop: Enable DIF/DIX modes in SCSI host LLD
target/rd: Add DIF protection into rd_execute_rw
target/rd: Add support for protection SGL setup + release
target/rd: Refactor rd_build_device_space + rd_release_device_space
target/file: Add DIF protection support to fd_execute_rw
target/file: Add DIF protection init/format support
...
29 Jan, 2014
1 commit
-
Pull exofs and ore fixes from Boaz Harrosh:
"The main fix here, the first patch, is also destined for -stable. The
rest is small trivia and cosmetics. The ORE patches effect both exofs
and pnfs-objects very reproducible bugs"[ ORE is "object raid engine", used by exofs and pnfs - Linus ]
* 'for-linus' of git://git.open-osd.org/linux-open-osd:
exofs: Print less in r4w
exofs: Allow corrupted directory entry to be empty file
exofs: Allow O_DIRECT open
ore: Don't crash on NULL bio in _clear_bio
ore: Fix wrong math in allocation of per device BIO
25 Jan, 2014
1 commit
-
Pull infiniband updates from Roland Dreier:
"Main batch of InfiniBand/RDMA changes for 3.14:
- Flow steering for InfiniBand UD traffic
- IP-based addressing for IBoE aka RoCE
- Pass SRP submaintainership from Dave to Bart
- SRP transport fixes from Bart
- Add the new Cisco usNIC low-level device driver
- Various other fixes"* tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (75 commits)
IB/mlx5: Verify reserved fields are cleared
IB/mlx5: Remove old field for create mkey mailbox
IB/mlx5: Abort driver cleanup if teardown hca fails
IB/mlx5: Allow creation of QPs with zero-length work queues
mlx5_core: Fix PowerPC support
mlx5_core: Improve debugfs readability
IB/mlx5: Add support for resize CQ
IB/mlx5: Implement modify CQ
IB/mlx5: Make sure doorbell record is visible before doorbell
mlx5_core: Use mlx5 core style warning
IB/mlx5: Clear out struct before create QP command
mlx5_core: Fix out arg size in access_register command
RDMA/nes: Slight optimization of Ethernet address compare
IB/qib: Fix QP check when looping back to/from QP1
RDMA/cxgb4: Fix gcc warning on 32-bit arch
IB/usnic: Remove unused includes of
RDMA/amso1100: Add check if cache memory was allocated before freeing it
IPoIB: Report operstate consistently when brought up without a link
IB/core: Fix unused variable warning
RDMA/cma: Handle global/non-linklocal IPv6 addresses in cma_check_linklocal()
...
23 Jan, 2014
1 commit
-
At IO preparation we calculate the max pages at each device and
allocate a BIO per device of that size. The calculation was wrong
on some unaligned corner cases offset/length combination and would
make prepare return with -ENOMEM. This would be bad for pnfs-objects
that would in that case IO through MDS. And fatal for exofs were it
would fail writes with EIO.Fix it by doing the proper math, that will work in all cases. (I
ran a test with all possible offset/length combinations this time
round).Also when reading we do not need to allocate for the parity units
since we jump over them.Also lower the max_io_length to take into account the parity pages
so not to allocate BIOs bigger than PAGE_SIZECC: Stable Kernel
Signed-off-by: Boaz Harrosh
22 Jan, 2014
2 commits
-
The following command has been used to verify that the kernel-doc
tool no longer complains about undocumented fields:scripts/kernel-doc -html drivers/scsi/scsi_transport_srp.c \
include/scsi/scsi_transport_srp.h >srp-transport-doc.htmlSigned-off-by: Bart Van Assche
Acked-by: Sebastian Riemer
Acked-by: Randy Dunlap
Signed-off-by: Roland Dreier -
The rport timers must be stopped before the SRP initiator destroys the
resources associated with the SCSI host. This is necessary because
otherwise the callback functions invoked from the SRP transport layer
could trigger a use-after-free. Stopping the rport timers before
invoking scsi_remove_host() can trigger long delays in the SCSI error
handler if a transport layer failure occurs while scsi_remove_host()
is in progress. Hence move the code for stopping the rport timers from
srp_rport_release() into a new function and invoke that function after
scsi_remove_host() has finished. This patch fixes the following
sporadic kernel crash:kernel BUG at include/asm-generic/dma-mapping-common.h:64!
invalid opcode: 0000 [#1] SMP
RIP: 0010:[] [] srp_unmap_data+0x121/0x130 [ib_srp]
Call Trace:
[] srp_free_req+0x3c/0x80 [ib_srp]
[] srp_finish_req+0x48/0x70 [ib_srp]
[] srp_terminate_io+0x4b/0x60 [ib_srp]
[] __rport_fail_io_fast+0x75/0x80 [scsi_transport_srp]
[] rport_fast_io_fail_timedout+0x88/0xc0 [scsi_transport_srp]
[] worker_thread+0x170/0x2a0
[] kthread+0x96/0xa0
[] child_rip+0xa/0x20Signed-off-by: Bart Van Assche
Signed-off-by: Roland Dreier
10 Jan, 2014
1 commit
-
Add infrastructure for referrals.
v2 changes:
- Fix unsigned long long division in core_alua_state_lba_dependent on
32-bit (Fengguang + Chen + Hannes)
- Fix compile warning in core_alua_state_lba_dependent (nab)
- Convert segment_* + sectors variables in core_alua_state_lba_dependent
to u64 (Hannes)Signed-off-by: Hannes Reinecke
Signed-off-by: Nicholas Bellinger
20 Dec, 2013
3 commits
-
Add local_ipaddr param and support get/set operations on it.
Signed-off-by: Adheer Chandravanshi
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley -
This attribute specifies the local IP address used to establish connection.
Signed-off-by: Adheer Chandravanshi
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley -
Add transport_iscsi hooks to get aggregate host statistics.
The statistics include MAC, TCP/IP & iSCSI statistics.Signed-off-by: Lalit Chandivade
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley
19 Dec, 2013
2 commits
-
When a command runs into a timeout we need to send an 'ABORT TASK'
TMF. This is typically done by the 'eh_abort_handler' LLDD callback.Conceptually, however, this function is a normal SCSI command, so
there is no need to enter the error handler.This patch implements a new scsi_abort_command() function which
invokes an asynchronous function scsi_eh_abort_handler() to
abort the commands via the usual 'eh_abort_handler'.If abort succeeds the command is either retried or terminated,
depending on the number of allowed retries. However, 'eh_eflags'
records the abort, so if the retry would fail again the
command is pushed onto the error handler without trying to
abort it (again); it'll be cleared up from SCSI EH.[hare: smatch detected stray switch fixed]
Signed-off-by: Hannes Reinecke
Signed-off-by: James Bottomley -
Commit 18a4d0a22ed6c54b67af7718c305cd010f09ddf8
(Handle disk devices which can not process medium access commands)
was introduced to offline any device which cannot process medium
access commands.
However, commit 3eef6257de48ff84a5d98ca533685df8a3beaeb8
(Reduce error recovery time by reducing use of TURs) reduced
the number of TURs by sending it only on the first failing
command, which might or might not be a medium access command.
So in combination this results in an erratic device offlining
during EH; if the command where the TUR was sent upon happens
to be a medium access command the device will be set offline,
if not everything proceeds as normal.This patch moves the check to the final test, eliminating
this problem.Signed-off-by: Hannes Reinecke
Signed-off-by: James Bottomley
17 Dec, 2013
2 commits
-
Added support to display and update additional network parameters
through iscsiadm.Signed-off-by: Harish Zunjarrao
Signed-off-by: Adheer Chandravanshi
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley -
Remove explicit values assignment for net param enums.
Signed-off-by: Harish Zunjarrao
Signed-off-by: Adheer Chandravanshi
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley
29 Nov, 2013
1 commit
-
Some host adapters do not pass commands through to the target disk
directly. Instead they provide an emulated target which may or may not
accurately report its capabilities. In some cases the physical device
characteristics are reported even when the host adapter is processing
commands on the device's behalf. This can lead to adapter firmware hangs
or excessive I/O errors.This patch disables WRITE SAME for devices connected to host adapters
that provide an emulated target. Driver writers can disable WRITE SAME
by setting the no_write_same flag in the host adapter template.[jejb: fix up rejections due to eh_deadline patch]
Signed-off-by: Martin K. Petersen
Cc: stable@kernel.org
Signed-off-by: James Bottomley
19 Nov, 2013
1 commit
-
Pull infiniband/rdma updates from Roland Dreier:
- Re-enable flow steering verbs with new improved userspace ABI
- Fixes for slow connection due to GID lookup scalability
- IPoIB fixes
- Many fixes to HW drivers including mlx4, mlx5, ocrdma and qib
- Further improvements to SRP error handling
- Add new transport type for Cisco usNIC* tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (66 commits)
IB/core: Re-enable create_flow/destroy_flow uverbs
IB/core: extended command: an improved infrastructure for uverbs commands
IB/core: Remove ib_uverbs_flow_spec structure from userspace
IB/core: Use a common header for uverbs flow_specs
IB/core: Make uverbs flow structure use names like verbs ones
IB/core: Rename 'flow' structs to match other uverbs structs
IB/core: clarify overflow/underflow checks on ib_create/destroy_flow
IB/ucma: Convert use of typedef ctl_table to struct ctl_table
IB/cm: Convert to using idr_alloc_cyclic()
IB/mlx5: Fix page shift in create CQ for userspace
IB/mlx4: Fix device max capabilities check
IB/mlx5: Fix list_del of empty list
IB/mlx5: Remove dead code
IB/core: Encorce MR access rights rules on kernel consumers
IB/mlx4: Fix endless loop in resize CQ
RDMA/cma: Remove unused argument and minor dead code
RDMA/ucma: Discard events for IDs not yet claimed by user space
IB/core: Add Cisco usNIC rdma node and transport types
RDMA/nes: Remove self-assignment from nes_query_qp()
IB/srp: Report receive errors correctly
...
10 Nov, 2013
1 commit
-
Pull Request for 3.13 for FCOE tree.
Signed-off-by: James Bottomley
09 Nov, 2013
3 commits
-
Add support for periodically reconnecting to an SRP target until
the dev_loss timer expires. After the tenth reconnection attempt,
gradually slow down subsequent reconnect attempts.Signed-off-by: Bart Van Assche
Acked-by: David Dillow
Signed-off-by: Roland Dreier -
Add the necessary functions in the SRP transport module to allow an
SRP initiator driver to implement transport layer error handling
similar to the functionality already provided by the FC transport
layer. This includes:- Support for implementing fast_io_fail_tmo, the time that should
elapse after having detected a transport layer problem and
before failing I/O.
- Support for implementing dev_loss_tmo, the time that should
elapse after having detected a transport layer problem and
before removing a remote port.Signed-off-by: Bart Van Assche
Acked-by: David Dillow
Signed-off-by: Roland Dreier -
Keep the rport data structure around after srp_remove_host() has
finished until cleanup of the IB transport layer has finished
completely. This is necessary because later patches use the rport
pointer inside the queuecommand callback. Without this patch
accessing the rport from inside a queuecommand callback is racy
because srp_remove_host() must be invoked before scsi_remove_host()
and because the queuecommand callback could get invoked after
srp_remove_host() has finished. In other words, without this patch
the queuecommand callback can get invoked after the rport data
structure has been freed.Signed-off-by: Bart Van Assche
Acked-by: David Dillow
Signed-off-by: Roland Dreier
25 Oct, 2013
3 commits
-
This patchs adds an 'eh_deadline' sysfs attribute to the scsi
host which limits the overall runtime of the SCSI EH.
The 'eh_deadline' value is stored in the now obsolete field
'resetting'.
When a command is failed the start time of the EH is stored
in 'last_reset'. If the overall runtime of the SCSI EH is longer
than last_reset + eh_deadline, the EH is short-circuited and
falls through to issue a host reset only.[jejb: add comments in Scsi_Host about new fields]
Signed-off-by: Hannes Reinecke
Signed-off-by: James Bottomley -
Field is now unused, so this is dead code.
[jejb: remove resetting and last_reset from Scsi_Host]
Signed-off-by: Hannes Reinecke
Signed-off-by: James Bottomley -
For offload iSCSI like qla4xxx, CHAP entries are stored in adapter's
flash.
This patch adds support to add/update CHAP entries in adapter's flash
using iscsi tools, like Open-iSCSI.Signed-off-by: Adheer Chandravanshi
Signed-off-by: Vikas Chaudhary
Signed-off-by: James Bottomley
12 Oct, 2013
1 commit
-
fnic doesn't use any of the create/destroy/enable/disable interfaces
either from the (legacy) module paramaters or the (new) fcoe_sysfs
interfaces. When fcoe_sysfs was introduced fnic wasn't changed since
it wasn't using the interfaces. libfcoe incorrectly assumed that that
all of its users were using fcoe_sysfs and when adding and deleting
FCFs would assume the existance of a fcoe_ctlr_device. fnic was not
allocating this structure because it doesn't care about the standard
user interfaces (fnic starts on link only). If/When libfcoe tried to use
the fcoe_ctlr_device's lock for the first time a NULL pointer exception
would be triggered.Since fnic doesn't care about sysfs or user interfaces, the solution
is to drop libfcoe's assumption that all drivers are using fcoe_sysfs.This patch accomplishes this by changing some of the structure
relationships.We need a way to determine when a LLD is using fcoe_sysfs or not and
we can do that by checking for the existance of the fcoe_ctlr_device.
Prior to this patch, it was assumed that the fcoe_ctlr structure was
allocated with the fcoe_ctlr_device and immediately followed it in
memory. To reach the fcoe_ctlr_device we would simply go back in memory
from the fcoe_ctlr to get the fcoe_ctlr_device.Since fnic doesn't allocate the fcoe_ctlr_device, we cannot keep that
assumption. This patch adds a pointer from the fcoe_ctlr to the
fcoe_ctlr_device. For bnx2fc and fcoe we will continue to allocate the
two structures together, but then we'll set the ctlr->cdev pointer
to point at the fcoe_ctlr_device. fnic will not change and will continue
to allocate the fcoe_ctlr itself, and ctlr->cdev will remain NULL.When libfcoe adds fcoe_fcf's to the fcoe_ctlr it will check if ctlr->cdev
is set and only if so will it continue to interact with fcoe_sysfs.Signed-off-by: Robert Love
Acked-by: Neil Horman
Tested-by: Hiral Patel
13 Sep, 2013
1 commit
-
Pull SCSI target updates from Nicholas Bellinger:
"Lots of activity again this round for I/O performance optimizations
(per-cpu IDA pre-allocation for vhost + iscsi/target), and the
addition of new fabric independent features to target-core
(COMPARE_AND_WRITE + EXTENDED_COPY).The main highlights include:
- Support for iscsi-target login multiplexing across individual
network portals
- Generic Per-cpu IDA logic (kent + akpm + clameter)
- Conversion of vhost to use per-cpu IDA pre-allocation for
descriptors, SGLs and userspace page pointer list
- Conversion of iscsi-target + iser-target to use per-cpu IDA
pre-allocation for descriptors
- Add support for generic COMPARE_AND_WRITE (AtomicTestandSet)
emulation for virtual backend drivers
- Add support for generic EXTENDED_COPY (CopyOffload) emulation for
virtual backend drivers.
- Add support for fast memory registration mode to iser-target (Vu)The patches to add COMPARE_AND_WRITE and EXTENDED_COPY support are of
particular significance, which make us the first and only open source
target to support the full set of VAAI primitives.Currently Linux clients are lacking upstream support to actually
utilize these primitives. However, with server side support now in
place for folks like MKP + ZAB working on the client, this logic once
reserved for the highest end of storage arrays, can now be run in VMs
on their laptops"* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (50 commits)
target/iscsi: Bump versions to v4.1.0
target: Update copyright ownership/year information to 2013
iscsi-target: Bump default TCP listen backlog to 256
target: Fix >= v3.9+ regression in PR APTPL + ALUA metadata write-out
iscsi-target; Bump default CmdSN Depth to 64
iscsi-target: Remove unnecessary wait_for_completion in iscsi_get_thread_set
iscsi-target: Add thread_set->ts_activate_sem + use common deallocate
iscsi-target: Fix race with thread_pre_handler flush_signals + ISCSI_THREAD_SET_DIE
target: remove unused including
iser-target: introduce fast memory registration mode (FRWR)
iser-target: generalize rdma memory registration and cleanup
iser-target: move rdma wr processing to a shared function
target: Enable global EXTENDED_COPY setup/release
target: Add Third Party Copy (3PC) bit in INQUIRY response
target: Enable EXTENDED_COPY setup in spc_parse_cdb
target: Add support for EXTENDED_COPY copy offload emulation
target: Avoid non-existent tg_pt_gp_mem in target_alua_state_check
target: Add global device list for EXTENDED_COPY
target: Make helpers non static for EXTENDED_COPY command setup
target: Make spc_parse_naa_6h_vendor_specific non static
...
10 Sep, 2013
1 commit
-
Reviewed-by: Christoph Hellwig
Cc: Hannes Reinecke
Cc: Martin Petersen
Cc: Chris Mason
Cc: James Bottomley
Cc: Nicholas Bellinger
Signed-off-by: Nicholas Bellinger
05 Sep, 2013
2 commits
-
While the FCoE initiator driver invokes fc_exch_done() from inside
the libfc response handler, FCoE target drivers typically invoke
fc_exch_done() from outside the libfc response handler. The object
fc_exch.arg points at may disappear as soon as fc_exch_done() has
finished. So it's important not to invoke the response handler
function after fc_exch_done() has finished. Modify libfc such that
this guarantee is provided if fc_exch_done() is invoked from
outside a response handler. This patch fixes a sporadic crash in
FCoE target implementations after a command has been aborted.Signed-off-by: Bart Van Assche
Cc: Neil Horman
Signed-off-by: Robert Love -
Change 'initiaive' into 'initiative', 'remainig' into 'remaining'
and change 'exected' into 'expected'.Signed-off-by: Bart Van Assche
Signed-off-by: Robert Love
26 Aug, 2013
1 commit
-
Generate a uevent when the following Unit Attention ASC/ASCQ
codes are received:2A/01 MODE PARAMETERS CHANGED
2A/09 CAPACITY DATA HAS CHANGED
38/07 THIN PROVISIONING SOFT THRESHOLD REACHED
3F/03 INQUIRY DATA HAS CHANGED
3F/0E REPORTED LUNS DATA HAS CHANGEDLog kernel messages when the following Unit Attention ASC/ASCQ
codes are received that are not as specific as those above:2A/xx PARAMETERS CHANGED
3F/xx TARGET OPERATING CONDITIONS HAVE CHANGEDAdded logic to set expecting_lun_change for other LUNs on the target
after REPORTED LUNS DATA HAS CHANGED is received, so that duplicate
uevents are not generated, and clear expecting_lun_change when a
REPORT LUNS command completes, in accordance with the SPC-3
specification regarding reporting of the 3F 0E ASC/ASCQ UA.[jejb: remove SPC3 test in scsi_report_lun_change and some docbook fixes and
unused variable fix, both reported by Fengguang Wu]
Signed-off-by: Ewan D. Milne
Signed-off-by: James Bottomley
24 Aug, 2013
5 commits
-
Signed-off-by: Adheer Chandravanshi
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley -
Signed-off-by: Adheer Chandravanshi
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley -
When a medium error is detected the SCSI stack should return
ENODATA to the upper layers.[jejb: fix whitespace error]
Signed-off-by: Hannes Reinecke
Signed-off-by: James Bottomley -
When the thin provisioning hard threshold is reached we
should return ENOSPC to inform upper layers about this fact.Signed-off-by: Hannes Reinecke
Signed-off-by: James Bottomley -
We should be modifying the host_byte status in scsi_check_sense()
directly; this saves us to introduce a special return code for
each and every condition.Signed-off-by: Hannes Reinecke
Signed-off-by: James Bottomley
27 Jun, 2013
1 commit
-
This is the kernel part of the modification to extract the net params
from the ibft sysfs to the iface struct used for the connection
request upon sync_session in the open-iscsi util.Three new session sysfs params are defined:
boot_root - holds the name of the /sys/firmware/ibft or iscsi_rootN
boot_nic - holds the ethernetN name
boot_target - holds the targetN nameSigned-off-by: Eddie Wai
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley
25 Jun, 2013
1 commit
-
Not all disks fill out the VPD pages correctly. Add a blacklist flag
that allows us ignore the SBC-3 VPD pages for a given device. The
BLIST_SKIP_VPD_PAGES flag triggers our existing skip_vpd_pages
scsi_device parameter to bypass VPD scanning.Also blacklist the offending Seagate drive model.
Reported-by: Mike Snitzer
Signed-off-by: Martin K. Petersen
Signed-off-by: James Bottomley
05 Jun, 2013
2 commits
-
Introduce eh_timeout which can be used for error handling purposes. This
was previously hardcoded to 10 seconds in the SCSI error handling
code. However, for some fast-fail scenarios it is necessary to be able
to tune this as it can take several iterations (bus device, target, bus,
controller) before we give up.Signed-off-by: Martin K. Petersen
Signed-off-by: James Bottomley -
Remove the arbitrary expectation in libsas that all SCSI commands are 16 bytes
or less. Instead do all copies via cmd->cmd_len (and use a pointer to this in
the libsas task instead of a copy). Note that this still doesn't enable > 16
byte CDB support in the underlying drivers because their internal format has
to be fixed and the wire format of > 16 byte CDBs according to the SAS spec is
different. the libsas drivers (isci, aic94xx, mvsas and pm8xxx are all
updated for this change.Cc: Lukasz Dorau
Cc: Maciej Patelczyk
Cc: Dave Jiang
Cc: Jack Wang
Cc: Lindar Liu
Cc: Xiangliang Yu
Signed-off-by: James Bottomley
10 May, 2013
2 commits
-
Signed-off-by: James Bottomley
-
Signed-off-by: James Bottomley