Re: [PATCH 2/3] scsi: iscsi: make iscsi_flashnode_bus const

2024-02-03 Thread 'Lee Duncan' via open-iscsi
212,7 @@ int iscsi_flashnode_bus_match(struct device *dev, > } > EXPORT_SYMBOL_GPL(iscsi_flashnode_bus_match); > > -static struct bus_type iscsi_flashnode_bus = { > +static const struct bus_type iscsi_flashnode_bus = { > .name = "iscsi_flashnode", > .match = &

Re: 回复: [PATCH v1] scsi: iscsi: use kfree_sensitive() in iscsi_session_free()

2023-07-19 Thread 'Lee Duncan' via open-iscsi
e my Reviewed-by tag. regards, Minjie -邮件原件- 发件人: Mike Christie 发送时间: 2023年7月18日 2:26 收件人: 杜敏杰 ; Lee Duncan ; Chris Leech ; James E.J. Bottomley ; Martin K. Petersen ; open list:ISCSI ; open list:ISCSI ; open list 抄送: opensource.kernel 主题: Re: [PATCH v1] scsi: iscsi: use

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

2023-07-17 Thread 'Lee Duncan' via open-iscsi
ner = cls_session->transport->owner; iscsi_pool_free(&session->cmdpool); - kfree(session->password); + kfree_sensitive(session->password); kfree(session->password_in); kfree(session->username); kfree(session->username_in); Reviewed-b

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

2023-03-17 Thread Lee Duncan
On Mar 14, 2023, at 9:23 AM, Hannes Reinecke wrote: > > On 2/8/23 18:40, Lee Duncan wrote: >> From: Lee Duncan >> Right now the iscsi_endpoint is only linked to a connection once that >> connection has been established. For net namespace filtering of the >> sysfs

Re: Digest for open-iscsi@googlegroups.com - 1 update in 1 topic

2023-02-12 Thread Lee Duncan
This links to a proprietary iSCSI test suite. Not sure I approve of advertising here. > On Feb 10, 2023, at 11:43 PM, open-iscsi@googlegroups.com wrote: > > https://calsoftinc.com/blogs/2017/03/iscsi-introduction-steps-configure-iscsi-initiator-target.html -- You received this message because

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

2023-02-08 Thread 'Lee Duncan' via open-iscsi
ther, else their requests can collide. Also, I can imagine situations where different daemons may want to set different configuration values. Currently they cannot. On 2/8/23 09:40, Lee Duncan wrote: From: Lee Duncan This is a request for comment on a set of patches that modify the ke

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

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

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

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

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

2023-02-08 Thread Lee Duncan
From: Lee Duncan This finishes the net namespace support for flashnode sysfs devices. Signed-off-by: Chris Leech Signed-off-by: Lee Duncan --- drivers/scsi/scsi_transport_iscsi.c | 34 + include/scsi/scsi_transport_iscsi.h | 4 2 files changed, 34 insertions

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

2023-02-08 Thread Lee Duncan
From: Lee Duncan 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 Signed-off-by: Lee

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

2023-02-08 Thread Lee Duncan
From: Lee Duncan 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 Signed-off-by: Lee Duncan --- drivers/scsi

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

2023-02-08 Thread Lee Duncan
From: Lee Duncan 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

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

2023-02-08 Thread Lee Duncan
From: Lee Duncan 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

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

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

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

2023-02-08 Thread Lee Duncan
From: Lee Duncan Right now the iscsi_endpoint is only linked to a connection once that connection has been established. For net namespace filtering of the sysfs objects, associate an endpoint with the host that it was allocated for when it is created. Signed-off-by: Chris Leech Signed-off-by

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

2023-02-08 Thread Lee Duncan
From: Lee Duncan This is a request for comment on a set of patches that modify the kernel iSCSI initiator communications so that they are namespace-aware. The goal is to allow multiple iSCSI daemon (iscsid) to run at once as long as they are in separate namespaces, and so that iscsid can run in

Re: [PATCH] scsi:iscsi: Record session's startup mode in kernel

2022-12-05 Thread 'Lee Duncan' via open-iscsi
On 12/4/22 05:02, Wenchao Hao wrote: On Thu, Dec 1, 2022 at 3:53 AM Lee Duncan wrote: ... Let me start by saying I agree with you now, that there *is* an issue. But your test was flawed. After you log into a target, changing the Node database does nothing. The node database is only

Re: [PATCH] scsi:iscsi: Record session's startup mode in kernel

2022-11-30 Thread 'Lee Duncan' via open-iscsi
On 11/30/22 12:08, Mike Christie wrote: On 11/30/22 1:53 PM, Lee Duncan wrote: Have you already worked on the open-iscsi side of this? No reason for duplicate development. I think you missed his reply where he said he was missed the iscsid.safe_logout setting. No, I saw that, but I

Re: [PATCH] scsi:iscsi: Record session's startup mode in kernel

2022-11-30 Thread 'Lee Duncan' via open-iscsi
[A much-reduced CC list, since my reply doesn't need wide distribution.] On 11/23/22 09:27, Wenchao Hao wrote: On Thu, Nov 24, 2022 at 12:51 AM Lee Duncan wrote: On 11/22/22 20:41, Wenchao Hao wrote: On 2022/11/23 4:00, Lee Duncan wrote: On 11/22/22 13:30, Wenchao Hao wrote: There

Re: [PATCH] scsi:iscsi: Record session's startup mode in kernel

2022-11-23 Thread 'Lee Duncan' via open-iscsi
On 11/22/22 20:41, Wenchao Hao wrote: On 2022/11/23 4:00, Lee Duncan wrote: On 11/22/22 13:30, Wenchao Hao wrote: There are 3 iscsi session's startup mode which are onboot, manual and automatic. We can boot from iSCSI disks with help of dracut's service in initrd, which would

Re: [PATCH] scsi:iscsi: Record session's startup mode in kernel

2022-11-22 Thread 'Lee Duncan' via open-iscsi
def_taskmgmt_tmo; uint16_t tsid; The iscsiadm/iscsid tools refuse to logout of an ONBOOT session. -- Lee Duncan -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receivi

Re: [PATCH] scsi:iscsi: rename iscsi_set_param to iscsi_if_set_param

2022-11-22 Thread 'Lee Duncan' via open-iscsi
); + err = iscsi_if_set_param(transport, ev); break; case ISCSI_UEVENT_CREATE_CONN: case ISCSI_UEVENT_DESTROY_CONN: Reviewed-by: Lee Duncan -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To u

Re: [PATCH] drivers: scsi: Directly use ida_alloc()/free()

2022-05-30 Thread 'Lee Duncan' via open-iscsi
->ida_used) - ida_simple_remove(&iscsi_sess_ida, session->target_id); + ida_free(&iscsi_sess_ida, session->target_id); destroy_wq: destroy_workqueue(session->workq); return err; Reviewed-by: Lee Duncan -- You received this message because you are s

Re: [PATCH] scsi: iscsi: fix harmless double shift bug

2022-04-21 Thread 'Lee Duncan' via open-iscsi
FLAG_SUSPEND_TX 0 +#define ISCSI_CONN_FLAG_SUSPEND_RX 1 +#define ISCSI_CONN_FLAG_BOUND 2 #define ISCSI_ITT_MASK 0x1fff #define ISCSI_TOTAL_CMDS_MAX 4096 Reviewed-by: Lee Duncan -- You received this message because you are subscribed to the Google Groups "o

Re: [PATCH] scsi:libiscsi: remove unnecessary memset in iscsi_conn_setup

2022-03-17 Thread 'Lee Duncan' via open-iscsi
On 3/17/22 08:01, Wenchao Hao wrote: iscsi_cls_conn is alloced by kzalloc(), the whole iscsi_cls_conn is zero filled already including the dd_data. So it is unnecessary to call memset again. Signed-off-by: Wenchao Hao Reviewed-by: Wu Bo Reviewed-by: Lee Duncan --- drivers/scsi/libiscsi.c

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

2022-02-17 Thread 'Lee Duncan' via open-iscsi
estion is going to be doing away with this service. Once should not ever be in the situation where there is no initiator name, since that should be generated when the RPM is installed IMHO (which is what we do). -- Lee Duncan -- You received this message because you are subscribed to the Goo

Re: [PATCH -next] scsi: iscsi: Adjuest iface sysfs attr detection

2021-09-02 Thread 'Lee Duncan' via open-iscsi
CSI_NET_PARAM_IFACE_ENABLE; > + else if (attr == &dev_attr_iface_vlan_id.attr) > param = ISCSI_NET_PARAM_VLAN_ID; > else if (attr == &dev_attr_iface_vlan_priority.attr) > param = ISCSI_NET_PARAM_VLAN_PRIORITY; > Reviewed-by: Lee Duncan -- You received

Re: Shouldn't firmware nodes be marked as "onboot", for consistency?

2021-05-10 Thread Lee Duncan
On May 10, 2021, at 4:46 PM, The Lee-Man wrote: > >  > Hi All: > > I'm working on getting iBFT (firmware) booting working well using open-iscsi > with dual paths and DM/multipathing, and I noticed something. > > When you run "iscsiadm -m discovery -t fw", it creates node database entries > f

Re: [PATCH 00/12] open-iscsi: fix serverl issues reported by Coverity

2020-12-11 Thread 'Lee Duncan' via open-iscsi
I have reviewed a couple of these, but you need to submit them as pull requests to github.com/open-iscsi/open-iscsi. The "reviewed-by" tag I replied to a couple of them really isn't needed, as I'm the one that will be merging them (or not) on github (sans Chris, my co-maintainer, who sometimes doe

Re: [PATCH 02/12] iscsi-iname: Verify open() return value before calling read()

2020-12-11 Thread 'Lee Duncan' via open-iscsi
if (read(fd, entropy, 1) == 1) > bytes = &digest[(entropy[0] % (sizeof(digest) - 6))]; > close(fd); > Reviewed-by: Lee Duncan -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsu

Re: [PATCH 01/12] iscsi_sysfs: Fix NULL pointer deference in iscsi_sysfs_read_iface

2020-12-11 Thread 'Lee Duncan' via open-iscsi
n && t->template->use_boot_info) > + if (session && t && t->template->use_boot_info) > iscsi_sysfs_read_boot(iface, session); > > if (!iface_kern_id) > Reviewed-by: Lee Duncan -- You received this message because yo

[PATCH v2] SCSI: libiscsi: fix NOP race condition

2020-11-06 Thread Lee Duncan
From: Lee Duncan iSCSI NOPs are sometimes "lost", mistakenly sent to the user-land iscsid daemon instead of handled in the kernel, as they should be, resulting in a message from the daemon like: > iscsid: Got nop in, but kernel supports nop handling. This can occur because of th

Re: [PATCH] scsi: libiscsi: fix NOP race condition

2020-11-05 Thread Lee Duncan
On 11/4/20 1:33 PM, Mike Christie wrote: > On 9/18/20 4:09 PM, Lee Duncan wrote: >> From: Lee Duncan >> >> iSCSI NOPs are sometimes "lost", mistakenly sent to the >> user-land iscsid daemon instead of handled in the kernel, >> as they should be,

Re: [PATCH] open-iscsi: Fix memory leak in sysfs_get_str

2020-11-05 Thread Lee Duncan
bsys, param); > - if (!sysfs_value || !strlen(sysfs_value)) > + if (!sysfs_value) > + return EIO; > + if (!strlen(sysfs_value)) { > + free(sysfs_value); > return EIO; > + } > > len = strlen(sysfs_value); >

