Re: [PATCH -next] scsi: iscsi: Remove unused extern declaration iscsi_lookup_iface()

2023-07-25 Thread Chris Leech
On Tue, Jul 25, 2023 at 10:15:31PM +0800, YueHaibing wrote: > This is not used anymore, so can be removed. > > Signed-off-by: YueHaibing Thanks, Reviewed-by: Chris Leech -- You received this message because you are subscribed to the Google Groups "open-iscsi" group.

Re: [PATCH v1 2/2] scsi: iscsi: Add strlen check in iscsi_if_set_{host}_param

2023-07-25 Thread Chris Leech
OOB read for those string handling > functions. Reviewed-by: Chris Leech -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscr...@google

Re: [PATCH v2 1/2] scsi: iscsi: Add length check for nlattr payload

2023-07-25 Thread Chris Leech
ithout any checks. Thank you for doing the code review on this, I think these changes look good. Reviewed-by: Chris Leech -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it,

Re: [PATCH v2] scsi: iscsi: kfree_sensitive() in iscsi_session_free()

2023-07-19 Thread Chris Leech
session->username_in. > > Signed-off-by: Minjie Du This looks good, thank you for the follow up to Mike's review. Reviewed-by: Chris Leech > --- > drivers/scsi/libiscsi.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/scsi/libiscsi.

Re: [PATCH net-next v5 11/16] scsi: iscsi_tcp: Use sendmsg(MSG_SPLICE_PAGES) rather than sendpage

2023-06-27 Thread Chris Leech
On Fri, Jun 23, 2023 at 11:55:08PM +0100, David Howells wrote: > Use sendmsg() with MSG_SPLICE_PAGES rather than sendpage. This allows > multiple pages and multipage folios to be passed through. > > Signed-off-by: David Howells > Reviewed-by: Mike Christie > cc: Lee Duncan

[PATCH 11/11] iscsi: force destroy sesions when a network namespace exits

2023-05-06 Thread Chris Leech
The namespace is gone, so there is no userspace to clean up. Force close all the sessions. This should be enough for software transports, there's no implementation of migrating physical iSCSI hosts between network namespaces currently. Reviewed-by: Hannes Reinecke Signed-off-by: Chris Leech

[PATCH 09/11] iscsi: filter flashnode sysfs by net namespace

2023-05-06 Thread Chris Leech
From: Lee Duncan This finishes the net namespace support for flashnode sysfs devices. Signed-off-by: Lee Duncan Reviewed-by: Hannes Reinecke Signed-off-by: Chris Leech --- drivers/scsi/scsi_transport_iscsi.c | 34 + include/scsi/scsi_transport_iscsi.h | 4

[PATCH 08/11] iscsi: rename iscsi_bus_flash_* to iscsi_flash_*

2023-05-06 Thread Chris Leech
From: Lee Duncan These are cleanups after the bus to class conversion for flashnode devices. Signed-off-by: Lee Duncan Reviewed-by: Hannes Reinecke Signed-off-by: Chris Leech --- drivers/scsi/qla4xxx/ql4_os.c | 52 +++--- drivers/scsi/scsi_transport_iscsi.c | 102

[PATCH 04/11] iscsi: make all iSCSI netlink multicast namespace aware

2023-05-06 Thread Chris Leech
Reinecke Signed-off-by: Chris Leech --- drivers/scsi/scsi_transport_iscsi.c | 92 +++-- 1 file changed, 60 insertions(+), 32 deletions(-) diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index 814aef6da4a3..0249c6d889c4 100644

[PATCH 05/11] iscsi: check net namespace for all iscsi lookup

2023-05-06 Thread Chris Leech
From: Lee Duncan All internal lookups of iSCSI transport objects need to be filtered by net namespace. Signed-off-by: Lee Duncan Reviewed-by: Hannes Reinecke Signed-off-by: Chris Leech --- drivers/infiniband/ulp/iser/iscsi_iser.c | 5 +- drivers/scsi/be2iscsi/be_iscsi.c | 4

[PATCH 07/11] iscsi: convert flashnode devices from bus to class

2023-05-06 Thread Chris Leech
Duncan Reviewed-by: Hannes Reinecke Signed-off-by: Chris Leech --- drivers/scsi/qla4xxx/ql4_os.c | 2 +- drivers/scsi/scsi_transport_iscsi.c | 36 - include/scsi/scsi_transport_iscsi.h | 2 ++ 3 files changed, 18 insertions(+), 22 deletions(-) diff --git a/drivers

[PATCH 10/11] iscsi: make session and connection lists per-net

2023-05-06 Thread Chris Leech
Eliminate the comparisions on list lookups, and it will make it easier to shut down session on net namespace exit in the next patch. Reviewed-by: Hannes Reinecke Signed-off-by: Chris Leech --- drivers/scsi/scsi_transport_iscsi.c | 104 1 file changed, 61 insertions

[PATCH 01/11] iscsi: create per-net iscsi netlink kernel sockets

