Nicholas A. Bellinger | 19 Dec 11:06 2014

[GIT PULL] target updates for v3.19-rc1

Hello Linus,

Here are the target-pending updates for v3.19-rc1 code.  Please go ahead
and pull from:

  git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git for-next

The highlights this merge window include:

  - Allow target fabric drivers to function as built-in. (Roland)
  - Fix tcm_loop multi-TPG endpoint nexus bug. (Hannes)
  - Move per device config_item_type into se_subsystem_api, allowing
    configfs attributes to be defined at module_init time. (Jerome + nab)
  - Convert existing IBLOCK/FILEIO/RAMDISK/PSCSI/TCMU drivers to use
    external configfs attributes. (nab)
  - A number of iser-target fixes related to active session + network portal
    shutdown stability during extended stress testing. (Sagi + Slava)
  - Dynamic allocation of T10-PI contexts for iser-target, fixing a potentially
    bogus iscsi_np->tpg_np pointer reference in >= v3.14 code. (Sagi)
  - iser-target performance + scalability improvements.  (Sagi) 
  - Fixes for SPC-4 Persistent Reservation AllRegistrants spec compliance.
    (Ilias + James + nab)
  - Avoid potential short kern_sendmsg() in iscsi-target for now until Al's
    conversion to use msghdr iteration is merged post -rc1. (Viro)

Also, Sagi has requested a number of iser-target patches (9) that
address stability issues he's encountered during extended stress testing
be considered for v3.10.y + v3.14.y code.  Given the amount of LOC
involved, it will certainly require extra backporting effort.

(Continue reading)

Nicholas A. Bellinger | 19 Dec 01:40 2014

[PATCH] target: Allow AllRegistrants to re-RESERVE existing reservation

From: Nicholas Bellinger <nab <at> linux-iscsi.org>

This patch changes core_scsi3_pro_release() logic to allow an
existing AllRegistrants type reservation to be re-reserved by
any registered I_T nexus.

This addresses a issue where AllRegistrants type RESERVE was
receiving RESERVATION_CONFLICT status if dev_pr_res_holder did
not match the same I_T nexus, instead of just returning GOOD
status following spc4r34 Section 5.9.9:

"If the device server receives a PERSISTENT RESERVE OUT command
 with RESERVE service action where the TYPE field and the SCOPE
 field contain the same values as the existing type and scope
 from a persistent reservation holder, it shall not make any
 change to the existing persistent reservation and shall complete
 the command with GOOD status."

Reported-by: Ilias Tsitsimpis <i.tsitsimpis <at> gmail.com>
Cc: Ilias Tsitsimpis <i.tsitsimpis <at> gmail.com>
Cc: Lee Duncan <lduncan <at> suse.com>
Cc: James Bottomley <James.Bottomley <at> HansenPartnership.com>
Signed-off-by: Nicholas Bellinger <nab <at> linux-iscsi.org>
---
 drivers/target/target_core_pr.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c
index 703890c..f75a4ba 100644
--- a/drivers/target/target_core_pr.c
(Continue reading)

Tommy Apel | 18 Dec 20:50 2014
Picon

targetcli and ipv6

Hello All,
how come I cannot use ipv6 adresses such as link-local and private
ipv6 within targetcli ?

/iscsi/iqn.20.../tpg1/portals> create fe80::f652:1403:7f:3041
Using default IP port 3260
IP address does not exist: fe80::f652:1403:7f:3041

/iscsi/iqn.20.../tpg1/portals> create fe00::f652:1403:7f:3041
Using default IP port 3260
IP address does not exist: fe00::f652:1403:7f:3041

4: ib0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 2044 qdisc pfifo_fast
state UP qlen 256
    link/infiniband
80:00:00:48:fe:80:00:00:00:00:00:00:f4:52:14:03:00:7f:30:41 brd
00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff
    inet6 fe00::f652:1403:7f:3041/7 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::f652:1403:7f:3041/64 scope link
       valid_lft forever preferred_lft forever

--

-- 

/Tommy
Sagi Grimberg | 15 Dec 14:08 2014

[PATCH] iscsi-target: nullify session in failed login sequence

In case login sequence failed, make sure conn->sess is
NULL before calling wait_conn as some transports (iser)
may rely on that (waiting for session commands).

Signed-off-by: Sagi Grimberg <sagig <at> mellanox.com>
---
 drivers/target/iscsi/iscsi_target_login.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c