Re: [PATCH] scsi: libiscsi: Fix cmds hung when sd_shutdown

2020-10-31 Thread Lee Duncan
te machine is not ISCSI_STATE_TERMINATE, > + * ISCSI_STATE_LOGGED_IN and ISCSI_STATE_RECOVERY_FAILED. > + */ > + if (session->state == ISCSI_STATE_TERMINATE || > + unlikely(system_state != SYSTEM_RUNNING)) { > failed: > ISCSI_DBG_EH(ses

Re: Slow iSCSI tape performance

2020-10-26 Thread Lee Duncan
On Oct 25, 2020, at 10:42 AM, David C. Partridge wrote: > > I believe that it’s something to do with stopping Windows (at the target) > from sending TURs to the tape every 30s or so. Okay, that makes sense. But that has nothing to do with open-iscsi, or even iSCSI at all. > > Setting strea

Re: [PATCH v2 1/1] scsi: libiscsi: fix NOP race condition

2020-10-20 Thread Lee Duncan
On 10/8/20 1:54 PM, Mike Christie wrote: > On 10/8/20 12:11 PM, Mike Christie wrote: >> On 9/25/20 1:41 PM, ldun...@suse.com wrote: >>> From: Lee Duncan >>> >>> iSCSI NOPs are sometimes "lost", mistakenly sent to the >>> user-land iscsid daem

Re: [PATCH v2 1/1] scsi: libiscsi: fix NOP race condition

2020-10-02 Thread Lee Duncan
On 9/25/20 11:41 AM, ldun...@suse.com wrote: > From: Lee Duncan > > iSCSI NOPs are sometimes "lost", mistakenly sent to the > user-land iscsid daemon instead of handled in the kernel, > as they should be, resulting in a message from the daemon like: > >> iscsi

Re: [PATCH v9 6/7] scsi: libiscsi: use sendpage_ok() in iscsi_tcp_segment_map()

2020-10-01 Thread Lee Duncan
iginal open coded checks. > > Signed-off-by: Coly Li > Acked-by: Martin K. Petersen > Cc: Vasily Averin > Cc: Cong Wang > Cc: Mike Christie > Cc: Lee Duncan > Cc: Chris Leech > Cc: Christoph Hellwig > Cc: Hannes Reinecke > --- > drivers/scsi/libiscs

[PATCH] scsi: libiscsi: fix NOP race condition

2020-09-18 Thread Lee Duncan
From: Lee Duncan iSCSI NOPs are sometimes "lost", mistakenly sent to the user-land iscsid daemon instead of handled in the kernel, as they should be, resulting in a message from the daemon like: > iscsid: Got nop in, but kernel supports nop handling. This can occur because of th

Re: [PATCH] scsi: iscsi: register sysfs for workqueue iscsi_destroy

2020-07-04 Thread Lee Duncan
thread_workqueue("iscsi_destroy"); >> +    iscsi_destroy_workq = alloc_workqueue("%s", >> +    WQ_SYSFS | __WQ_LEGACY | WQ_MEM_RECLAIM | WQ_UNBOUND, >> +    1, "iscsi_destroy"); >>   if (!iscsi_destroy_workq) { >>  

Re: [PATCH] scsi: iscsi: register sysfs for workqueue iscsi_destroy

2020-07-03 Thread Lee Duncan
_RECLAIM | WQ_UNBOUND, > + 1, "iscsi_destroy"); > if (!iscsi_destroy_workq) { > err = -ENOMEM; > goto destroy_wq; > Reviewed-by: Lee Duncan -- You received this message because you are subscribed to the Google Gro

Re: [PATCH] scsi: Fix reference count leak in iscsi_boot_create_kobj.

2020-05-29 Thread Lee Duncan
p;boot_kobj->kobj); > return NULL; > } > boot_kobj->data = data; > Reviewed-by: Lee Duncan -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop r

Re: [RFC RESEND PATCH v2] scsi: iscsi: register sysfs for iscsi workqueue

2020-05-25 Thread Lee Duncan
vers/scsi/scsi_transport_iscsi.c >> @@ -4602,7 +4602,9 @@ static __init int iscsi_transport_init(void) >> goto unregister_flashnode_bus; >> } >> >> -iscsi_eh_timer_workq = create_singlethread_workqueue("iscsi_eh"); >> +iscsi_eh_tim

