Akinobu Mita | 25 Apr 16:56 2015
Picon

[PATCH] scatterlist: enable sg chaining for all architectures

Some architectures enable sg chaining option while others do not.

The requirement to enable sg chaining is that pages must be aligned
at a 32-bit boundary in order to overload the LSB of the pointer.
Regardless of whether ARCH_HAS_SG_CHAIN is defined or not, the above
requirement is always chacked by BUG_ON() in sg_assign_page.  So
all architectures can enable sg chaining.

As you can see from the changes in drivers/target/target_core_rd.c,
enabling SG chaining for all architectures allows us to allocate
discontiguous scatterlist tables which can be traversed throughout
by sg_next() without a special handling for some architectures.

Signed-off-by: Akinobu Mita <akinobu.mita <at> gmail.com>
Cc: Arnd Bergmann <arnd <at> arndb.de>
Cc: linux-arch <at> vger.kernel.org
Cc: "James E.J. Bottomley" <JBottomley <at> odin.com>
Cc: Christoph Hellwig <hch <at> lst.de>
Cc: linux-scsi <at> vger.kernel.org
Cc: Nicholas A. Bellinger <nab <at> linux-iscsi.org>
Cc: target-devel <at> vger.kernel.org
---
 arch/arm/Kconfig                |  6 ------
 arch/arm64/Kconfig              |  1 -
 arch/ia64/Kconfig               |  1 -
 arch/powerpc/Kconfig            |  1 -
 arch/s390/Kconfig               |  1 -
 arch/sparc/Kconfig              |  1 -
 arch/x86/Kconfig                |  1 -
 drivers/target/target_core_rd.c | 45 -----------------------------------------
(Continue reading)

Ilias Tsitsimpis | 23 Apr 20:30 2015

[PATCHv2 0/5] Support for BIDI commands in TCMU

Hi Andy, Nick and everyone,

This is version 2 of my patch series that adds support for bidirectional
commands in TCMU, incorporating feedback from Andy.

Changed in v2:
- Rename map_cmd_ring(), unmap_cmd_ring() functions to
  map_sg_to_data_area() and unmap_sg_from_data_area()
  (patches 4 and 5).

Thanks,

Ilias Tsitsimpis (5):
  driver/user: Don't warn for DMA_NONE data direction
  target/loop: Enable VARLEN CDB support
  target/transport: Always initialize bidi fields in se_cmd
  target/user: Refactor data area allocation code
  target/user: Add support for bidirectional commands

 Documentation/target/tcmu-design.txt   |   2 +-
 drivers/target/loopback/tcm_loop.c     |   2 +-
 drivers/target/loopback/tcm_loop.h     |   5 -
 drivers/target/target_core_transport.c |   6 +-
 drivers/target/target_core_user.c      | 221 ++++++++++++++++++++-------------
 5 files changed, 136 insertions(+), 100 deletions(-)

--

-- 
2.1.4

(Continue reading)

Robert Wood | 22 Apr 23:12 2015

Update on crash with kernel 3.19

 I stress tested the system (16 parallel streams each
to its own LUN from two different VM hosts) and I cannot break it with
default_cmdsn_depths of 16,32 and 256.  I believe below is when the crash
initiated last Sunday after some normal LUN probing by Vmware.  It is
possible and likely that the timeout came from the ceph back end, but
target still crashed.