2023-05-06 Thread Chris Leech
From: Lee Duncan Prepare iSCSI netlink to operate in multiple namespaces. Signed-off-by: Lee Duncan Reviewed-by: Hannes Reinecke Signed-off-by: Chris Leech --- drivers/scsi/scsi_transport_iscsi.c | 73 + 1 file changed, 63 insertions(+), 10 deletions(-) diff

[PATCH 02/11] iscsi: associate endpoints with a host

2023-05-06 Thread Chris Leech
and sessions, so we need to keep compatibility with virtual device paths and not always expect a parent host. Signed-off-by: Lee Duncan Signed-off-by: Chris Leech --- drivers/infiniband/ulp/iser/iscsi_iser.c | 2 +- drivers/scsi/be2iscsi/be_iscsi.c | 2 +- drivers/scsi/bnx2i/bnx2i_iscsi.c

[PATCH 06/11] iscsi: set netns for tcp and iser hosts

2023-05-06 Thread Chris Leech
with sessions for iscsi_tcp. Signed-off-by: Chris Leech --- drivers/infiniband/ulp/iser/iscsi_iser.c | 56 ++-- drivers/scsi/iscsi_tcp.c | 15 +++--- drivers/scsi/libiscsi.c | 16 ++ drivers/scsi/scsi_transport_iscsi.c | 66

[PATCH v2 00/11] Make iscsid-kernel communications namespace-aware

2023-05-06 Thread Chris Leech
removal of sessions on namespace exit. Chris Leech, Lee Duncan (11): iscsi: create per-net iscsi netlink kernel sockets iscsi: associate endpoints with a host iscsi: sysfs filtering by network namespace iscsi: make all iSCSI netlink multicast namespace aware iscsi: check net namespace

[PATCH 03/11] iscsi: sysfs filtering by network namespace

2023-05-06 Thread Chris Leech
Reviewed-by: Hannes Reinecke Signed-off-by: Chris Leech --- drivers/scsi/scsi_transport_iscsi.c | 127 include/scsi/scsi_transport_iscsi.h | 1 + 2 files changed, 113 insertions(+), 15 deletions(-) diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi

Re: [RFC PATCH 2/9] iscsi: associate endpoints with a host

2023-04-20 Thread Chris Leech
more with iSER. I'm going to look into that, then I'll merge some of these patches that fix earlier patches together, and get a new clean version of the set posted. Chris Leech (3): iscsi iser: fix iser, allow virtual endpoints again iscsi iser: direct network namespace support for endpoints

[PATCH] iscsi iser: fix iser, allow virtual endpoints again

2023-04-20 Thread Chris Leech
iSER creates endpoints before hosts and sessions, so we need to keep compatibility with virtual device paths and not always expect a parent host. Signed-off-by: Chris Leech --- drivers/scsi/scsi_transport_iscsi.c | 9 ++--- include/scsi/scsi_transport_iscsi.h | 3 ++- 2 files changed, 8

[PATCH] iscsi iser: direct network namespace support for endpoints

2023-04-20 Thread Chris Leech
Split endpoint creation into host-bound and with a specified namespace, for iSER's unique use of enpoint objects + virtual host-per-session. This is much like was done with sessions already for iscsi_tcp. Signed-off-by: Chris Leech --- drivers/infiniband/ulp/iser/iscsi_iser.c | 6

[PATCH] iscsi iser: enable network namespace awareness in iser

2023-04-20 Thread Chris Leech
Move the logic to store the network namespace during virtual host creation (due to the way transport-class object setup callbacks function) from iscsi_tcp into libiscsi, and share it with iser. Signed-off-by: Chris Leech --- drivers/infiniband/ulp/iser/iscsi_iser.c | 7 ++- drivers/scsi

Re: [RFC PATCH 2/9] iscsi: associate endpoints with a host

2023-04-20 Thread Chris Leech
ted for when it is created. > > Signed-off-by: Chris Leech > Signed-off-by: Lee Duncan > --- > > diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c > b/drivers/infiniband/ulp/iser/iscsi_iser.c > index 6b7603765383..212fa7aa9810 100644 > --- a/drivers/infiniband/ulp/iser/iscs

Re: [RFC PATCH 2/9] iscsi: associate endpoints with a host

2023-04-11 Thread Chris Leech
On Tue, Mar 14, 2023 at 05:23:26PM +0100, Hannes Reinecke wrote: > On 2/8/23 18:40, Lee Duncan wrote: > > From: Lee Duncan > > @@ -230,6 +230,7 @@ iscsi_create_endpoint(int dd_size) > > ep->id = id; > > ep->dev.class = _endpoint_class; > > + ep->dev.parent = >shost_gendev; > >

Re: [PATCH 11/11] iscsi: force destroy sesions when a network namespace exits