Re: [PATCH] iscsi: Fix deadlock on recovery path during GFP_IO reclaim

2020-05-18 Thread Lee Duncan
On 5/18/20 11:53 AM, Gabriel Krisman Bertazi wrote: > Lee Duncan writes: > >> On 5/7/20 10:59 PM, Gabriel Krisman Bertazi wrote: >>> iscsi suffers from a deadlock in case a management command submitted via >>> the netlink socket sleeps on an allocation while hold

Re: [PATCH] iscsi: Fix deadlock on recovery path during GFP_IO reclaim

2020-05-17 Thread Lee Duncan
n, ev->u.stop_conn.flag); > + iscsi_if_stop_conn(conn, ev->u.stop_conn.flag); > else > err = -EINVAL; > break; > case ISCSI_UEVENT_SEND_PDU: > conn = iscsi_conn_lookup(ev->u.send_p

Re: PATCH] iscsi:report unbind session event when the target has been removed

2020-03-27 Thread Lee Duncan
@@ -2024,6 +2024,8 @@ static void __iscsi_unbind_session(struct > work_struct *work) >     ida_simple_remove(&iscsi_sess_ida, target_id); > >     scsi_remove_target(&session->dev); > + > +unbind_session_exit: >         iscsi_session_event(session, ISCSI

Re:

2020-03-27 Thread Lee Duncan
On 3/27/20 2:20 AM, chenanq...@oppo.com wrote: > From: Chen Anqing > To: Lee Duncan > Cc: Chris Leech , > "James E . J . Bottomley" , > "Martin K . Petersen" , > ceph-de...@vger.kernel.org, > open-iscsi@googlegroups.

Re: [PATCH] scsi:libiscsi:Fix an error count for active session

2020-03-26 Thread Lee Duncan
goto dec_session_count; > printk(KERN_INFO "iscsi: Rounding can_queue to %d.\n", >total_cmds); > } > -- > 1.8.3.1 > Reviewed-by: Lee Duncan -- You received this message because you are subscribed to the Google Groups &quo