Thank you,
Alex
>
> Apr 19 03:30:00 roc-4r-scd212 kernel: [74483.295274] ABORT_TASK: Sending
> TMR_FUNCTION_COMPLETE for ref_tag: 257197
> Apr 19 03:30:00 roc-4r-scd212 kernel: [74483.295279] Unable to locate
> ITT: 0x0003ecad on CID: 0
> Apr 19 03:30:00 roc-4r-scd212 kernel: [74483.295279] ABORT_TASK: Sending
> TMR_TASK_DOES_NOT_EXIST for ref_tag: 257197
> Apr 19 03:30:00 roc-4r-scd212 kernel: [74483.295308] Unable to locate
> RefTaskTag: 0x0003ecad on CID: 0.
> Apr 19 03:30:02 roc-4r-scd212 kernel: [74486.177458] ABORT_TASK: Found
> referenced iSCSI task_tag: 9072
> Apr 19 03:30:02 roc-4r-scd212 kernel: [74486.177460] Unexpected ret: -32
> send data 48
> Apr 19 03:30:02 roc-4r-scd212 kernel: [74486.177488] ABORT_TASK: Sending
> TMR_FUNCTION_COMPLETE for ref_tag: 9072
> Apr 19 03:30:10 roc-4r-scd212 kernel: [74493.812492] Unexpected ret: -32
> send data 48
> Apr 19 03:30:12 roc-4r-scd212 kernel: [74495.813309] TARGET_CORE[iSCSI]:
> Detected NON_EXISTENT_LUN Access for 0x00000015
> Apr 19 03:30:12 roc-4r-scd212 kernel: [74495.987564] libceph: osd25
> 10.80.3.30:6809 <http://10.80.3.30:6809> socket closed (con state OPEN)
(Continue reading)

Ilias Tsitsimpis | 22 Apr 12:15 2015

[PATCH 0/5] Support for BIDI commands in TCMU

Hi Andy, Nick and everyone,

This patch series adds support for bidirectional commands in TCMU. The
implementation follows the discussion from "[RFC] Add support for BIDI
operations in TCMU". These patches should be applied on top of Andy's
"[RFC PATCHv2 0/2] TCMU iface version 2".

The first patch fixes a bug where a warning message was printed for no
good reason. The second patch enables target/loop to support variable
length CDBs. The third patch changes target/transport so that the
t_bidi_data_sg, t_bidi_data_nents variables are always initialized. The
fourth patch refactors the target/user code and introduces two functions
that are going to be used by the next patch. Finally the fifth patch
introduces BIDI support in TCMU.

Thanks,
Ilias

Ilias Tsitsimpis (5):
  driver/user: Don't warn for DMA_NONE data direction
  target/loop: Enable VARLEN CDB support
  target/transport: Always initialize bidi fields in se_cmd
  target/user: Refactor data ring allocation code
  target/user: Add support for bidirectional commands

 Documentation/target/tcmu-design.txt   |   2 +-
 drivers/target/loopback/tcm_loop.c     |   2 +-
 drivers/target/loopback/tcm_loop.h     |   5 -
 drivers/target/target_core_transport.c |   6 +-
 drivers/target/target_core_user.c      | 220 ++++++++++++++++++++-------------
(Continue reading)

Andy Grover | 21 Apr 18:58 2015
Picon

targetcli and user-backed backstores, advice?

Hi Jerome,

I've been working on userspace-backed backstores, and am now working on 
how best to represent them in targetcli. Here's what I have so far:

https://fedorapeople.org/~grover/targetcli-user-screenshot.png

This puts user-backed backstores under /backstores/user, and the 
existing kernel-based backstores are under /backstores. The issue being 
that the alternating-hierarchy-color feature colors user-backstores the 
same as storage objects ("blah" and "glfs" are colored the same).

Do you have any thoughts on if there are better ways we could clearly 
represent user-backed backstores? Would perhaps listing all backstores 
together be better, or even putting the existing ones under "kernel"? Or 
some other thing we could do?

Thanks -- Regards -- Andy
Robert Wood | 21 Apr 18:10 2015

Crash LIO in kernel 3.19 with ESXi 5.5

Good day,

Running into a simultaneous crash on two Pacemaker nodes with Ubuntu
14.04.1 and kernel 3.19.4.  Here is a snippet of what happens just
before the crash.  LIO is providing LUNs to ESXi 5.5

Thank you,
Alex Gorbachev