2023-04-11 Thread Chris Leech
On Tue, Apr 11, 2023 at 08:21:22AM +0200, Hannes Reinecke wrote: > On 4/10/23 21:10, Chris Leech wrote: > > The namespace is gone, so there is no userspace to clean up. > > Force close all the sessions. > > > > This should be enough for software transports

Re: [RFC PATCH 5/9] iscsi: set netns for iscsi_tcp hosts

2023-04-11 Thread Chris Leech
On Tue, Apr 11, 2023 at 08:58:54AM +0200, Hannes Reinecke wrote: > On 4/11/23 02:21, Chris Leech wrote: > > diff --git a/include/scsi/scsi_transport_iscsi.h > > b/include/scsi/scsi_transport_iscsi.h > > index 0c3fd690ecf8..4d8a3d770bed 100644 > > --- a/include/

Re: [RFC PATCH 5/9] iscsi: set netns for iscsi_tcp hosts

2023-04-10 Thread Chris Leech
work namespace into the unbound session creation of iscsi_tcp, without changing the offloading drivers which all expect an bound endpoint. iSER has compatibility checks to work without a bound endpoint, so expose both transport functions there. Signed-off-by: Chris Leech --

[PATCH 10/11] iscsi: make session and connection lists per-net

2023-04-10 Thread Chris Leech
Eliminate the comparisions on list lookups, and it will make it easier to shut down session on net namespace exit in the next patch. Signed-off-by: Chris Leech --- drivers/scsi/scsi_transport_iscsi.c | 104 1 file changed, 61 insertions(+), 43 deletions(-) diff

[PATCH 11/11] iscsi: force destroy sesions when a network namespace exits

2023-04-10 Thread Chris Leech
The namespace is gone, so there is no userspace to clean up. Force close all the sessions. This should be enough for software transports, there's no implementation of migrating physical iSCSI hosts between network namespaces currently. Signed-off-by: Chris Leech --- drivers/scsi

Re: [RFC PATCH 4/9] iscsi: make all iSCSI netlink multicast namespace aware

2023-04-10 Thread Chris Leech
n the namespace exits. Tested with iscsi_tcp and seems to be working for me. Chris Leech (2): iscsi: make session and connection lists per-net iscsi: force destroy sesions when a network namespace exits drivers/scsi/scsi_transport_iscsi.c | 122 ++-- 1 file changed

Re: [RFC 0/9] Make iscsid-kernel communications namespace-aware

2023-02-08 Thread Chris Leech
iscsid can >> run in containers. >> >> Comments and suggestions are more than welcome. I do not >> expect that this code is production-ready yet, and >> networking isn't my strongest suit (yet). >> >> These patches were originally posted in 2015 by Chris >>

Re: open-iscsi service iscsi-init can run too early, when FS is read-only

2022-02-17 Thread Chris Leech
On Thu, Feb 17, 2022 at 10:42 AM 'Lee Duncan' via open-iscsi wrote: > > Hi All: > > There is an iscsi service that does nothing but create the > initiatorname.iscsi file in /etc/iscsi if it does not yet exist called > iscsi-init.service. > > For iscsi boot situations, this service can run quite

Re: iSCSI initiator setting max_sectors_kb=4 when target optimal_io_size=4096

2021-12-08 Thread Chris Leech
Hi Alexis, I was just taking a look at the issue you opened with Red Hat about this. It appears to me that the sd driver for all SCSI disks is setting the max_sectors limit for the queue to the optimal transfer length when sanely reported. So the SCSI disk driver is limiting to the optimal

Re: [PATCH] scsi: libiscsi: select CRYPTO_HASH for ISCSI_TCP

2021-10-15 Thread Chris Leech
ell? (apologies for the HTML reply that got rejected by the lists, and the double reply to those directly addressed) Are Kconfig entries for libiscsi and libiscsi_tcp needed to handle this properly? Currently they're added to the object lists with each configured driver that requires them. I'm not even

Re: [PATCH] scsi: libiscsi: select CRYPTO_HASH for ISCSI_TCP

2021-10-15 Thread Chris Leech
the Makefile and wrongly assumed that CONFIG_ISCSI_TCP was > missing the select. > > I'm not sure what the right fix here would be -- should > CONFIG_SCSI_CXGB[34]_ISCSI depend on CONFIG_ISCSI_TCP..? Or should we > add those CRYPTO* selects in there as well? > Are Kco

Re: [PATCH] iscsi: fall back to sendmsg for slab pages

2019-03-06 Thread Chris Leech
such requests from sednpage to sendmsg path. > The problem is similar to one described in recent commit 7e241f647dc7 > ("libceph: fall back to sendmsg for slab pages") > > Signed-off-by: Vasily Averin This seems reasonable to me, I'm relying on Vasily's testing for now b

Re: RFC: open-iscsi summit?

2018-06-14 Thread Chris Leech
On Thu, Jun 14, 2018 at 07:55:15AM -0700, The Lee-Man wrote: > I think the idea is a good one. I also think we might get more feedback > from others if we contact them directly, i.e. I will assume some of them > would be interested in coming but do not read this list regularly. > > So the next