Re: [PATCH RESEND v4] iscsi: Report connection state on sysfs

2020-03-19 Thread Lee Duncan
csi.h > +++ b/include/scsi/scsi_transport_iscsi.h > @@ -188,6 +188,13 @@ extern void iscsi_ping_comp_event(uint32_t host_no, > uint32_t status, uint32_t pid, > uint32_t data_size, uint8_t *data); > > +/* iscsi class co

Re: [PATCH] scsi: Replace zero-length array with flexible-array member

2020-02-24 Thread Lee Duncan
_data_len; > - u8 data[0]; > + u8 data[]; > } __attribute__((packed)); > > struct srp_cred_req { > @@ -306,7 +306,7 @@ struct srp_aer_req { > struct scsi_lun lun; > __be32 sense_data_len; > u32 reserved3; > - u8 sense_dat

Re: [PATCH RESEND v4] iscsi: Perform connection failure entirely in kernel space

2020-01-25 Thread Lee Duncan
the end of last week. I looked over the updates, and I said that they look good to me, and I said please re-add my: Reviewed-by: Lee Duncan mailto:ldun...@suse.com>> > > -- >8 -- > > Connection failure processing depends on a daemon being present to (at > leas

Re: [PATCH RESEND] iscsi: Don't destroy session if there are outstanding connections

2020-01-14 Thread Lee Duncan
set_iface_params(struct iscsi_transport *transport, >> struct iscsi_uevent *ev, uint32_t len) >> @@ -3524,10 +3542,12 @@ iscsi_if_recv_msg(struct sk_buff *skb, struct >> nlmsghdr *nlh, uint32_t *group) >> break; >> case ISCSI_UEVENT_DESTROY

Re: Who know more about this issue for iscsid?

2020-01-11 Thread Lee Duncan
On Jan 11, 2020, at 7:28 PM, can zhu wrote: > > For the initiator. Then who set up your targets, and how are they set up? > > Lee Duncan mailto:leeman.dun...@gmail.com>> > 于2020年1月12日周日 上午11:16写道: > > >> On Jan 11, 2020, at 7:15 PM, can zhu >

Re: how it works

2020-01-11 Thread Lee Duncan
On Jan 11, 2020, at 11:26 AM, Bobby wrote: > > Hi , > > Thanks for your patience regarding my questions. Because after I had dug > (digged) very older posts, I realized > many of the older posts already had answers for many of my earlier questions > :). After your couple of answers and going

Re: Who know more about this issue for iscsid?

2020-01-11 Thread Lee Duncan
> On Jan 11, 2020, at 7:15 PM, can zhu wrote: > > Hmmm, I use the default config, I hadn't do other sets for it. For? For the initiator, or the target? > > 在 2020年1月12日星期日 UTC+8上午11:13:31,The Lee-Man写道: > On Jan 11, 2020, at 7:41 AM, can zhu > wrote: >> >> I did not set the auth. >> > > P

Re: Who know more about this issue for iscsid?

2020-01-11 Thread Lee Duncan
On Jan 11, 2020, at 7:41 AM, can zhu wrote: > > I did not set the auth. > Please share how your systems is configured. Did you set up your targets? Assuming you set up your targets, and they are on targetcli, can you share your configuration file? Also, can you ensure you have no auth set up

Re: Open-iSCSI in research paper

2020-01-02 Thread Lee Duncan
On Jan 2, 2020, at 8:51 AM, Bobby wrote: > > One of the good things about this forum is, you always get helpthanks for > the reply :-) > > I will soon have some questions regarding the user-land and kernel > driver(s) :-) > > Regarding microbenchmarks, I think this one is good > http

Re: [PATCH v3] iscsi: Perform connection failure entirely in kernel space

2020-01-01 Thread Lee Duncan
ameter. > - Always do kernel-side stop work. > - Block recovery timeout handler if system is dying. > - send a CONN_TERM stop if the system is dying. > > Cc: Mike Christie > Cc: Lee Duncan > Cc: Bart Van Assche > Co-developed-by: Dave Clausen > Signed-off-b

Re: [PATCH V4] scsi: avoid potential deadlock in iscsi_if_rx func

2019-12-09 Thread Lee Duncan
func return -EAGAIN all the time, one deadlock will occur. >> >> For example, a client only send msg without calling recvmsg func, then >> it will result in the watchdog soft lockup. The details are given as >> follows, > >> Signed-off-by: Bo Wu >> Revi

Re: [PATCH] iscsi: Perform connection failure entirely in kernel space

2019-12-09 Thread Lee Duncan
On 12/9/19 10:20 AM, Gabriel Krisman Bertazi wrote: > From: Bharath Ravi > > Connection failure processing depends on a daemon being present to (at > least) stop the connection and start recovery. This is a problem on a > multipath scenario, where if the daemon failed for whatever reason, the >

Re: [PATCH] iscsi: Don't send data to unbinded connection

2019-11-17 Thread Lee Duncan
n *conn = task->conn; > unsigned int noreclaim_flag; > + struct iscsi_tcp_conn *tcp_conn = conn->dd_data; > + struct iscsi_sw_tcp_conn *tcp_sw_conn = tcp_conn->dd_data; > int rc = 0; > > + if (!tcp_sw_conn->sock) { > + iscsi_conn_printk(KERN_ERR, conn, &

Re: [PATCH v3] scsi: avoid potential deadloop in iscsi_if_rx func

2019-11-13 Thread Lee Duncan
On 11/12/19 5:37 PM, Martin K. Petersen wrote: > >> In iscsi_if_rx func, after receiving one request through >> iscsi_if_recv_msg func, iscsi_if_send_reply will be called to try to >> reply the request in do-loop. If the return of iscsi_if_send_reply >> func return -EAGAIN all the time, one deadlo

Re: [PATCH v3] scsi: avoid potential deadloop in iscsi_if_rx func

2019-11-12 Thread Lee Duncan
ady added my Reviewed-by tag. Do you mean past that? Perhaps I missed something. -- Lee Duncan -- 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+

Re: [PATCH] scsi: avoid potential deadloop in iscsi_if_rx func

2019-10-28 Thread Lee Duncan
etries--; > } while (err < 0 && err != -ECONNREFUSED && err != -ESRCH); > skb_pull(skb, rlen); > } > You could have used "if (--retries < 0)" (or some variation thereof) but that may not be as clear, and certainly is

Re: AW: iscsiadm unable to connect to iscsd

2019-10-01 Thread Lee Duncan
What bug number? I’m the SUSE maintainer. :) -- Lee-Man Duncan Sent from my iPhone, dude > On Oct 1, 2019, at 10:39 AM, wrote: > > Thanks a lot, i forwarded this to suse, as they maintain the iscsi packages… > > Von: open-iscsi@googlegroups.com Im Auftrag von > The Lee-Man > Gesendet: Mo

Re: [PATCH] scsi: use kzfree to free password

2019-07-28 Thread Lee Duncan
teardown(struct iscsi_cls_session > *cls_session) > > iscsi_remove_session(cls_session); > > - kfree(session->password); > - kfree(session->password_in); > + kzfree(session->password); > + kzfree(session->password_in); > kfree(session->username);

Re: [PATCH] Check sk before sendpage

2019-07-10 Thread Lee Duncan
gt; unsigned int offset, copy; > If the socket can be closed right before iscsi_sw_tcp_xmit_segment() is called, can it be called in the middle of sending segments? (In which case the check would have to be in the while loop.) -- Lee Duncan -- You received this message because you are subscribed

Re: open scsi change -- 467946a945cc0f2432274a66e916959d5a5c3772

2019-04-10 Thread Lee Duncan
On 3/20/19 7:32 PM, Rao Shoaib wrote: > Hi, Hi! Please direct questions at the open-iscsi group on googlegroups, so others can contribute to and/or benefit from the discussion. > > In the commit of the above change you say > > "But, make no >     mistake, it is recommended not to retry forever,

Re: [PATCH] Update iscsid to always restart

2019-03-10 Thread Lee Duncan
all] > WantedBy=multi-user.target > -- > 1.8.3.1 > > > I'm not sure I agree with "always". I believe "on-failure" might make more > sense? > > The daemon iscsid only does an "exit(0)" if it is exiting cleanly, so why > would w

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

2019-03-10 Thread Lee Duncan
send path. If not we >> - * have to go the slow sendmsg path. We always map for the >> - * recv path. >> + * have to go the slow sendmsg path. >> + * >> + * Same goes for slab pages: skb_can_coalesce() allows >> + * coalescing neighboring slab

Re: [RESEND PATCH] libiscsi: Fix race between iscsi_xmit_task and iscsi_complete_task

2019-03-07 Thread Lee Duncan
-ENODATA; > > + spin_lock_bh(&conn->session->back_lock); > + if (conn->task == NULL) { > + spin_unlock_bh(&conn->session->back_lock); > + return -ENODATA; > + } > __iscsi_get_task(task); > + spin_unlock_bh(&am

Re: [RESEND PATCH] libiscsi: Fix race between iscsi_xmit_task and iscsi_complete_task

2019-02-15 Thread Lee Duncan
-ENODATA; > > + spin_lock_bh(&conn->session->back_lock); > + if (conn->task == NULL) { > + spin_unlock_bh(&conn->session->back_lock); > + return -ENODATA; > + } > __iscsi_get_task(task); > + spin_unlock_bh(

Re: [PATCH] iscsi: Capture iscsi debug messages using tracepoints

2018-11-26 Thread Lee Duncan
device *dev, struct va_format *vaf), > + > +TP_ARGS(dev, vaf) > +); > + > +/* > + * Define event to capture iscsi tcp debug messages. > + */ > +DEFINE_EVENT(iscsi_log_msg, iscsi_dbg_tcp, > +TP_PROTO(struct device *dev, struct va_format *vaf), > + > +

Re: [PATCH] libiscsi: Fix NULL pointer dereference in iscsi_eh_session_reset

2018-11-26 Thread Lee Duncan
"%s, %s [age %d]\n", session->targetname, > - conn->persistent_address, session->age); > + "%s [age %d]\n", session->targetname, > + session->age); > spin_unlock_

