Re: [RFC PATCH 0/4] Make iSCSI network namespace aware

2015-05-20 Thread Andy Grover
On 05/13/2015 03:12 PM, Chris Leech wrote: This is only about the structures and functionality involved in maintaining the iSCSI session, the SCSI host along with it's discovered targets and devices has no association with network namespaces. These patches are functional, but not complete.

[PATCHv2 2/3] Prevent spinning over poll() when reconnecting to an inaccessible target

2015-02-06 Thread Andy Grover
connections in a more event-driven model. Signed-off-by: Andy Grover agro...@redhat.com --- usr/initiator.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/usr/initiator.c b/usr/initiator.c index 1aadc9b..83bbdbf 100644 --- a/usr/initiator.c +++ b/usr/initiator.c

[PATCHv2 0/3] Fix issues resulting from actor rewrite

2015-02-06 Thread Andy Grover
I think I got a handle on the original issue you were seeing Mike, please take a look at #2 patch. The added debug logging had some bugs, so v2 also respins that patch, now #3. Thanks -- Andy Andy Grover (3): Fix incorrect list operation leading to out-of-order items on pend_list

[PATCHv2 3/3] Add some more debug logging to actor.c

2015-02-06 Thread Andy Grover
Since it's proven a little tricky. Signed-off-by: Andy Grover agro...@redhat.com --- usr/actor.c | 24 +++- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/usr/actor.c b/usr/actor.c index 2e1f038..67ae0e0 100644 --- a/usr/actor.c +++ b/usr/actor.c @@ -92,16

[PATCHv2 1/3] Fix incorrect list operation leading to out-of-order items on pend_list

2015-02-06 Thread Andy Grover
for someone reading to code to get what's going on. Signed-off-by: Andy Grover agro...@redhat.com --- usr/actor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr/actor.c b/usr/actor.c index 37b5024..2e1f038 100644 --- a/usr/actor.c +++ b/usr/actor.c @@ -96,7 +96,8

Re: [PATCHv2 0/9] Rewrite event handling