Re: [PATCH 0/4] libopeniscsiusr iface record fixes

2018-06-14 Thread Chris Leech
On Wed, Jun 13, 2018 at 08:25:41AM -0700, Chris Leech wrote: > In testing the latest code against a variety of iSCSI HBAs, I found some > regressions in the iface handling after merging the libopeniscsiusr > code. > > Chris Leech (4): > libopeniscsiusr: fixes

[PATCH 2/3] iscsid logging blank messages at level EMERG

2018-06-13 Thread Chris Leech
reset head on wrap when buffer empty Reported-By: David Jeffery --- usr/log.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr/log.c b/usr/log.c index 26c61d847793..b730642779bf 100644 --- a/usr/log.c +++ b/usr/log.c @@ -189,6 +189,9 @@ int log_enqueue (int prio, const char * fmt,

[PATCH 1/3] vlan setting sync across ipv4/ipv6 for be2iscsi

2018-06-13 Thread Chris Leech
be2iscsi exports two ifaces per host port for ipv4 and ipv6 network configurations. But, they need to have the same link level configuration including vlan settings. If vlan setting are modified in only one iface record, then whichever record is applied last (filesystem dependant I think) will

[PATCH 0/3] various fixes

2018-06-13 Thread Chris Leech
A few things, some of which I thought I'd already sent/merged upstream. Chris Leech (3): vlan setting sync across ipv4/ipv6 for be2iscsi iscsid logging blank messages at level EMERG iscsistart: prevent unix socket cross-talk usr/iscsiadm.c | 132

[PATCH 3/3] iscsistart: prevent unix socket cross-talk

2018-06-13 Thread Chris Leech
iscsistart forks two processes and acts as both iscsiadm and iscsid, sending commands to itself over a unix socket. If multiple iscsistart processes are running, or iscsistart and iscsid are both running, the front-end portions can end up communicating to the wrong back-end. Adjust the unix

[PATCH 4/4] libopeniscsiusr: setup ipv6 records based on iface name

2018-06-13 Thread Chris Leech
The is_ipv6 flag (runtime iface rec representation only, not on disk) was being set when creating ifaces from sysfs, but not when reading them in from an iface record file. This caused ipv6 iface records to be reported as malformed and ignored. Fix that with a name check for an "ipv6" substring.

[PATCH 1/4] libopeniscsiusr: fixes err on prefix_len

2018-06-13 Thread Chris Leech
The iface.prefix_len field might be present in existing records created with older versions of the Open-iSCSI tools. Need to not start throwing errors after an update. --- libopeniscsiusr/idbm.c| 2 ++ libopeniscsiusr/idbm_fields.h | 1 + libopeniscsiusr/iface.h | 6 +- 3 files

[PATCH 0/4] libopeniscsiusr iface record fixes

2018-06-13 Thread Chris Leech
In testing the latest code against a variety of iSCSI HBAs, I found some regressions in the iface handling after merging the libopeniscsiusr code. Chris Leech (4): libopeniscsiusr: fixes err on prefix_len libopeniscsiusr: hosts can have multiple ifaces libopeniscsiusr: clear errno before

[PATCH 2/4] libopeniscsiusr: hosts can have multiple ifaces

2018-06-13 Thread Chris Leech
Both be2iscsi and qla4xxx export multiple iface ojbects in sysfs per host to represent the number of network configurations (ipv4/ipv6) that can be supported. Fix the libopeniscsiusr code to create and manage multiple offload iface records per host, as the old code did. ---

Re: RFC: open-iscsi summit?

2018-05-31 Thread Chris Leech
On Tue, May 15, 2018 at 01:25:34PM -0700, The Lee-Man wrote: > Hi All: > > I have been thinking that, with all the new development going on in Linux > and in our own open-iscsi community, that a summit would be a good idea. > > It turns out both Chris and I live in the Northwest US (near

libopeniscsiusr iface problems

2018-05-31 Thread Chris Leech
I'm working on a patch, but just an FYI that the merge of the libopeniscsiusr iface support into iscsiadm has broken iface record writing from kernel sysfs information for be2iscsi and qla4xxx. There's an assumtion of 1:1 host to iface, which just isn't true. be2iscsi creates one each for ipv4

Re: possible data corruption with iscsi_tcp and dm-multipath

2018-04-12 Thread Chris Leech
On Thu, Apr 12, 2018 at 09:43:34AM -0700, donald...@gmail.com wrote: > Hi Chris. > > Have you confirmed this is indeed data corruption that can be caused > by open-iscsi implementation? > > I am looking at using multi-path for availability purpose but if there > is risk of data corruption it is

[PATCH] iscsi: respond to netlink with unicast when appropriate

2018-04-09 Thread Chris Leech
. Signed-off-by: Chris Leech <cle...@redhat.com> --- drivers/scsi/scsi_transport_iscsi.c | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index f4b52b44b966..65f6c9

Re: unable to create portal for ipv6 address

2018-04-09 Thread Chris Leech
On Fri, Apr 06, 2018 at 09:00:50AM -0700, Vadiraj Jahagirdar wrote: > I've targetcli installed and setup. I'm unable to add ipv6 address in > portals for a particular target iQN. > There is not even a single documentation on internet about how to run iSCSI > on ipv6. > > Thanks in advance. >

Re: [PATCH] scsi: iscsi_tcp: set BDI_CAP_STABLE_WRITES when data digest enabled

2018-03-15 Thread Chris Leech
e_bounce_limit(sdev->request_queue, BLK_BOUNCE_ANY); > blk_queue_dma_alignment(sdev->request_queue, 0); > return 0; > -- Thanks for fixing this issue with data digests! Signed-off-by: Chris Leech <cle...@redhat.com> -- You received this message because yo

Re: [PATCH] scsi: scsi_transport_iscsi: use put_device() instead of kfree()

2018-03-15 Thread Chris Leech
correct? Just want to make sure that's still needed with the call to put_device. Other than that question, I this all looks good. Thanks. Signed-off-by: Chris Leech <cle...@redhat.com> -- You received this message because you are subscribed to the Google Groups "open-iscsi" grou

Re: [PATCH 2/2] libiscsi: Annotate fall-through

2018-03-06 Thread Chris Leech
On Thu, Mar 01, 2018 at 10:07:48AM -0800, Bart Van Assche wrote: > This patch avoids that building with W=1 causes the compiler to > complain about fall-through. > > Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> > Cc: Lee Duncan <ldun...@suse.com> > Cc:

Re: [PATCH 1/2] libiscsi: Annotate locking assumptions

2018-03-06 Thread Chris Leech
art.vanass...@wdc.com> > Cc: Lee Duncan <ldun...@suse.com> > Cc: Chris Leech <cle...@redhat.com> > --- > drivers/scsi/libiscsi.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c > index 15a2fef51e38.

Re: [PATCH 0/9] use network namespace for iSCSI control interfaces

2017-11-20 Thread Chris Leech
October 31, 2017 at 3:41:32 PM UTC-7, Chris Leech wrote: > > > > This series of changes makes the iSCSI netlink and sysfs control > > interfaces filtered by network namespace. This is required to run > > iscsid in any network namespace other than the initial default one. &g

Re: network namespace, netlink and sysfs changes for iSCSI (Re: [PATCH 0/9] use network namespace for iSCSI control interfaces)

2017-11-07 Thread Chris Leech
On Tue, Nov 07, 2017 at 12:45:26PM -0800, James Bottomley wrote: > On Tue, 2017-11-07 at 10:01 -0800, Chris Leech wrote: > > Hello, > > > > I have this set of changes to the iSCSI control interfaces pending > > review, but seeing as it's sysfs and netlink changes there'

network namespace, netlink and sysfs changes for iSCSI (Re: [PATCH 0/9] use network namespace for iSCSI control interfaces)

2017-11-07 Thread Chris Leech
, 2017 at 03:40:55PM -0700, Chris Leech wrote: > This series of changes makes the iSCSI netlink and sysfs control > interfaces filtered by network namespace. This is required to run > iscsid in any network namespace other than the initial default one. > > Currently the netlin

Re: [PATCH 0/9] use network namespace for iSCSI control interfaces

2017-11-07 Thread Chris Leech
, Chris Leech wrote: > This series of changes makes the iSCSI netlink and sysfs control > interfaces filtered by network namespace. This is required to run > iscsid in any network namespace other than the initial default one. > > Currently the netlink communication will fail if is

[PATCH 8/9] iscsi: rename iscsi_bus_flash_* to iscsi_flash_*

2017-10-31 Thread Chris Leech
cleanups after the bus to class conversion Signed-off-by: Chris Leech <cle...@redhat.com> --- drivers/scsi/qla4xxx/ql4_os.c | 52 +- drivers/scsi/scsi_transport_iscsi.c | 102 ++-- include/scsi/scsi_transport_iscsi.h

[PATCH 7/9] iscsi: convert flashnode devices from bus to class

2017-10-31 Thread Chris Leech
The flashnode session and connection devices should be filtered by net namespace along with the iscsi_host, but we can't do that with a bus device. As these don't use any of the bus matching functionality, they make more sense as a class device anyway. Signed-off-by: Chris Leech <

[PATCH 9/9] iscsi: filter flashnode sysfs by net namespace

2017-10-31 Thread Chris Leech
Finished the net namespace support for flashnode sysfs devices Signed-off-by: Chris Leech <cle...@redhat.com> --- drivers/scsi/scsi_transport_iscsi.c | 33 + 1 file changed, 33 insertions(+) diff --git a/drivers/scsi/scsi_transport_iscsi.c b/driver

[PATCH 6/9] iscsi: check net namespace for all iscsi lookups

2017-10-31 Thread Chris Leech
All internal lookups of iSCSI transport objects need to be filtered by net namespace. Signed-off-by: Chris Leech <cle...@redhat.com> --- drivers/infiniband/ulp/iser/iscsi_iser.c | 5 +- drivers/scsi/be2iscsi/be_iscsi.c | 4 +- drivers/scsi/bnx2i/bnx2i_iscsi.c

[PATCH 0/9] use network namespace for iSCSI control interfaces

2017-10-31 Thread Chris Leech
could be added later to allow assignment of iSCSI HBAs to network namespace, much as is done for network interfaces. Chris Leech (9): iscsi: create per-net iscsi netlink kernel sockets iscsi: associate endpoints with a host iscsi: sysfs filtering by network namespace iscsi: make all iSCSI

[PATCH 5/9] iscsi: set netns for iscsi_tcp hosts

2017-10-31 Thread Chris Leech
This lets iscsi_tcp operate in multiple namespaces. It uses current during session creation to find the net namespace, but it might be better to manage to pass it along from the iscsi netlink socket. Signed-off-by: Chris Leech <cle...@redhat.com> --- drivers/scsi/iscsi_tcp.c

[PATCH 1/9] iscsi: create per-net iscsi netlink kernel sockets

2017-10-31 Thread Chris Leech
Prepare iSCSI netlink to operate in multiple namespaces. Signed-off-by: Chris Leech <cle...@redhat.com> --- drivers/scsi/scsi_transport_iscsi.c | 67 +++-- 1 file changed, 57 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/scsi_transport_iscs

[PATCH 3/9] iscsi: sysfs filtering by network namespace

2017-10-31 Thread Chris Leech
This makes the iscsi_host, iscsi_session, iscsi_connection, iscsi_iface, and iscsi_endpoint transport class devices only visible in sysfs under a matching network namespace. The network namespace for all of these objects is tracked in the iscsi_cls_host structure. Signed-off-by: Chris Leech <

[PATCH 4/9] iscsi: make all iSCSI netlink multicast namespace aware

2017-10-31 Thread Chris Leech
Make use of the per-net netlink sockets. Responses are sent back on the same socket/namespace the request was received on. Async events are reported on the socket/namespace stored in the iscsi_cls_host associated with the event. Signed-off-by: Chris Leech <cle...@redhat.com> --- driver

Re: [PATCH] scsi: libiscsi: Convert timers to use timer_setup()

2017-10-17 Thread Chris Leech
Reviewed-by: Chris Leech <cle...@redhat.com> - Original Message - > In preparation for unconditionally passing the struct timer_list pointer to > all timer callbacks, switch to using the new timer_setup() and from_timer() > to pass the timer pointer explicitly. > >

Re: New version for open-iscsi?

2017-09-01 Thread Chris Leech
On Thu, Aug 31, 2017 at 10:41:30AM -0700, The Lee-Man wrote: > I would like to update the version of open-iscsi from 2.0.874 to 2.0.875. > > Any objections or suggestions? Sounds good to me. I'd like to do some source tree cleanups after this version update, like ditch the old kernel code.

Re: [Patch v2 2/2] libiscsi: Remove iscsi_destroy_session

2017-08-29 Thread Chris Leech
Thanks. Acked-by: Chris Leech <cle...@redhat.com> On Thu, Jul 13, 2017 at 09:11:22AM -0700, 'Khazhismel Kumykov' via open-iscsi wrote: > iscsi_session_teardown was the only user of this function. Function > currently is just short for iscsi_remove_session + iscsi_free_session. >

Re: [Patch v2 1/2] libiscsi: Fix use-after-free race during iscsi_session_teardown

2017-08-29 Thread Chris Leech
Looks good to me, fixes up the code given that the comment there about calling iscsi_remove_session wasn't being followed. Thanks Acked-by: Chris Leech <cle...@redhat.com> On Thu, Jul 13, 2017 at 09:11:21AM -0700, 'Khazhismel Kumykov' via open-iscsi wrote: > Session attributes expose

[PATCH] Open-iSCSI: support for moving flashnode sysfs entries from a bus to a class

2017-08-04 Thread Chris Leech
Tools support for the posted interface breaking flashnode sysfs changes. Still falls back to the bus path, maintaining compatibility. --- usr/iscsi_sysfs.c | 31 --- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c

[PATCH 2/9] iscsi: sysfs filtering by network namespace

2017-08-04 Thread Chris Leech
This makes the iscsi_host, iscsi_session, iscsi_connection, iscsi_iface, and iscsi_endpoint transport class devices only visible in sysfs under a matching network namespace. The network namespace for all of these objects is tracked in the iscsi_cls_host structure. ---

[RFC 0/9] iSCSI kernel/userspace (netlink and sysfs) issues

2017-08-04 Thread Chris Leech
Hi all, I've been looking at the kernel to iscsid interfaces with an eye towards opening up the possibility for several things that we can't do right now. Like running iscsid in a container, or moving towards a multi-process model with a simplified iscsid process managing each session. There's

[PATCH 7/9] iscsi: rename iscsi_bus_flash_* to iscsi_flash_*

2017-08-04 Thread Chris Leech
cleanups after the bus to class conversion --- drivers/scsi/qla4xxx/ql4_os.c | 52 +- drivers/scsi/scsi_transport_iscsi.c | 102 ++-- include/scsi/scsi_transport_iscsi.h | 40 +++--- 3 files changed, 98 insertions(+), 96 deletions(-)

[PATCH 5/9] iscsi: pass ep to bind_conn

2017-08-04 Thread Chris Leech
Just trying to cleanup some of the repeated endpoint lookups. --- drivers/infiniband/ulp/iser/iscsi_iser.c | 11 +-- drivers/scsi/be2iscsi/be_iscsi.c | 8 +--- drivers/scsi/be2iscsi/be_iscsi.h | 1 + drivers/scsi/bnx2i/bnx2i_iscsi.c | 7 +--

[PATCH 8/9] iscsi: filter flashnode sysfs by net namespace

2017-08-04 Thread Chris Leech
Finished of the net namespace support for flashnode sysfs devices --- drivers/scsi/scsi_transport_iscsi.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index

[PATCH 9/9] iscsi: respond to netlink with unicast when appropriate

2017-08-04 Thread Chris Leech
Instead of always multicasting responses, send a unicast netlink message directed at the correct pid. This will be needed if we ever want to support multiple userspace processes interacting with the kernel over iSCSI netlink simultaneously. Limitations can currently be seen if you attempt to run

[PATCH 1/9] iscsi: create per-net iscsi netlink kernel sockets

2017-08-04 Thread Chris Leech
Prepare iSCSI netlink to operate in multiple namespaces. --- drivers/scsi/scsi_transport_iscsi.c | 67 +++-- 1 file changed, 57 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index

[PATCH 6/9] iscsi: convert flashnode devices from bus to class

2017-08-04 Thread Chris Leech
The flashnode session and connection devices should be filtered by net namespace along with the iscsi_host, but we can't do that with a bus device. As these don't use any of the bus matching functionality, they make more sense as a class device anyway. --- drivers/scsi/qla4xxx/ql4_os.c |

[PATCH 3/9] iscsi: make all netlink multicast namespace aware

2017-08-04 Thread Chris Leech
Make use of the per-net netlink sockets. Responses are sent back on the same socket/namespace the request was received on. Async events are reported on the socket/namespace stored in the iscsi_cls_host associated with the event. --- drivers/scsi/scsi_transport_iscsi.c | 92

Re: installing initiator and target

2017-08-04 Thread Chris Leech
On Mon, Jul 31, 2017 at 05:01:14AM +, 'jayshankar nair' via open-iscsi wrote: > Hi, I like to install the iscsi initiator and target on fedora 25. PLease > email me the README file. > Thanks,Jayshankar Use dnf to install the iscsi-initiator-utils and targetcli packages. (targetcli is used

Re: [PATCH 0/7] Enable iSCSI offload drivers to use information from iface.

2017-06-07 Thread Chris Leech
On Tue, Jun 06, 2017 at 12:07:10PM -0600, Robert LeBlanc wrote: > This patchset enables iSCSI offload drivers to have access to the iface > information provided by iscsid. This allows users to have more control > of how the driver connects to the iSCSI target. iSER is updated to use >

Re: Moving target-isns to the open-iscsi github project

2017-03-08 Thread Chris Leech
hub.com/cvubrugier/target-isns for the target-isns project. > > -- > Lee Duncan No objections from me. - Chris Leech -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails

Re: [PATCH 22/29] drivers, scsi: convert iscsi_task.refcount from atomic_t to refcount_t

2017-03-08 Thread Chris Leech
> situations. > > Signed-off-by: Elena Reshetova <elena.reshet...@intel.com> > Signed-off-by: Hans Liljestrand <ishkam...@gmail.com> > Signed-off-by: Kees Cook <keesc...@chromium.org> > Signed-off-by: David Windsor <dwind...@gmail.com> This loo

Re: Proposal to make automatic target rescans optional

2017-03-07 Thread Chris Leech
On Tue, Feb 21, 2017 at 08:40:47PM +0100, Gorka Eguileor wrote: > On 21/02, Chris Leech wrote: > > > 4- Add a specific configuration option for the sessions to disable > > > automatic scans, as proposed by the patch. > > > > > >Pros: Finer grain control

[PATCH v2] libiscsi: add lock around task lists to fix list corruption regression

2017-02-27 Thread Chris Leech
s been tested there successfully. v2: changed WARN_ONCE to pr_debug_once Signed-off-by: Chris Leech <cle...@redhat.com> Fixes: 659743b02c41 ("[SCSI] libiscsi: Reduce locking contention in fast path") Reported-by: Prashantha Subbarao <psubb...@us.ibm.com> Reviewed-by: Guilherme G. Picco

Re: [PATCH] libiscsi: add lock around task lists to fix list corruption regression

2017-02-23 Thread Chris Leech
Yikes, my git-send-email settings suppressed the important CCs. Sorry! Guilherme and Ilkka, can you comment about your testing results or review please? - Chris Leech - Original Message - > There's a rather long standing regression from commit > 659743b [SCSI] libiscsi: Reduce l

Re: Proposal to make automatic target rescans optional

2017-02-21 Thread Chris Leech
> 4- Add a specific configuration option for the sessions to disable > automatic scans, as proposed by the patch. > >Pros: Finer grain control than any other option since we have per >session configuration. > >Cons: We have to add a configuration option to iscsid. > > I believe

[PATCH] libiscsi: add lock around task lists to fix list corruption regression

2017-02-21 Thread Chris Leech
ted there successfully. Signed-off-by: Chris Leech <cle...@redhat.com> --- drivers/scsi/libiscsi.c | 26 +- include/scsi/libiscsi.h | 1 + 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 834d121

Re: [PATCH] [SCSI] libiscsi: Fix locking regression in libiscsi.c

2017-02-20 Thread Chris Leech
=2 I was going to propose that for merging now for 4.11 Chris Leech - Original Message - > Commit 659743b02c411075b26601725947b21df0bb29c8 [SCSI] libiscsi: Reduce > locking contention in fast path introduced a locking regression. > > According to the comment for iscsi_c

discoverydb commands failing with 0 timeout after "Use timeout when waiting for responses from iscsid" applied

2017-02-16 Thread Chris Leech
After the changeset "Use timeout when waiting for responses from iscsid" discoverydb commands from iscsiadm are apparently running with a 0 timeout and failing when the response from iscsid isn't already in the socket buffer when poll is called. This change seems to fix it. All this can

Re: Need Code Understanding

2017-02-16 Thread Chris Leech
The code in ioctl.c isn't actually used or built at all. Thanks for reminding me to clean this up. The project at one point was planning on supporting a FreeBSD kernel initiator as well, and ioctl.c is a remnant of that. The code that's actually used to do the iscsid-to-kernel messaging is in

Re: Proposal to make automatic target rescans optional

2017-02-15 Thread Chris Leech
Hi Gorka, Thanks for the detailed write-up here. It seems to me that we have a way to disable automatic kernel/driver initiated scans (scsi_mod.scan=manual) for just these type of situations, but with iSCSI we've already moved control to iscsid and are always doing user-space initiated

Re: [RESEND][PATCH v2 0/3] Add QLogic FastLinQ offload iSCSI driver (qedi) support

2017-02-14 Thread Chris Leech
On Tue, Feb 14, 2017 at 01:26:30AM +, Sundar, Shyam wrote: > Hi Chris & Lee, > > Just wanted to ping you guys as the driver specific changes have > now been accepted upstream. Could you please provide your feedback > (if any) or apply these if they seem reasonable. Sorry, I've

Re: iscsi-tools in a 32bit userland running 64bit kernel

2017-02-09 Thread Chris Leech
I'm curious as to what would prevent you from running a 64-bit iscsid in this case, but that's OK. The real fix, without breaking backwards compatibility, is going to need to be a kernel patch to use the 32-bit layout when talking to a compat process. It's not as straightforward with netlink

Re: iscsi-tools in a 32bit userland running 64bit kernel

2017-02-08 Thread Chris Leech
Hi, unfortunately it doesn't look like this is going to work with any easy fix. It looks to me like the netlink message protocol between iscsid and the kernel isn't actually functional for this :( The struct iscsi_uevent differs in size between 32 and 64 bit architectures due to internal

Re: [PATCH 1/1] iscsi: fix regression caused by session lock patch

2017-02-06 Thread Chris Leech
- Original Message - > On 09/11/2016 03:21, Chris Leech wrote: > > On Mon, Nov 07, 2016 at 04:23:10PM -0200, Guilherme G. Piccoli wrote: > >> > >> Sure! Count on us to test any patches. I guess the first step is to > >> reproduce on upstream r

Re: iscsiadm and lots of sessions

2017-01-27 Thread Chris Leech
Sorry, that didn't make sense as you said Centos 6.6. I read your GitHub issue first and replied here on the list without noticing that there was more info. I think you'll need to upgrade to iscsi-initiator-utils-6.2.0.873-17 or newer in order to get this fix in an distro package. Centos 6.8

Re: iscsid issue in container env

2017-01-26 Thread Chris Leech
hat would also block the IPC socket. Check the status of the iscsid.socket unit and disable it if needed? > Thank you > > Serguei > > -Original Message- > From: Chris Leech [mailto:cle...@redhat.com] > Sent: Thursday, January 26, 2017 2:00 PM > To: open-iscsi@

  1   2   3   >