Re: Antw: Re: Initial Login Advice

2018-11-05 Thread Lee Duncan
e, all the time (like dial tone). So the SCSI protocol assumed that was the case. If you want truly asynchronous storage, but a commercial FC storage box (IMHO). If you want asynchronous iSCSI, use iSNS (see open-isns, a project I maintain on github). — Lee Duncan -- You received this message

Re: New open-iscsi minor version?

2018-10-16 Thread Lee Duncan
csiusr: Add CFLAGS to linker cmdline > qedi.c: Removed unused linux/ethtool.h > idbm.c: Include fcnl.h for O_RDWR and O_CREAT definitions > bnx2x.c: Reorder the includes to avoid duplicate defines with musl > fwparam_ppc.c: Do not use __compar_fn_t > > Lee

RFC: A problem with stale session information?

2018-09-19 Thread Lee Duncan
, this registers as a “libopeniscsiusr BUG”, which is not acceptable. Ideas? We need some way (besides reboot) to say “this target is never coming back”, right? — Lee Duncan -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubs

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

2018-04-09 Thread Lee Duncan
ng to the kernel target code, so I agree with these changes. > > Signed-off-by: Chris Leech > --- > drivers/scsi/scsi_transport_iscsi.c | 29 ++--- > 1 file changed, 18 insertions(+), 11 deletions(-) > > ... (diffs removed to save electrons) > Rev

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