2015-02-05 Thread Andy Grover
On 02/05/2015 12:06 AM, Mike Christie wrote: I tried to just do: case EV_CONN_POLL: - actor_init(ev_context-actor, session_conn_poll, - ev_context); - actor_schedule(ev_context-actor); + actor_timer(ev_context-actor, 1,

[PATCH 2/2] Add some more debug logging to actor.c

2015-02-05 Thread Andy Grover
Since it's proven a little tricky. Signed-off-by: Andy Grover agro...@redhat.com --- usr/actor.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/usr/actor.c b/usr/actor.c index 2e1f038..8347cf6 100644 --- a/usr/actor.c +++ b/usr/actor.c @@ -92,16 +92,23

Re: [PATCHv2 0/9] Rewrite event handling

2015-01-12 Thread Andy Grover
On 01/06/2015 12:17 AM, Mike Christie wrote: Was the last issue the case where if actor_schedule_private gets 0 for delay_secs or does that just work? Not sure I quite follow but actor_schedule_private with 0 for delay_secs should be fine -- the actor is put on the ready_list straightaway and

Re: CentOS7 and systemd ordering when shutting down results in unclean unmount

2014-12-09 Thread Andy Grover
On 12/09/2014 07:28 AM, awiddersh...@hotmail.com wrote: Setup iSCSI on CentOS7. Mounted a iSCSI disk and am running a small MySQL instance on the disk. The iSCSI disk and MySQL instance all come online fine with booting but when shutting down things seem to get very upset and the drive does not

Re: new comer questions on tgt,lio-utils and iscsitarget

2014-12-05 Thread Andy Grover
On 12/04/2014 01:13 PM, The Lee-Man wrote: On Tuesday, December 2, 2014 6:59:02 PM UTC-8, pilla...@gmail.com wrote: 1 \ both lio-utils and tgt are pure user space program? Both of them are using the kernel iscsi module ? So ,what is the difference between them? No, I believe the tgt

[PATCHv2 4/9] actor: Remove ACTOR_TICKS_10MS()

2014-11-03 Thread Andy Grover
From: Adam Jackson a...@redhat.com Again, just obfuscation. Signed-off-by: Adam Jackson a...@redhat.com --- usr/actor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/usr/actor.c b/usr/actor.c index 9c2f449..e4e8a24 100644 --- a/usr/actor.c +++ b/usr/actor.c @@ -38,7

[PATCHv2 0/9] Rewrite event handling

2014-11-03 Thread Andy Grover
/ actor: Remove ACTOR_TICKS_10MS() actor: Unobfuscate ACTOR_MAX_LOOPS actor: Simplify actor_poll a little Andy Grover (3): Remove actor_init and rename actor_new to actor_init Make running actors event-driven Wake up to reap children include/list.h | 6 ++ usr/Makefile | 4 +- usr

[PATCHv2 2/9] actor: simplify actor_check

2014-11-03 Thread Andy Grover
From: Adam Jackson a...@redhat.com Now that it's static we know it can't ever be called when poll_in_progress is true. Signed-off-by: Adam Jackson a...@redhat.com --- usr/actor.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/usr/actor.c b/usr/actor.c index

[PATCHv2 6/9] actor: Simplify actor_poll a little

2014-11-03 Thread Andy Grover
From: Adam Jackson a...@redhat.com Finally, a functionality change. Having expanded ACTOR_MAX_LOOPS it's now obvious that we were basically only doing actor_check() on every other call. Also, the commentary is just wrong on many levels, we'd only get called about every 250ms anyway. Just call

[PATCHv2 9/9] Wake up to reap children

2014-11-03 Thread Andy Grover
to turn off that part of readers' brains where they worry it might ever be negative. Fix a typo in comment. Signed-off-by: Andy Grover agro...@redhat.com --- usr/event_poll.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/usr/event_poll.c b/usr/event_poll.c index

[PATCHv2 7/9] Remove actor_init and rename actor_new to actor_init

2014-11-03 Thread Andy Grover
We don't need actor_init because static variables are already initialized to zero. Rename actor_new to actor_init because new sounds like we're allocating something and we're not -- the function is initializing the existing struct actor. Signed-off-by: Andy Grover agro...@redhat.com --- usr

[PATCHv2 8/9] Make running actors event-driven

2014-11-03 Thread Andy Grover
ACTOR_POLL_WAITING state, no longer needed. Add some more helpful macros to list.h. Based on earlier work by Chris Leech. Signed-off-by: Andy Grover agro...@redhat.com --- include/list.h | 6 ++ usr/Makefile | 4 +- usr/actor.c | 264

[PATCH 0/9] Rewrite event handling

2014-10-08 Thread Andy Grover
to hearing what you think. Thanks -- Regards -- Andy Adam Jackson (6): actor: Mark actor_check static actor: simplify actor_check actor: s/ACTOR_TICKS/actor_jiffies/ actor: Remove ACTOR_TICKS_10MS() actor: Unobfuscate ACTOR_MAX_LOOPS actor: Simplify actor_poll a little Andy Grover (2

[PATCH 8/9] Remove actor_init and rename actor_new to actor_init

2014-10-08 Thread Andy Grover
We don't need actor_init because static variables are already initialized to zero. Rename actor_new to actor_init because new sounds like we're allocating something and we're not -- the function is initializing the existing struct actor. Signed-off-by: Andy Grover agro...@redhat.com --- usr

[PATCH 5/9] actor: Unobfuscate ACTOR_MAX_LOOPS

2014-10-08 Thread Andy Grover
From: Adam Jackson a...@redhat.com Signed-off-by: Adam Jackson a...@redhat.com --- usr/actor.c | 2 +- usr/actor.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/usr/actor.c b/usr/actor.c index e4e8a24..c084176 100644 --- a/usr/actor.c +++ b/usr/actor.c @@ -240,7 +240,7 @@

[PATCH 9/9] Make running actors event-driven

2014-10-08 Thread Andy Grover
ACTOR_POLL_WAITING state, no longer needed. Add some more helpful macros to list.h. Signed-off-by: Andy Grover agro...@redhat.com --- include/list.h | 6 ++ usr/actor.c | 272 ++- usr/actor.h | 13 +-- usr/event_poll.c | 78

[PATCH 3/9] actor: s/ACTOR_TICKS/actor_jiffies/

2014-10-08 Thread Andy Grover
From: Adam Jackson a...@redhat.com No reason to obscure this. Signed-off-by: Adam Jackson a...@redhat.com --- usr/actor.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/usr/actor.c b/usr/actor.c index fb90924..9c2f449 100644 --- a/usr/actor.c +++ b/usr/actor.c @@

[PATCH 4/9] actor: Remove ACTOR_TICKS_10MS()

2014-10-08 Thread Andy Grover
From: Adam Jackson a...@redhat.com Again, just obfuscation. Signed-off-by: Adam Jackson a...@redhat.com --- usr/actor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/usr/actor.c b/usr/actor.c index 9c2f449..e4e8a24 100644 --- a/usr/actor.c +++ b/usr/actor.c @@ -38,7

Re: Antw: [PATCH 2/9] Fix warning about possibly-uninitialized variable

2014-10-07 Thread Andy Grover
On 10/06/2014 11:13 PM, Ulrich Windl wrote: Andy Grover agro...@redhat.com schrieb am 06.10.2014 um 18:36 in Nachricht 1412613374-5752-3-git-send-email-agro...@redhat.com: Signed-off-by: Andy Grover agro...@redhat.com --- usr/iscsiadm.c | 5 ++--- 1 file changed, 2 insertions(+), 3

Re: Antw: [PATCH 6/9] Add -Wno-unused-but-set-variable to some iscsiuio CFLAGS

2014-10-07 Thread Andy Grover
On 10/06/2014 11:17 PM, Ulrich Windl wrote: [...] diff --git a/iscsiuio/src/uip/Makefile.am b/iscsiuio/src/uip/Makefile.am index 16170d7..d728c8e 100644 --- a/iscsiuio/src/uip/Makefile.am +++ b/iscsiuio/src/uip/Makefile.am @@ -2,7 +2,8 @@ AM_CFLAGS = -I${top_srcdir}/src/unix

[PATCHv2 07/13] iscsiuio: Resolve strict aliasing issue in iscsiuio/src/unix/nic.c

2014-10-07 Thread Andy Grover
Break up the expression and use a local variable. Signed-off-by: Andy Grover agro...@redhat.com --- iscsiuio/src/unix/nic.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/iscsiuio/src/unix/nic.c b/iscsiuio/src/unix/nic.c index e00e8f2..d56a9da 100644 --- a/iscsiuio/src

[PATCHv2 03/13] Fix bad sizeof in memset

2014-10-07 Thread Andy Grover
Signed-off-by: Andy Grover agro...@redhat.com --- usr/md5.c | 2 +- utils/md5.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/md5.c b/usr/md5.c index 4ef1cb7..ba6c86d 100644 --- a/usr/md5.c +++ b/usr/md5.c @@ -127,7 +127,7 @@ MD5Final(md5byte digest[16], struct

[PATCHv2 12/13] iscsiuio: Remove set but unused variables

2014-10-07 Thread Andy Grover
Signed-off-by: Andy Grover agro...@redhat.com --- iscsiuio/src/uip/uip_arp.c | 2 -- iscsiuio/src/unix/main.c | 3 +-- iscsiuio/src/unix/nic.c| 7 --- iscsiuio/src/unix/packet.c | 5 + 4 files changed, 2 insertions(+), 15 deletions(-) diff --git a/iscsiuio/src/uip/uip_arp.c b

[PATCHv2 01/13] Fix build warnings for unused variables

2014-10-07 Thread Andy Grover
Signed-off-by: Andy Grover agro...@redhat.com --- usr/be2iscsi.c | 1 - usr/login.c | 2 -- usr/netlink.c | 3 +-- utils/open-isns/bitvector.c | 15 ++- utils/open-isns/dd.c| 3 +-- 5 files changed, 8 insertions(+), 16 deletions

[PATCHv2 04/13] Fix missing header

2014-10-07 Thread Andy Grover
Signed-off-by: Andy Grover agro...@redhat.com --- usr/mgmt_ipc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr/mgmt_ipc.c b/usr/mgmt_ipc.c index ee037d9..c16bce9 100644 --- a/usr/mgmt_ipc.c +++ b/usr/mgmt_ipc.c @@ -36,6 +36,7 @@ #include sysdeps.h #include iscsi_ipc.h #include

[PATCHv2 02/13] Fix warning about possibly-uninitialized variable

2014-10-07 Thread Andy Grover
Signed-off-by: Andy Grover agro...@redhat.com --- usr/iscsiadm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c index f886d39..0cdc1bb 100644 --- a/usr/iscsiadm.c +++ b/usr/iscsiadm.c @@ -2211,7 +2211,7 @@ static void print_host_stats

[PATCHv2 11/13] iscsiuio: Change nic_disable to return void

2014-10-07 Thread Andy Grover
No callers are checking its retval, and it's not clear what they'd do if it returned an error. Instead, log any errors, some which should really never happen. Signed-off-by: Andy Grover agro...@redhat.com --- iscsiuio/src/unix/nic_utils.c | 16 iscsiuio/src/unix/nic_utils.h

[PATCHv2 13/13] iscsiuio: Check return value from nic_queue_tx_packet

2014-10-07 Thread Andy Grover
and log an error if it fails. Signed-off-by: Andy Grover agro...@redhat.com --- iscsiuio/src/unix/nic.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/iscsiuio/src/unix/nic.c b/iscsiuio/src/unix/nic.c index 758eba5..38a5776 100644 --- a/iscsiuio/src/unix/nic.c +++ b

[PATCHv2 09/13] iscsiuio: Use attribute(unused) for variables that are unused but needed

2014-10-07 Thread Andy Grover
These variables need to exist even if they're not used. In order to prevent gcc from issuing a warning about set but unused variables, annotate them with __attribute__((__unused__)). Signed-off-by: Andy Grover agro...@redhat.com --- iscsiuio/src/uip/pt.h | 2 +- iscsiuio/src/unix/libs

[PATCHv2 10/13] iscsiuio: Use attribute(unused) for *icmpv6_hdr

2014-10-07 Thread Andy Grover
I think this variable serves a documentation and completeness purpose even though it is not used in the function's computation. In order to prevent gcc from issuing a warning about set but unused variables, annotate it with __attribute__((__unused__)). Signed-off-by: Andy Grover agro

[PATCH 8/9] Resolve strict aliasing issue in iscsiuio/src/unix/nic.c

2014-10-06 Thread Andy Grover
Break up the expression and use a local variable. Signed-off-by: Andy Grover agro...@redhat.com --- iscsiuio/src/unix/nic.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/iscsiuio/src/unix/nic.c b/iscsiuio/src/unix/nic.c index e00e8f2..d56a9da 100644 --- a/iscsiuio/src

[PATCH 1/9] Fix build warnings for unused variables

2014-10-06 Thread Andy Grover
Signed-off-by: Andy Grover agro...@redhat.com --- usr/be2iscsi.c | 1 - usr/login.c | 2 -- usr/netlink.c | 3 +-- utils/open-isns/bitvector.c | 15 ++- utils/open-isns/dd.c| 3 +-- 5 files changed, 8 insertions(+), 16 deletions

[PATCH 5/9] Fix warning about non-matching types

2014-10-06 Thread Andy Grover
Signed-off-by: Andy Grover agro...@redhat.com --- iscsiuio/src/unix/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iscsiuio/src/unix/main.c b/iscsiuio/src/unix/main.c index e33db04..a789de5 100644 --- a/iscsiuio/src/unix/main.c +++ b/iscsiuio/src/unix/main.c @@ -233,7

[PATCH 4/9] Fix missing header

2014-10-06 Thread Andy Grover
Signed-off-by: Andy Grover agro...@redhat.com --- usr/mgmt_ipc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr/mgmt_ipc.c b/usr/mgmt_ipc.c index ee037d9..c16bce9 100644 --- a/usr/mgmt_ipc.c +++ b/usr/mgmt_ipc.c @@ -36,6 +36,7 @@ #include sysdeps.h #include iscsi_ipc.h #include

[PATCH 6/9] Add -Wno-unused-but-set-variable to some iscsiuio CFLAGS

2014-10-06 Thread Andy Grover
There are a fair number of warnings generated by the unused-but-set warning in recent versions of GCC. These sometimes are there for completeness and are not harmful, so a better choice may be to just silence the warnings. Signed-off-by: Andy Grover agro...@redhat.com --- iscsiuio/src/uip

[PATCH 2/9] Fix warning about possibly-uninitialized variable

2014-10-06 Thread Andy Grover
Signed-off-by: Andy Grover agro...@redhat.com --- usr/iscsiadm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c index f886d39..0cdc1bb 100644 --- a/usr/iscsiadm.c +++ b/usr/iscsiadm.c @@ -2211,7 +2211,7 @@ static void print_host_stats

[PATCH 9/9] Fix strict aliasing issue with IPV6_IS_ADDR_UNSPECIFIED and remove unused

2014-10-06 Thread Andy Grover
There already is a union to reference the memory as an array of uints, so just use it for IS_ADDR_UNSPECIFIED. All the others aren't used so we can remove them. Signed-off-by: Andy Grover agro...@redhat.com --- iscsiuio/src/uip/ipv6.h | 31 +-- 1 file changed, 5

[PATCH 3/9] Fix bad sizeof in memset

2014-10-06 Thread Andy Grover
Signed-off-by: Andy Grover agro...@redhat.com --- usr/md5.c | 2 +- utils/md5.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/md5.c b/usr/md5.c index 4ef1cb7..ba6c86d 100644 --- a/usr/md5.c +++ b/usr/md5.c @@ -127,7 +127,7 @@ MD5Final(md5byte digest[16], struct

[PATCH 0/9] Warning cleanups

2014-10-06 Thread Andy Grover
gcc 4.8.3 emits some warnings, which this patchset resolves. Regards -- Andy Andy Grover (9): Fix build warnings for unused variables Fix warning about possibly-uninitialized variable Fix bad sizeof in memset Fix missing header Fix warning about non-matching types Add -Wno-unused

Re: open-iscsi C APIs

2013-02-22 Thread Andy Grover
On 02/22/2013 10:26 AM, Mike Christie wrote: I ccd the person looking into it. The last discussion was about what the design and what support was needed from the lib. On 02/19/2013 05:57 PM, wdli wrote: Hi, I am new to open-iscsi. I have been playing with iscsiadm in shell script but have

Re: [systemd-devel] [RFC] iscsid / systemd / dracut integration effort

2012-12-12 Thread Andy Grover
On 12/12/2012 12:45 PM, Tomasz Torcz wrote: On Tue, Dec 11, 2012 at 03:26:46PM -0800, Chris Leech wrote: Thanks, this got me going in the right direction. These unit files seems to be working much better for me, with the startup and shutdown ordering between iscsi, iscsid, and remote-fs

Re: RFC: libiscsi-wip

2012-11-13 Thread Andy Grover
On 11/13/2012 02:03 PM, Mike Christie wrote: On 11/12/2012 12:19 PM, Andy Grover wrote: OK how is this object tree in representing what we want? a system has 1+ Nodes (iqns) Nodes have 1+ Portals (IP addresses) Portals have 1+ Sessions I think I would add the iscsi connection in here too

Re: RFC: libiscsi-wip

2012-11-13 Thread Andy Grover
On 11/13/2012 02:03 PM, Mike Christie wrote: We also want the hosts/ifaces/hw-ports. With that object or objects: - We need something to represent the iSCSI HBA, and its physical ports. We need to be able to set/get iscsi/net settings for these. - We need something to represent the iscsi

Re: RFC: libiscsi-wip

2012-11-12 Thread Andy Grover
On 11/08/2012 07:22 PM, Mike Christie wrote: On 11/08/2012 05:32 PM, Andy Grover wrote: The Red Hat packaging of open-iscsi (iscsi-initiator-utils) has contained C and Python libraries for open-iscsi since 2009. These have been used only by the Anaconda installer, and haven't been pushed

[PATCH] Update README for removal of DBM requirement

2012-11-01 Thread Andy Grover
Removed in 093b1f4 (2006) Signed-off-by: Andy Grover agro...@redhat.com --- README | 23 ++- 1 files changed, 14 insertions(+), 9 deletions(-) diff --git a/README b/README index 7364b2d..ec22098 100644 --- a/README +++ b/README @@ -159,15 +159,20 @@ Usage: iscsid [OPTION

CHAP and iscsi security

2012-09-12 Thread Andy Grover
Hi Mike and everyone, CHAP is a weak authentication method, and all traffic is sent unencrypted (unless using IPSec). Do people use CHAP? Or does its weakness not matter because it's just used to ensure the wrong initiator doesn't accidentally connect to a target? Does anyone use IPSec? In the

Re: CHAP and iscsi security

2012-09-12 Thread Andy Grover
On 09/12/2012 09:11 AM, paul_kon...@dell.com wrote: On Sep 12, 2012, at 11:30 AM, Andy Grover wrote: CHAP is a weak authentication method, and all traffic is sent unencrypted (unless using IPSec). Do people use CHAP? Or does its weakness not matter because it's just used to ensure