index 18e2601..713c0c1 100644
--- a/drivers/target/iscsi/iscsi_target_login.c
+++ b/drivers/target/iscsi/iscsi_target_login.c
 <at>  <at>  -1159,6 +1159,7  <at>  <at>  void iscsi_target_login_sess_out(struct iscsi_conn *conn,
 	}
 	kfree(conn->sess->sess_ops);
 	kfree(conn->sess);
+	conn->sess = NULL;

 old_sess_out:
 	iscsi_stop_login_thread_timer(np);
--

-- 
1.7.1

Dax Kelson | 11 Dec 01:05 2014

RHEL7 vs SLES12 targetcli brain damage

This is my first time trying to use targetcli on SLES12. I have quite
a bit of experience with it on Fedora and RHEL7. I'm trying to setup
an iSCSI target configuration that behaves identical no matter if is
on RHEL7 or SLES12. To me at least, ideally I could just plop down a
/etc/target/saveconfig.json on both and enable service and be done.
This unfortunately is not the case.

RHEL7 (targetcli-2.1.fb34-1.el7.noarch)  :

/iscsi/iqn.19...station3/tpg1> get auth <TAB><TAB>
mutual_password  mutual_userid    password         userid
........................................parameter

SLES12 (targetcli-2.1-3.8.x86_64):

/iscsi/iqn.19...station3/tpg1> get auth <TAB><TAB>
authenticate_target  password             password_mutual      userid
             userid_mutual
........................................parameter

In case it isn't clear the problem is

mutual_password vs password_mutual
mutual_userid vs userid_mutual

Also on SLES12, this command silently fails:

/> /backstores/fileio create name=t1 file_or_dev=/srv/iscsi-luns/station1

/> ls /backstores/fileio
(Continue reading)

Noah Watkins | 10 Dec 20:10 2014
Picon

github pull request: fix aarch64 eth detection

There is a pull request for rtslib that fixes machine detection on aarch64 (rtslib-fb doesn’t have this issue)

   https://github.com/Datera/rtslib/pull/4

Thanks,
Noah

From 20b5f83017cccda060f4495f9c55e971a4ed4db6 Mon Sep 17 00:00:00 2001
From: Noah Watkins <noahwatkins <at> gmail.com>
Date: Wed, 10 Dec 2014 10:56:47 -0800
Subject: [PATCH] util: support aarch64

On aarch64 uname()[4] doesn't contain the underscore:

nwatkins <at> node-1:~$ uname -m
aarch64

Signed-off-by: Noah Watkins <noahwatkins <at> gmail.com>
---
 rtslib/utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rtslib/utils.py b/rtslib/utils.py