2018-03-15 Thread Lee Duncan
I reviewed this several days before but mistakenly replied only to the open-iscsi list. Signed-off-by: Lee Duncan -- Lee-Man Duncan Sent from my iPhone, dude > On Mar 14, 2018, at 10:11 PM, Martin K. Petersen > wrote: > > >> iscsi tcp will first send out data, then

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

2018-03-01 Thread Lee Duncan
On 03/01/2018 10:07 AM, 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 > Cc: Lee Duncan > Cc: Chris Leech > --- > drivers/scsi/libiscsi.c | 1 + >

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

2018-03-01 Thread Lee Duncan
On 03/01/2018 10:07 AM, Bart Van Assche wrote: > This patch avoids that sparse reports the following: > > drivers/scsi/libiscsi.c:1844:23: warning: context imbalance in > 'iscsi_exec_task_mgmt_fn' - unexpected unlock > > Signed-off-by: Bart Van Assche > Cc

Re: [PATCH] scsi: libiscsi: Allow sd_shutdown on bad transport

2018-01-02 Thread Lee Duncan
* that complete and handle the error. > @@ -2082,7 +2104,7 @@ enum blk_eh_timer_return iscsi_eh_cmd_timed_out(struct > scsi_cmnd *sc) > task->last_timeout = jiffies; > spin_unlock(&session->frwd_lock); > ISCSI_DBG_EH(session, "return %s\

Re: backstores/iblock missing

2017-12-27 Thread Lee Duncan
any) iSCSI targets with an > initiator, then open-iscsi is useful for that. > > I don't know what "IBLOCK" is. I know that it is possible to share a zfs > volume using targetcli, if that is your goal. > -- Lee Duncan "A witty saying proves nothing." -- V