Apr 19 03:29:51 roc-4r-scd212 kernel: [74474.919463] libceph: osd28
10.80.3.30:6800 socket closed (con state OPEN)
Apr 19 03:29:55 roc-4r-scd212 kernel: [74478.776997]
TARGET_CORE[iSCSI]: Detected NON_EXISTENT_LUN Access for 0x0000000b
Apr 19 03:29:55 roc-4r-scd212 kernel: [74478.777071] ABORT_TASK: Found
referenced iSCSI task_tag: 199691
Apr 19 03:29:55 roc-4r-scd212 kernel: [74478.777074] ABORT_TASK:
ref_tag: 199691 already complete, skipping
Apr 19 03:29:55 roc-4r-scd212 kernel: [74478.777076] ABORT_TASK:
Sending TMR_TASK_DOES_NOT_EXIST for ref_tag: 199691
Apr 19 03:29:55 roc-4r-scd212 kernel: [74478.777078] ABORT_TASK: Found
referenced iSCSI task_tag: 199692
Apr 19 03:29:55 roc-4r-scd212 kernel: [74478.777080] ABORT_TASK:
ref_tag: 199692 already complete, skipping
Apr 19 03:29:55 roc-4r-scd212 kernel: [74478.777082] ABORT_TASK:
Sending TMR_TASK_DOES_NOT_EXIST for ref_tag: 199692
Apr 19 03:29:55 roc-4r-scd212 kernel: [74478.777085] ABORT_TASK: Found
referenced iSCSI task_tag: 199690
Apr 19 03:29:55 roc-4r-scd212 kernel: [74478.777087] ABORT_TASK:
ref_tag: 199690 already complete, skipping
Apr 19 03:29:55 roc-4r-scd212 kernel: [74478.777089] ABORT_TASK:
(Continue reading)

Akinobu Mita | 21 Apr 01:36 2015
Picon

[PATCH 0/4] target: Fix several problems related to T10-PI support

This patchset aims to fix several problems related to T10-PI support.

These patches can be applied on top of Sagi's "[v1] Simlify dif_verify
routines and fixup fileio protection information code" patchset.

Akinobu Mita (4):
  target: ensure se_cmd->t_prot_sg is allocated when required
  target: Abandon odd SG mapping for data transfer memory
  target: Fix sbc_dif_generate() for WRITE SAME
  target/file: enable WRITE SAME when protection info is enabled

 drivers/target/target_core_file.c      | 13 +++++----
 drivers/target/target_core_sbc.c       | 40 ++++++++++++++++++++++++--
 drivers/target/target_core_transport.c | 51 ++++++++++++++++++++--------------
 include/target/target_core_backend.h   |  2 +-
 include/target/target_core_base.h      |  1 +
 5 files changed, 78 insertions(+), 29 deletions(-)

Cc: Nicholas Bellinger <nab <at> linux-iscsi.org>
Cc: Sagi Grimberg <sagig <at> mellanox.com>
Cc: "Martin K. Petersen" <martin.petersen <at> oracle.com>
Cc: Christoph Hellwig <hch <at> lst.de>
Cc: "James E.J. Bottomley" <James.Bottomley <at> HansenPartnership.com>
Cc: target-devel <at> vger.kernel.org
Cc: linux-scsi <at> vger.kernel.org
--

-- 
1.9.1

Christoph Hellwig | 20 Apr 15:00 2015
Picon

[PATCH] target: fix DPO and FUA bit checks

Drivers may override the WCE flag, in which case the DPOFUA flag in
MODE SENSE might differ from the check used to reject invalid FUA
bits in sbc_check_dpofua.  Also now that we reject invalid FUA
bits early there is no need to duplicate the same buggy check
down in the fileio code.

As the DPOFUA flag controls th support for FUA bits on read and
write commands as well as DPO key off all the checks off a single
helper, and deprecate the emulate_dpo and emulate_fua_read attributs.

This fixes various failures in the libiscsi testsuite.

Personally I'd prefer to also remove the emulate_fua_write attribute
as there is no good reason to disable it, but I'll leave that for
a separate discussion.

Signed-off-by: Christoph Hellwig <hch <at> lst.de>
---
 drivers/target/target_core_device.c    | 30 +++++++-----------------------
 drivers/target/target_core_file.c      |  4 +---
 drivers/target/target_core_internal.h  |  2 ++
 drivers/target/target_core_sbc.c       |  6 +++---
 drivers/target/target_core_spc.c       | 25 ++++++++-----------------
 drivers/target/target_core_transport.c | 19 +++++++++++++++++++
 include/target/target_core_base.h      |  6 ------
 7 files changed, 40 insertions(+), 52 deletions(-)

diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c
index 58f49ff..61473d7 100644
--- a/drivers/target/target_core_device.c
(Continue reading)

Christophe Vu-Brugier | 19 Apr 22:18 2015

[PATCH 0/1] iscsi-target: remove support for obsolete markers

Some time ago, I documented the iSCSI target login parameters in
targetcli-fb and learned that the Fixed Interval Marker keys
(IFMarker, OFMarker, IFMarkInt, OFMarkInt) are obsolete according to
RFC 7143.

From http://tools.ietf.org/html/rfc7143#section-13.25:

  13.25.  Obsoleted Keys

  This document obsoletes the following keys defined in [RFC3720]:
  IFMarker, OFMarker, OFMarkInt, and IFMarkInt.  However, iSCSI
  implementations compliant to this document may still receive these
  obsoleted keys -- i.e., in a responder role -- in a text negotiation.

  When an IFMarker or OFMarker key is received, a compliant iSCSI
  implementation SHOULD respond with the constant "Reject" value.  The
  implementation MAY alternatively respond with a "No" value.

  However, the implementation MUST NOT respond with a "NotUnderstood"
  value for either of these keys.

  When an IFMarkInt or OFMarkInt key is received, a compliant iSCSI
  implementation MUST respond with the constant "Reject" value.  The
  implementation MUST NOT respond with a "NotUnderstood" value for
  either of these keys.

Out of curiosity, I tried to enable markers in LIO and found that
support for markers is currently broken. With kernel debugging
enabled, I see the following messages in `dmesg`:

(Continue reading)

Sagi Grimberg | 19 Apr 19:27 2015

[v1] Simlify dif_verify routines and fixup fileio protection information code

Hey All,

This set follows the patchset from Akinobu Mita that addresses
DIF bounce buffer sgl construction. Instead of trying to fix these
bugs, this removes it altogether and work with cmd->t_prot_sg
directly.

The first patch is a simplification of the DIF verify varius
routines leaving a single generic sbc_dif_verify that handles
the protection information sgl we are working on.

The second patch uses this simplification to remove the local
prot_fd bounce buffer altogether.

Changes from v0:
- Added a third patch to fix map/unmap consistency in sbc_dif_verify.

Sagi Grimberg (3):
  target: Merge sbc_verify_dif_read|write
  target/file: Remove fd_prot bounce buffer
  target/sbc: Fix sbc_dif_verify inconsistent map/unmap

 drivers/target/target_core_file.c      |  140 +++++++-------------------------
 drivers/target/target_core_file.h      |    6 --
 drivers/target/target_core_rd.c        |   20 +++--
 drivers/target/target_core_sbc.c       |  118 ++++-----------------------
 drivers/target/target_core_transport.c |   17 ++--
 include/target/target_core_backend.h   |    8 +-
 6 files changed, 74 insertions(+), 235 deletions(-)

(Continue reading)

Dan Carpenter | 15 Apr 21:10 2015
Picon

re: target: Ensure that sess_prot_type is saved across session restart

Hello Nicholas Bellinger,

This is a semi-automatic email about new static checker warnings.

The patch 4f60d4039357: "target: Ensure that sess_prot_type is saved
across session restart" from Apr 14, 2015, leads to the following
Smatch complaint:

drivers/target/target_core_transport.c:349 __transport_register_session()
	 warn: variable dereferenced before check 'se_nacl' (see line 341)

drivers/target/target_core_transport.c
   340		else if (tfo->tpg_check_prot_fabric_only)
   341			se_sess->sess_prot_type = se_nacl->saved_prot_type =
                                                  ^^^^^^^^^^^^^^^^^^^^^^^^
New dereferences.

   342					tfo->tpg_check_prot_fabric_only(se_tpg);
   343		/*
   344		 * Used by struct se_node_acl's under ConfigFS to locate active se_session-t
   345		 *
   346		 * Only set for struct se_session's that will actually be moving I/O.
   347		 * eg: *NOT* discovery sessions.
   348		 */
   349		if (se_nacl) {
                    ^^^^^^^
Existing code has a check for NULL.

   350			/*
   351			 * If the fabric module supports an ISID based TransportID,
(Continue reading)


Gmane