index 6974235..901de1b 100644
--- a/rtslib/utils.py
+++ b/rtslib/utils.py
 <at>  <at>  -619,7 +619,7  <at>  <at>  def list_eth_names(max_eth=1024):
     struct.
     '''
     SIOCGIFCONF = 0x8912
(Continue reading)

Ilias Tsitsimpis | 10 Dec 17:36 2014
Picon

Unregistering while holding an All Registrants PR

Hi all,

I am trying out Linux SCSI Target and it seems that the way persistent
reservations are handled does not conform with SPC-4.
SPC4r17 (5.7.10) states that:

    The persistent reservation holder is determined by the type of the
    persistent reservation as follows:
    a) For a persistent reservation of the type Write Exclusive – All
    Registrants or Exclusive Access – All Registrants, the persistent
    reservation holder is any registered I_T nexus;

While Table 51 states that:

    'Write Exclusive – All Registrants' or 'Exclusive Access – All
    Registrants' reservations shall be released when the registration
    for the last registered I_T nexus is removed or when the type or
    scope is changed.

This doesn't seem to be the case with Linux SCSI Target. More
particularly, I have set up an iSCSI target, using the Linux SCSI Target
implementation, and I am connecting to it through two different VMs
using the open-iscsi project.

    root <at> node1:~# sg_inq /dev/sda 
    standard INQUIRY:
      PQual=0  Device_type=0  RMB=0  version=0x05  [SPC-3]
      [AERC=0]  [TrmTsk=0]  NormACA=0  HiSUP=0  Resp_data_format=2
      SCCS=1  ACC=0  TPGS=3  3PC=1  Protect=0  BQue=0
      EncServ=0  MultiP=0  [MChngr=0]  [ACKREQQ=0]  Addr16=0
(Continue reading)

Noah Watkins | 10 Dec 01:22 2014
Picon

EADDRINUSE setting up iSCSI portal on aarch64

Hi, I’m trying to debug a problem setting up an iSCSI target portal on aarch64. I’m seeing -EADDRINUSE
when I create the portal:

  /> iscsi/iqn.2003-01.org.linux-iscsi.node-1.aarch64:sn.e2e690850a04/tpg1/portals create 10.10.1.2
  Using default IP port 3260
  Could not create NetworkPortal in configFS

and dmesg shows:

[ 5314.246743] kernel_bind() failed: -98

The NIC has two ports, and I’ve tried both. I don’t have any reason to think that there is any user of the
port I’m trying to bind to.

System:

Linux node-1.nwatkins-qv1006.emulab-net.utah.cloudlab.us 3.13.0-40-generic #69-Ubuntu SMP Thu
Nov 13 19:05:44 UTC 2014 aarch64 aarch64 aarch64 GNU/Linux

[   21.142153] mlx4_en: Mellanox ConnectX HCA Ethernet driver v2.2-1 (Feb 2014)
01:00.0 Ethernet controller: Mellanox Technologies MT27520 Family [ConnectX-3 Pro]

Software:

The *-fb version of targetcli

Sagi Grimberg | 7 Dec 12:11 2014

[PATCH v4 00/35] iser target for 3.19

Hey Nic,

So I figured it would be easier to just resend the series with the small fixup
instead of sending the specific bits and generating you some extra overhead.

Changes from v3:
- Fixed the logging changes wrong squash (patch 32).
- Removed unneeded (at this point) patch: "Don't clear transport private cmd context"
- Added a warning fix by nab

Nicholas Bellinger (1):
  iser-target: Fix wc->wr_id cast warning

Sagi Grimberg (34):
  iscsi-target: Add call to wait_conn in establishment error flow
  iser-target: Destroy the connection when getting a connect error
    event
  iser-target: Initiate connection termination only once
  iser-target: Don't deffer disconnected handler to a work
  iser-target: Reject connect request in failure path
  iser-target: Introduce ISER_CONN_FULL_FEATURE state
  iser-target: Parallelize CM connection establishment
  iser-target: Use kref_get_unless_zero in connected_handler
  iser-target: Acquire conn_mutex when changing connection state
  iser-target: Don't override cm_id context
  iser-target: Move cma_id setup to a function
  iser-target: Handle ADDR_CHANGE event for listener cm_id
  iser-target: Deffer the last part of wait_conn to a work
  iser-target: Decrement completion context active_qps in error flow
  iser-target: Move PI context allocation to a function
(Continue reading)

Sagi Grimberg | 2 Dec 15:57 2014

[PATCH v3 00/34] iser target for 3.19

Hey Nic & Co,

Addressed comments from Or Gerlitz.

This series mainly consists of:

Patches 1-14: Some error flow fixes for live target stack shutdown
	and cable pull with stress IO scenarios, as well as some
	fixes in the area of bond failover scenarios.
	(stable 3.10+ material)

Patches 15-19: expose t10_pi attribute correctly and fix a crash
	due to a bad dereference.
	(stable 3.15+ material)

Patch 20: Workaround for live target stack unload in the presence
	of multiple (60+) of active sessions.

Patches 21-29: Some completion processing modifications done for
	simplification and enhancements.

Patches 30-31: Some more fixes needed in the live shutdown case.

Patches 32-33: Some logging refactoring. It is much easier to
	instruct a user to increase the log level in this case.

Patch 34: Nit - remove code duplication.

While this set makes things better, there is still some work
left to do especially in the area of multi-session error flows.
(Continue reading)

Nicholas A. Bellinger | 2 Dec 08:19 2014

[PATCH-3.14.y 0/2] iscsi-target: Stable backports

From: Nicholas Bellinger <nab <at> linux-iscsi.org>

Hi Greg-KH,

Here are two upstream bugfixes that where missing from v3.14.y.

Thank you,

--nab

Nicholas Bellinger (1):
  iser-target: Disable TX completion interrupt coalescing

Sagi Grimberg (1):
  Target/iser: Fix a wrong dereference in case discovery session is over
    iser

 drivers/infiniband/ulp/isert/ib_isert.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--

-- 
1.8.5.3


Gmane