Re: [RFC dracut 1/1] unexpected boot failure due to races between iscsistart for multiple interfaces

2017-12-21 Thread Lee Duncan
iscsistart and >use iscsid >and iscsiadm to manage the iSCSI sessions. That seems like the wrong approach to me. iscsiadm/iscsid were designed for this. The iscsistart script was designed for sing, one-shot use, and is not used in dracut now at all, AFAIK. — Lee Duncan -

Re: [RFC dracut 1/1] unexpected boot failure due to races between iscsistart for multiple interfaces

2017-12-20 Thread Lee Duncan
t;-sleep 1 >>-fi >> fi >> fi >> >> @@ -133,11 +128,6 @@ if [ -z $iscsi_initiator ] && [ -f >>/sys/firmware/ibft/initiator/initiator-name ] >> mkdir -p /etc/

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

2017-09-13 Thread Lee Duncan
*session); > -extern int iscsi_destroy_session(struct iscsi_cls_session *session); > extern struct iscsi_cls_conn *iscsi_create_conn(struct iscsi_cls_session > *sess, > int dd_size, uint32_t cid); > extern int iscsi_destroy_conn(struct is

Re: [PATCH] iscsi_if.h: use attribute instead of '__packed'

2017-09-05 Thread Lee Duncan
> uint8_t value[0]; /* length sized value follows */ > -} __packed; > +} __attribute__((__packed__)); > > /* > * To keep the struct iscsi_uevent size the same for userspace code > Patch applied. -- Lee Duncan SUSE Labs -- You received this message bec

Re: New version for open-iscsi?

2017-09-01 Thread Lee Duncan
On Sep 1, 2017, at 9:37 AM, Chris Leech wrote: > > 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

Re: [kernel-hardening] Re: [PATCH v4 06/13] iscsi: ensure RNG is seeded before use

2017-06-16 Thread Lee Duncan
On 06/16/2017 05:41 PM, Jason A. Donenfeld wrote: > Hi Lee, > > On Fri, Jun 16, 2017 at 11:58 PM, Lee Duncan wrote: >> It seems like what you are doing is basically "good", i.e. if there is >> not enough random data, don't use it. But what happens in that ca

Re: [kernel-hardening] Re: [PATCH v4 06/13] iscsi: ensure RNG is seeded before use

2017-06-16 Thread Lee Duncan
ll have a look (patch > reattached). > > Jason > It seems like what you are doing is basically "good", i.e. if there is not enough random data, don't use it. But what happens in that case? The authentication fails? How does the user know to wait and try again? -- Lee

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

2017-03-08 Thread Lee Duncan
der if I should join the open-iscsi organization before transferring > my target-isns repository. If so, how should I proceed? Maybe get > invited? > > With best regards, > > [1] > https://help.github.com/articles/transferring-a-repository-owned-by-your-personal-account/#transf

Re: Problem with iSCSI connected LTO-2 tape drive

2016-12-28 Thread Lee Duncan
> On Dec 28, 2016, at 4:48 AM, David C. Partridge > wrote: > > FWIW I still think the best solution is to suspend the NOP-Out polling (of > active) while a device command is being processed. This way you get the best > of both worlds > > However I do see the attraction of a documentation o

Re: [PATCH 5/8] linux: drop __bitwise__ everywhere

2016-12-15 Thread Lee Duncan
signed __bitwise__ ieee80211_tx_result; > +typedef unsigned __bitwise ieee80211_tx_result; > #define TX_CONTINUE ((__force ieee80211_tx_result) 0u) > #define TX_DROP ((__force ieee80211_tx_result) 1u) > #define TX_QUEUED((__force ieee80211_tx_result) 2u) > @@ -180,7 +

Re: Problem with iSCSI connected LTO-2 tape drive

2016-12-15 Thread Lee Duncan
now were present. Perhaps a small blurb in the README about dealing with tape, suggesting turning NOOP/ping off. Please feel free to post a pull request on github or suggest a patch on this list. > > Regards > Dave -- Lee Duncan "Choice means saying no to one thing so you c

Re: Problem with iSCSI connected LTO-2 tape drive

2016-12-14 Thread Lee Duncan
OPs that open-iscsi is setting. This is also discussed in the README file. I’d try setting them both to 0 to get them out of the way. It looks like the tape drive does not respond to the NOOP ping when it is busy for 80+ seconds skipping forward one file. — Lee Duncan -- You received this mes

Re: [PATCHv4 0/2] Handle iscsid shutdown more cleanly

2016-11-28 Thread Lee Duncan
No comment on these? Since the previous version drew comments, can I assume that means everybody is happy with this version? Hannes? Anyone? > On Nov 23, 2016, at 2:58 PM, leeman.dun...@gmail.com wrote: > > From: Lee Duncan > > This set of two patches addresses the issues &

Re: Antw: [PATCHv2 0/2] Handle iscsid shutdown more cleanly

2016-11-23 Thread Lee Duncan
active connections (those who transfer data) (i.e. > after a recv/send) > 4th signal will terminate connections blocked on sending or receiving data > (i.e. kill an "active" recv/send) > So eventually the server will arrive in the "1st signal received state" &

Re: [PATCHv2 2/2] iscsid: treat SIGTERM like "iscsiadm -k 0".

2016-11-23 Thread Lee Duncan
On Nov 23, 2016, at 4:13 AM, Christian Seiler wrote: > > Hi, > > On 11/22/2016 11:43 PM, leeman.dun...@gmail.com wrote: >> static void catch_signal(int signo) >> [...] >> switch (signo) { >> case SIGTERM: >> -iscsid_shutdown(); >> +iscsid_shutdown_and_cleanup();

Re: RFC: iscsid shutdown hangs with system when service manually killed

2016-11-21 Thread Lee Duncan
> On Nov 21, 2016, at 6:14 AM, Hannes Reinecke wrote: > > On 11/19/2016 08:46 PM, The Lee-Man wrote: >> In this wonderful new world of systemd, I have an issue with stopping >> the iscsid service when the daemon has died or been killed. >> >> My setup: >> * I have an iscsid.socket unit file, wh

  1   2   >