Re: [PATCH] scsi:iscsi: Remove unused list 'connlist_err'

2024-05-06 Thread 'Martin K. Petersen' via open-iscsi


> I think the last use of this list was removed by
>   commit 23d6fefbb3f6 ("scsi: iscsi: Fix in-kernel conn failure
> handling").
>
> Build tested only.

Applied to 6.10/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1ikzqxuw6.fsf%40ca-mkp.ca.oracle.com.


Re: [PATCH 0/3] drivers: scsi: struct bus_type cleanup

2024-02-12 Thread Martin K. Petersen
On Sat, 03 Feb 2024 15:38:59 -0300, Ricardo B. Marliere wrote:

> This series is part of an effort to cleanup the users of the driver
> core, as can be seen in many recent patches authored by Greg across the
> tree (e.g. [1]). Specifically, this series is part of the task of
> splitting one of his TODOs [2].
> 

Applied to 6.9/scsi-queue, thanks!

[1/3] scsi: fcoe: make fcoe_bus_type const
  https://git.kernel.org/mkp/scsi/c/4dbde797b946
[2/3] scsi: iscsi: make iscsi_flashnode_bus const
  https://git.kernel.org/mkp/scsi/c/824ec98b1b55
[3/3] scsi: scsi_debug: make pseudo_lld_bus const
  https://git.kernel.org/mkp/scsi/c/ac0dd0f33adb

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/170778686840.2103627.12956797195697757629.b4-ty%40oracle.com.


Re: [PATCH 0/3] drivers: scsi: struct bus_type cleanup

2024-02-05 Thread Martin K. Petersen


Ricardo,

> This series is part of an effort to cleanup the users of the driver
> core, as can be seen in many recent patches authored by Greg across
> the tree (e.g. [1]). Specifically, this series is part of the task of
> splitting one of his TODOs [2].

Applied to 6.9/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1ttmmnyic.fsf%40ca-mkp.ca.oracle.com.


Re: [PATCH v5 00/10] scsi:scsi_debug: Add error injection for single device

2023-09-27 Thread Martin K. Petersen


Doug,

> The original error injection mechanism was based on scsi_host which
> could not inject fault for a single SCSI device.
>
> This patchset provides the ability to inject errors for a single SCSI
> device. Now we supports inject timeout errors, queuecommand errors,
> and hostbyte, driverbyte, statusbyte, and sense data for specific SCSI
> Command. Two new error injection is defined to make abort command or
> reset LUN failed.

Please review patches 7 through 10. Thank you!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1ttrfzkz5.fsf%40ca-mkp.ca.oracle.com.


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

2023-07-31 Thread Martin K. Petersen
On Tue, 25 Jul 2023 10:45:29 +0800, Lin Ma wrote:

> The current NETLINK_ISCSI netlink parsing loop checks every nlmsg to
> make sure the length is bigger than the sizeof(struct iscsi_uevent) and
> then calls iscsi_if_recv_msg(...).
> 
>   nlh = nlmsg_hdr(skb);
>   if (nlh->nlmsg_len < sizeof(*nlh) + sizeof(*ev) ||
> skb->len < nlh->nlmsg_len) {
> break;
>   }
>   ...
>   err = iscsi_if_recv_msg(skb, nlh, );
> 
> [...]

Applied to 6.6/scsi-queue, thanks!

[1/2] scsi: iscsi: Add length check for nlattr payload
  https://git.kernel.org/mkp/scsi/c/971dfcb74a80

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/169083266401.2873709.2360198964162460177.b4-ty%40oracle.com.


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

2023-07-31 Thread Martin K. Petersen
On Tue, 25 Jul 2023 22:15:31 +0800, YueHaibing wrote:

> This is not used anymore, so can be removed.
> 
> 

Applied to 6.6/scsi-queue, thanks!

[1/1] scsi: iscsi: Remove unused extern declaration iscsi_lookup_iface()
  https://git.kernel.org/mkp/scsi/c/a615e93d6cfe

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/169083266404.2873709.17161054183653404974.b4-ty%40oracle.com.


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

2023-07-25 Thread Martin K. Petersen


Lin,

> The function iscsi_if_set_param and iscsi_if_set_host_param converts
> nlattr payload to type char* and then call C string handling functions
> like sscanf and kstrdup.

Applied to 6.6/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1wmynxwow.fsf%40ca-mkp.ca.oracle.com.


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

2023-07-25 Thread Martin K. Petersen


Lin,

> The current NETLINK_ISCSI netlink parsing loop checks every nlmsg to
> make sure the length is bigger than the sizeof(struct iscsi_uevent)
> and then calls iscsi_if_recv_msg(...).

Applied to 6.6/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1351bzba8.fsf%40ca-mkp.ca.oracle.com.


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

2023-07-25 Thread Martin K. Petersen


YueHaibing,

> This is not used anymore, so can be removed.

Applied to 6.6/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq18rb3zbb0.fsf%40ca-mkp.ca.oracle.com.


Re: [PATCH v7] scsi:iscsi: Fix multiple iscsi session unbind event sent to userspace

2022-12-13 Thread Martin K. Petersen


Wenchao,

> I found an issue that kernel would send ISCSI_KEVENT_UNBIND_SESSION
> for multiple times which should be fixed.

Applied to 6.2/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1wn6uem2d.fsf%40ca-mkp.ca.oracle.com.


Re: [PATCH v3 0/2] Fix scsi device's iodone_cnt mismatch with iorequest_cnt

2022-11-30 Thread Martin K. Petersen
On Wed, 23 Nov 2022 20:21:35 +0800, Wenchao Hao wrote:

> Following scenario would make scsi_device's iodone_cnt mismatch with
> iorequest_cnt even if there is no request on this device any more.
> 
> 1. request timeout happened. If we do not retry the timeouted command,
>this command would be finished in scsi_finish_command() which would
>not increase the iodone_cnt; if the timeouted command is retried,
>another increasement for iorequest_cnt would be performed, the
>command might add iorequest_cnt for multiple times but iodone_cnt
>only once. Increase iodone_cnt in scsi_timeout() can handle this
>scenario.
> 
> [...]

Applied to 6.2/scsi-queue, thanks!

[1/2] scsi: increase scsi device's iodone_cnt in scsi_timeout()
  https://git.kernel.org/mkp/scsi/c/ec9780e48c77
[2/2] scsi: donot increase scsi_device's iorequest_cnt if dispatch failed
  https://git.kernel.org/mkp/scsi/c/cfee29ffb45b

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/166986602274.2101055.6269524051761428499.b4-ty%40oracle.com.


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

2022-11-30 Thread Martin K. Petersen
On Tue, 22 Nov 2022 18:11:05 +, Wenchao Hao wrote:

> There are two iscsi_set_param() functions individually defined
> in libiscsi.c and scsi_transport_iscsi.c which is confused.
> 
> So rename the one in scsi_transport_iscsi.c to iscsi_if_set_param().
> 
> 

Applied to 6.2/scsi-queue, thanks!

[1/1] scsi:iscsi: rename iscsi_set_param to iscsi_if_set_param
  https://git.kernel.org/mkp/scsi/c/0c26a2d7c980

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/166986602274.2101055.8307199379345401690.b4-ty%40oracle.com.


Re: [PATCH v3 0/2] Fix scsi device's iodone_cnt mismatch with iorequest_cnt

2022-11-23 Thread Martin K. Petersen


Wenchao,

> Following scenario would make scsi_device's iodone_cnt mismatch with
> iorequest_cnt even if there is no request on this device any more.

Applied to 6.2/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1tu2prpbi.fsf%40ca-mkp.ca.oracle.com.


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

2022-11-23 Thread Martin K. Petersen


Wenchao,

> There are two iscsi_set_param() functions individually defined in
> libiscsi.c and scsi_transport_iscsi.c which is confused.

Applied to 6.2/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1bkoxt4k5.fsf%40ca-mkp.ca.oracle.com.


Re: [PATCH v2] scsi: iscsi: fix possible memory leak when device_register failed

2022-11-17 Thread Martin K. Petersen
On Thu, 10 Nov 2022 03:37:29 +, Zhou Guanghui wrote:

> If device_register() returns error, the name allocated by the
> dev_set_name() need be freed. As described in the comment of
> device_register(), we should use put_device() to give up the
> reference in the error path.
> 
> Fix this by calling put_device(), the name will be freed in the
> kobject_cleanup(), and this patch modified resources will be
> released by calling the corresponding callback function in the
> device_release().
> 
> [...]

Applied to 6.1/scsi-fixes, thanks!

[1/1] scsi: iscsi: fix possible memory leak when device_register failed
  https://git.kernel.org/mkp/scsi/c/f014165faa7b

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/166870940541.1572108.9806675424150133794.b4-ty%40oracle.com.


Re: [PATCH] scsi: iscsi: prefer xmit of DataOut before new cmd

2022-06-21 Thread Martin K. Petersen
On Tue, 7 Jun 2022 16:19:53 +0300, Dmitry Bogdanov wrote:

> In function iscsi_data_xmit (TX worker) there is walking through the
> queue of new SCSI commands that is replenished in parallell. And only
> after that queue got emptied the function will start sending pending
> DataOut PDUs. That lead to DataOut timer time out on target side and
> to connection reinstatment.
> 
> This patch swaps walking through the new commands queue and the pending
> DataOut queue. To make a preference to ongoing commands over new ones.
> 
> [...]

Applied to 5.20/scsi-queue, thanks!

[1/1] scsi: iscsi: prefer xmit of DataOut before new cmd
  https://git.kernel.org/mkp/scsi/c/65080c51fde4

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/165586371838.21830.14886184856943048987.b4-ty%40oracle.com.


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

2022-06-10 Thread Martin K. Petersen
On Fri, 27 May 2022 08:30:49 +, keliu wrote:

> Use ida_alloc()/ida_free() instead of deprecated
> ida_simple_get()/ida_simple_remove() .
> 
> 

Applied to 5.20/scsi-queue, thanks!

[1/1] drivers: scsi: Directly use ida_alloc()/free()
  https://git.kernel.org/mkp/scsi/c/3fd3a52ca672

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/165488292963.17199.2741130090390033654.b4-ty%40oracle.com.


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

2022-06-07 Thread Martin K. Petersen


keliu,

> Use ida_alloc()/ida_free() instead of deprecated
> ida_simple_get()/ida_simple_remove() .

Applied to 5.20/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1v8tbykzw.fsf%40ca-mkp.ca.oracle.com.


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

2022-05-02 Thread Martin K. Petersen
On Thu, 21 Apr 2022 18:03:52 +0300, Dan Carpenter wrote:

> These flags are supposed to be bit numbers.  Right now they cause a
> double shift bug where we use BIT(BIT(2)) instead of BIT(2).
> Fortunately, the bit numbers are small and it's done consistently so it
> does not cause an issue at run time.
> 
> 

Applied to 5.19/scsi-queue, thanks!

[1/1] scsi: iscsi: fix harmless double shift bug
  https://git.kernel.org/mkp/scsi/c/565138ac5f8a

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/165153836358.24053.4874594014985340234.b4-ty%40oracle.com.


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

2022-04-25 Thread Martin K. Petersen


Dan,

> These flags are supposed to be bit numbers.  Right now they cause a
> double shift bug where we use BIT(BIT(2)) instead of BIT(2).
> Fortunately, the bit numbers are small and it's done consistently so
> it does not cause an issue at run time.

Applied to 5.19/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1r15kwoza.fsf%40ca-mkp.ca.oracle.com.


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

2022-03-29 Thread Martin K. Petersen


Wenchao,

> 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.

Applied to 5.18/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq14k3gxhv7.fsf%40ca-mkp.ca.oracle.com.


Re: [PATCH v3 0/3] scsi:iscsi: handle iscsi_cls_conn device with sysfs correctly

2022-03-18 Thread Martin K. Petersen
On Wed, 9 Mar 2022 20:57:56 -0500, Wenchao Hao wrote:

> We found a NULL pointer dereference in iscsi_sw_tcp_conn_get_param(),
> the root reason is we did sysfs addition wrong.
> 
> The origin implement do device setup in iscsi_create_conn() which
> bind the alloc/init and add in one function; do device teardown in
> iscsi_destroy_conn() which bind remove and free in one function.
> 
> [...]

Applied to 5.18/scsi-queue, thanks!

[1/3] scsi: iscsi: Add helper functions to manage iscsi_cls_conn
  https://git.kernel.org/mkp/scsi/c/ad515cada7da
[2/3] scsi:libiscsi: Add iscsi_cls_conn to sysfs after been initialized
  https://git.kernel.org/mkp/scsi/c/7dae459f5e56
[3/3] scsi:libiscsi: teradown iscsi_cls_conn gracefully
  https://git.kernel.org/mkp/scsi/c/8709c323091b

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/164766213031.31329.2067042035707430877.b4-ty%40oracle.com.


Re: [PATCH v3 0/3] scsi:iscsi: handle iscsi_cls_conn device with sysfs correctly

2022-03-14 Thread Martin K. Petersen


Wenchao,

> We found a NULL pointer dereference in iscsi_sw_tcp_conn_get_param(),
> the root reason is we did sysfs addition wrong.

Applied to 5.18/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1bky7dexf.fsf%40ca-mkp.ca.oracle.com.


Re: [PATCH v2] scsi: libiscsi: move init ehwait to iscsi_session_setup()

2021-09-21 Thread Martin K. Petersen
On Sat, 11 Sep 2021 21:51:59 +0800, Ding Hui wrote:

> The commit ec29d0ac29be ("scsi: iscsi: Fix conn use after free during
> resets") move member ehwait from conn to session, but left init ehwait
> in iscsi_conn_setup().
> 
> Although a session can only have 1 conn currently, it is better to
> do init ehwait in iscsi_session_setup() to prevent reinit by mistake,
> also in case we can handle multiple conns in the future.
> 
> [...]

Applied to 5.16/scsi-queue, thanks!

[1/1] scsi: libiscsi: move init ehwait to iscsi_session_setup()
  https://git.kernel.org/mkp/scsi/c/e018f03d6ccb

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/163228527477.25516.7622823180692115909.b4-ty%40oracle.com.


Re: [PATCH v2] scsi: libiscsi: move init ehwait to iscsi_session_setup()

2021-09-13 Thread Martin K. Petersen


Ding,

> The commit ec29d0ac29be ("scsi: iscsi: Fix conn use after free during
> resets") move member ehwait from conn to session, but left init ehwait
> in iscsi_conn_setup().
>
> Although a session can only have 1 conn currently, it is better to do
> init ehwait in iscsi_session_setup() to prevent reinit by mistake,
> also in case we can handle multiple conns in the future.

Applied to 5.16/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq18rzzztsa.fsf%40ca-mkp.ca.oracle.com.


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

2021-09-13 Thread Martin K. Petersen
On Wed, 1 Sep 2021 16:53:36 +0800, Baokun Li wrote:

> ISCSI_NET_PARAM_IFACE_ENABLE belongs to enum iscsi_net_param instead of
> iscsi_iface_param,so move it to ISCSI_NET_PARAM. Otherwise, when we call
> into the driver we might not match and return that we don't want attr
> visible in sysfs. Found in code review.
> 
> 

Applied to 5.15/scsi-fixes, thanks!

[1/1] scsi: iscsi: Adjuest iface sysfs attr detection
  https://git.kernel.org/mkp/scsi/c/4e2855082925

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/163159094718.20733.7684132037831496520.b4-ty%40oracle.com.


Re: Aw: [EXT] Re: [PATCH 1/1] scsi: Fix spelling mistakes in header files

2021-05-26 Thread Martin K. Petersen


It's an unfortunate quirk of b4 that it quotes the description from the
original patch submission and not the message that ends up being
committed. As a result my commentary didn't make it to the list.

> Busses isn't a misspelling, it's just that few people use it these
> days.

In the context of electronics and computing "busses" still appears to be
widely in use. In any case, whether to use one or the other is up to the
author of the code in question. I only merged fixed for what was obvious
typos.

Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1y2c0vs0t.fsf%40ca-mkp.ca.oracle.com.


Re: [PATCH 1/1] scsi: Fix spelling mistakes in header files

2021-05-25 Thread Martin K. Petersen
On Mon, 17 May 2021 17:59:45 +0800, Zhen Lei wrote:

> Fix some spelling mistakes in comments:
> pathes ==> paths
> Resouce ==> Resource
> retreived ==> retrieved
> keep-alives ==> keep-alive
> recevied ==> received
> busses ==> buses
> interruped ==> interrupted

Applied to 5.14/scsi-queue, thanks!

[1/1] scsi: Fix spelling mistakes in header files
  https://git.kernel.org/mkp/scsi/c/40d6b939e4df

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/162200196243.11962.5629932935575912565.b4-ty%40oracle.com.


Re: [PATCH 1/1] scsi: Fix spelling mistakes in header files

2021-05-21 Thread Martin K. Petersen


Zhen,

> Fix some spelling mistakes in comments:
> pathes ==> paths
> Resouce ==> Resource
> retreived ==> retrieved
> keep-alives ==> keep-alive
> recevied ==> received
> busses ==> buses
> interruped ==> interrupted

Applied to 5.14/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1eedz232t.fsf%40ca-mkp.ca.oracle.com.


Re: [PATCH] scsi: iscsi: fix inappropriate use of put_device

2020-12-09 Thread Martin K. Petersen
On Fri, 20 Nov 2020 15:48:52 +0800, Qinglang Miao wrote:

> kfree(conn) is called inside put_device(>dev) so that
> another one would cause use-after-free. Besides, device_unregister
> should be used here rather than put_device.

Applied to 5.11/scsi-queue, thanks!

[1/1] scsi: iscsi: fix inappropriate use of put_device
  https://git.kernel.org/mkp/scsi/c/6dc1c7ab6f04

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/160753457753.14816.8140218142483943973.b4-ty%40oracle.com.


Re: [PATCH v3 27/56] scsi: fix some kernel-doc markups

2020-10-26 Thread Martin K. Petersen


Mauro,

> Some identifiers have different names between their prototypes and the
> kernel-doc markup.

Applied to 5.11/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq11rhk5t7e.fsf%40ca-mkp.ca.oracle.com.


Re: [PATCH] iscsi: iscsi_tcp: Avoid holding spinlock while calling getpeername

2020-09-29 Thread Martin K. Petersen
On Mon, 28 Sep 2020 00:33:29 -0400, Mark Mielke wrote:

> Kernel may fail to boot or devices may fail to come up when
> initializing iscsi_tcp devices starting with Linux 5.8.
> 
> Marc Dionne identified the cause in RHBZ#1877345.
> 
> Commit a79af8a64d39 ("[SCSI] iscsi_tcp: use iscsi_conn_get_addr_param
> libiscsi function") introduced getpeername() within the session spinlock.
> 
> [...]

Applied to 5.9/scsi-fixes, thanks!

[1/1] scsi: iscsi: iscsi_tcp: Avoid holding spinlock while calling getpeername()
  https://git.kernel.org/mkp/scsi/c/bcf3a2953d36

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/160143675721.27517.12028217524794232407.b4-ty%40oracle.com.


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

2020-09-25 Thread Martin K. Petersen


Coly,

> In iscsci driver, iscsi_tcp_segment_map() uses the following code to
> check whether the page should or not be handled by sendpage:
> if (!recv && page_count(sg_page(sg)) >= 1 && !PageSlab(sg_page(sg)))
>
> The "page_count(sg_page(sg)) >= 1 && !PageSlab(sg_page(sg)" part is to
> make sure the page can be sent to network layer's zero copy path. This
> part is exactly what sendpage_ok() does.
>
> This patch uses  use sendpage_ok() in iscsi_tcp_segment_map() to replace
> the original open coded checks.

Looks fine to me.

Acked-by: Martin K. Petersen 

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq18scxinmw.fsf%40ca-mkp.ca.oracle.com.


Re: [PATCH] scsi: iscsi: Do not put host in iscsi_set_flashnode_param()

2020-07-28 Thread Martin K. Petersen
On Mon, 15 Jun 2020 16:12:26 +0800, Jing Xiangfeng wrote:

> If scsi_host_lookup() failes we will jump to put_host, which may
> cause panic. Jump to exit_set_fnode to fix it.

Applied to 5.9/scsi-queue, thanks!

[1/1] scsi: iscsi: Do not put host in iscsi_set_flashnode_param()
  https://git.kernel.org/mkp/scsi/c/68e12e5f6135

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/159599579269.11289.8326075241681410079.b4-ty%40oracle.com.


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

2020-07-08 Thread Martin K. Petersen
On Fri, 3 Jul 2020 13:16:03 +0800, Bob Liu wrote:

> Register sysfs for workqueue iscsi_destroy, so that users can set cpu affinity
> through "cpumask" for this workqueue to get better isolation in cloud
> multi-tenant scenario.
> 
> This patch unfolded create_singlethread_workqueue(), added WQ_SYSFS and drop
> __WQ_ORDERED_EXPLICIT since __WQ_ORDERED_EXPLICIT workqueue isn't allowed to
> change "cpumask".

Applied to 5.9/scsi-queue, thanks!

[1/1] scsi: iscsi: Register sysfs for workqueue iscsi_destroy
  https://git.kernel.org/mkp/scsi/c/919a295abf96

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/159418828149.5152.11275648025830739628.b4-ty%40oracle.com.


Re: [PATCH 1/2] scsi: iscsi: change back iscsi workqueue max_active argu to 1

2020-07-02 Thread Martin K. Petersen
On Wed, 1 Jul 2020 11:07:44 +0800, Bob Liu wrote:

> Commit 3ce4196 (scsi: iscsi: Register sysfs for iscsi workqueue) enables
> 'cpumask' support for iscsi workqueues.
> 
> While there is a mistake in that commit, it's unnecessary to set
> max_active = 2 since 'cpumask' can be modified when max_active = 1.
> 
> This patch change back max_active to 1 so as to keep the same behaviour as
> before.

Applied to 5.8/scsi-fixes, thanks!

[1/2] scsi: iscsi: Change iSCSI workqueue max_active back to 1
  https://git.kernel.org/mkp/scsi/c/1a9826204109

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/159374890395.14616.7502772614929277035.b4-ty%40oracle.com.


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

2020-06-02 Thread Martin K. Petersen
On Thu, 28 May 2020 15:13:53 -0500, wu000...@umn.edu wrote:

> kobject_init_and_add() should be handled when it return an error,
> because kobject_init_and_add() takes reference even when it fails.
> If this function returns an error, kobject_put() must be called to
> properly clean up the memory associated with the object. Previous
> commit "b8eb718348b8" fixed a similar problem. Thus replace calling
> kfree() by calling kobject_put().

Applied to 5.8/scsi-queue, thanks!

[1/1] scsi: iscsi: Fix reference count leak in iscsi_boot_create_kobj
  https://git.kernel.org/mkp/scsi/c/0267ffce562c

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/159114947917.26776.6215710664403797046.b4-ty%40oracle.com.


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

2020-05-26 Thread Martin K. Petersen
On Tue, 5 May 2020 09:19:08 +0800, Bob Liu wrote:

> Motivation:
> This patch enable setting cpu affinity through "cpumask" for iscsi workqueues
> (iscsi_q_xx and iscsi_eh), so as to get performance isolation.
> 
> The max number of active worker was changed form 1 to 2, because "cpumask" of
> ordered workqueue isn't allowed to change.
> 
> [...]

Applied to 5.8/scsi-queue, thanks!

[1/1] scsi: iscsi: Register sysfs for iscsi workqueue
  https://git.kernel.org/mkp/scsi/c/3ce419662dd4

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/159054550933.12032.6330104964795657980.b4-ty%40oracle.com.


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

2020-05-26 Thread Martin K. Petersen
On Tue, 19 May 2020 22:29:59 -0400, Gabriel Krisman Bertazi wrote:

> iscsi suffers from a deadlock in case a management command submitted via
> the netlink socket sleeps on an allocation while holding the
> rx_queue_mutex, if that allocation causes a memory reclaim that
> writebacks to a failed iscsi device.  Then, the recovery procedure can
> never make progress to recover the failed disk or abort outstanding IO
> operations to complete the reclaim (since rx_queue_mutex is locked),
> thus locking the system.
> 
> [...]

Applied to 5.8/scsi-queue, thanks!

[1/1] scsi: iscsi: Fix deadlock on recovery path during GFP_IO reclaim
  https://git.kernel.org/mkp/scsi/c/7e7cd796f277

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/159054550935.12032.12429490681572583579.b4-ty%40oracle.com.


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

2020-05-19 Thread Martin K. Petersen


Gabriel,

> iscsi suffers from a deadlock in case a management command submitted
> via the netlink socket sleeps on an allocation while holding the
> rx_queue_mutex,

This does not apply to 5.8/scsi-queue. Please resubmit.

Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1imgrwgu7.fsf%40ca-mkp.ca.oracle.com.


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

2020-05-14 Thread Martin K. Petersen
nsport_eph,
>   ev->u.b_conn.is_leading);
> + mutex_unlock(_mutex);
> +
>   if (ev->r.retcode || !transport->ep_connect)
>   break;
>  
> @@ -3709,25 +3734,31 @@ iscsi_if_recv_msg(struct sk_buff *skb, struct 
> nlmsghdr *nlh, uint32_t *group)
>   break;
>   case ISCSI_UEVENT_START_CONN:
>   conn = iscsi_conn_lookup(ev->u.start_conn.sid, 
> ev->u.start_conn.cid);
> - if (conn)
> + if (conn) {
> + mutex_lock(_mutex);
>   ev->r.retcode = transport->start_conn(conn);
> + mutex_unlock(_mutex);
> + }
>   else
>   err = -EINVAL;
>   break;
>   case ISCSI_UEVENT_STOP_CONN:
>   conn = iscsi_conn_lookup(ev->u.stop_conn.sid, 
> ev->u.stop_conn.cid);
>   if (conn)
> - transport->stop_conn(conn, 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_pdu.sid, 
> ev->u.send_pdu.cid);
> - if (conn)
> + if (conn) {
> + mutex_lock(_mutex);
>   ev->r.retcode = transport->send_pdu(conn,
>   (struct iscsi_hdr*)((char*)ev + sizeof(*ev)),
>   (char*)ev + sizeof(*ev) + 
> ev->u.send_pdu.hdr_size,
>   ev->u.send_pdu.data_size);
> + mutex_unlock(_mutex);
> + }
>   else
>   err = -EINVAL;
>   break;

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq13682t5uj.fsf%40oracle.com.


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

2020-05-14 Thread Martin K. Petersen


Chris/Lee: Please review!

> Motivation:
> This patch enable setting cpu affinity through "cpumask" for iscsi workqueues
> (iscsi_q_xx and iscsi_eh), so as to get performance isolation.
>
> The max number of active worker was changed form 1 to 2, because "cpumask" of
> ordered workqueue isn't allowed to change.
>
> Notes:
> - Having 2 workers break the current ordering guarantees, please let me know
>   if anyone depends on this.
>
> - __WQ_LEGACY have to be left because of
> 23d11a5(workqueue: skip flush dependency checks for legacy workqueues)
>
> Signed-off-by: Bob Liu 
> ---
>  drivers/scsi/libiscsi.c | 4 +++-
>  drivers/scsi/scsi_transport_iscsi.c | 4 +++-
>  2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
> index 70b99c0..adf9bb4 100644
> --- a/drivers/scsi/libiscsi.c
> +++ b/drivers/scsi/libiscsi.c
> @@ -2627,7 +2627,9 @@ struct Scsi_Host *iscsi_host_alloc(struct 
> scsi_host_template *sht,
>   if (xmit_can_sleep) {
>   snprintf(ihost->workq_name, sizeof(ihost->workq_name),
>   "iscsi_q_%d", shost->host_no);
> - ihost->workq = create_singlethread_workqueue(ihost->workq_name);
> + ihost->workq = alloc_workqueue("%s",
> + WQ_SYSFS | __WQ_LEGACY | WQ_MEM_RECLAIM | WQ_UNBOUND,
> + 2, ihost->workq_name);
>   if (!ihost->workq)
>   goto free_host;
>   }
> diff --git a/drivers/scsi/scsi_transport_iscsi.c 
> b/drivers/scsi/scsi_transport_iscsi.c
> index dfc726f..bdbc4a2 100644
> --- a/drivers/scsi/scsi_transport_iscsi.c
> +++ b/drivers/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_timer_workq = alloc_workqueue("%s",
> +     WQ_SYSFS | __WQ_LEGACY | WQ_MEM_RECLAIM | WQ_UNBOUND,
> + 2, "iscsi_eh");
>   if (!iscsi_eh_timer_workq) {
>   err = -ENOMEM;
>   goto release_nls;

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq17dxet5wy.fsf%40oracle.com.


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

2020-03-31 Thread Martin K. Petersen


Wu,

> The daemon is restarted or crashed while logging out of a session.
> The unbind session event sent by the kernel is not be processed or be
> lost.  When the daemon runs again, the session will never be able to
> logout.

I had to apply this by hand as the patch was completely mangled. Please
use git send-email to submit patches in the future! Thanks!

Applied to 5.7/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1mu7w6kgp.fsf%40oracle.com.


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

2020-03-26 Thread Martin K. Petersen


wubo,

> Fix an error count for active session if the total_cmds is invalid on
> the function iscsi_session_setup().  decrement the number of active
> sessions before the func return.

Applied to 5.7/scsi-queue, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1tv2acy00.fsf%40oracle.com.


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

2020-03-26 Thread Martin K. Petersen


Gabriel,

> If an iSCSI connection happens to fail while the daemon isn't running
> (due to a crash or for another reason), the kernel failure report is
> not received.  When the daemon restarts, there is insufficient kernel
> state in sysfs for it to know that this happened.  open-iscsi tries to
> reopen every connection, but on different initiators, we'd like to
> know which connections have failed.

Applied to 5.7/scsi-queue, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1369uftfo.fsf%40oracle.com.


Re: [PATCH RESEND v2] iscsi: Add support for asynchronous iSCSI session destruction

2020-02-28 Thread Martin K. Petersen


Gabriel,

> iSCSI session destruction can be arbitrarily slow, since it might
> require network operations and serialization inside the scsi layer.
> This patch adds a new user event to trigger the destruction work
> asynchronously, releasing the rx_queue_mutex as soon as the operation
> is queued and before it is performed.  This change allow other
> operations to run in other sessions in the meantime, removing one of
> the major iSCSI bottlenecks for us.

Applied to 5.7/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1o8ti3qp3.fsf%40oracle.com.


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

2020-02-28 Thread Martin K. Petersen


Gustavo,

> The current codebase makes use of the zero-length array language
> extension to the C90 standard, but the preferred mechanism to declare
> variable-length types such as these ones is a flexible array
> member[1][2], introduced in C99:

Applied to 5.7/scsi-queue, thanks.

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1eeue5772.fsf%40oracle.com.


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

2020-01-27 Thread Martin K. Petersen


Gabriel,

> Thank you very much for the quick response!  I checked here again and
> I didn't get the previous email, but I see it made into the ML
> archive, so my apologies, it must be something bad on my (or my
> employer's) setup.

I didn't get it. Patchwork didn't either.

In any case: Applied to 5.7/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1h80gb72w.fsf%40oracle.com.


Re: [PATCH 0/3] drivers base: transport component error propagation

2020-01-15 Thread Martin K. Petersen


Gabriel,

> This small series improves error propagation on the transport
> component to prevent an inconsistent state in the iscsi module.  The
> bug that motivated this patch results in a hanging iscsi connection
> that cannot be used or removed by userspace, since the session is in
> an inconsistent state.
>
> That said, I tested it using the TCP iscsi transport (and forcing
> errors on the triggered function), which doesn't require a
> particularly complex container structure, so it is not the best test
> for finding corner cases on the atomic attribute_container_device
> trigger version.

Applied to 5.6/scsi-queue, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1pnfknjf7.fsf%40oracle.com.


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

2020-01-15 Thread Martin K. Petersen


> Please consider the v4 below with the lock added.

Lee: Please re-review this given the code change.

> 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
> SCSI path is never marked as down, multipath won't perform the
> failover and IO to the device will be forever waiting for that
> connection to come back.
>
> This patch performs the connection failure entirely inside the kernel.
> This way, the failover can happen and pending IO can continue even if
> the daemon is dead. Once the daemon comes alive again, it can execute
> recovery procedures if applicable.

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1tv4wnjm2.fsf%40oracle.com.


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

2020-01-15 Thread Martin K. Petersen


Gabriel,

> A faulty userspace that calls destroy_session() before destroying the
> connections can trigger the failure.  This patch prevents the issue by
> refusing to destroy the session if there are outstanding connections.

Applied to 5.6/scsi-queue, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1y2u8njpq.fsf%40oracle.com.


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

2019-12-09 Thread Martin K. Petersen


Lee,

> My sincere apologies. I told wubo I had already reviewed the patch, so
> he didn't need another Reviewed-by from me. I see I was wrong.

OK.

The patch was all mangled so I had to apply the changes by hand. Can't
say that I'm a big fan of retries going negative but I guess that's just
personal taste.

Applied to 5.5/scsi-fixes. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq18snlnel6.fsf%40oracle.com.


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

2019-12-09 Thread Martin K. Petersen


wubo,

> 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 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 
> Reviewed-by: Zhiqiang Liu 
> Reviewed-by: Lee Duncan 

I haven't seen a Reviewed-by: from Lee on this patch.

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1o8whqem3.fsf%40oracle.com.


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

2019-11-26 Thread Martin K. Petersen


Gabriel,

> Although, looks like the MAINTAINERS file doesn't list linux-scsi as
> the target for iscsi patches.  Would you take the fix below to address
> that?

Applied to 5.5/scsi-queue, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1d0de825o.fsf%40oracle.com.


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

2019-11-18 Thread Martin K. Petersen


Gabriel,

> If a faulty initiator fails to bind the socket to the iSCSI connection
> before emitting a command, for instance, a subsequent send_pdu, it
> will crash the kernel due to a null pointer dereference in
> sock_sendmsg(), as shown in the log below.  This make sure the bind
> succeeded before trying to use the socket.

Applied to 5.5/scsi-queue. But please make sure to send patch
submissions to linux-s...@vger.kernel.org.

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq136ekifn0.fsf%40oracle.com.


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

2019-11-18 Thread Martin K. Petersen


Gabriel,

> A faulty userspace that calls destroy_session() before destroying the
> connections can trigger the failure.  This patch prevents the issue by
> refusing to destroy the session if there are outstanding connections.

Ditto. Please send to linux-scsi@vger.

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq1y2wch11i.fsf%40oracle.com.


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

2019-11-12 Thread Martin K. Petersen


> 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 deadloop 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,

Lee/Chris/Ulrich: Please review!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/yq18soksgji.fsf%40oracle.com.


Re: [PATCH 12/24] libfc: switch to SPDX tags

2019-05-13 Thread Martin K. Petersen


Christoph,

> Use the the GPLv2 SPDX tag instead of verbose boilerplate text.

Applied to 5.3/scsi-queue except for patch #24.

Patch #13 used /* */ syntax on some of the .c files. I fixed those up.

-- 
Martin K. Petersen  Oracle Linux Engineering


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

2019-03-06 Thread Martin K. Petersen


Vasily,

> In "XFS over network block device" scenario XFS can create IO requests
> with slab-based XFS metadata. During processing such requests
> tcp_sendpage() can merge skb fragments with neighbour slab objects.

Applied to 5.1/scsi-queue, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


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

2019-03-06 Thread Martin K. Petersen


Vasily,

> James, Martin, noone replied 2 weeks, could you please pick up this
> patch?

No objections from me wrt. to the change. However, I am awaiting a
review from the iSCSI maintainers Lee and Chris.

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


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

2019-02-15 Thread Martin K. Petersen


Bob,

> When a target sends Check Condition, whilst initiator is busy xmiting
> re-queued data, could lead to race between iscsi_complete_task() and
> iscsi_xmit_task() and eventually crashing with the following kernel
> backtrace.

Applied to 5.0/scsi-fixes, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


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

2018-12-20 Thread Martin K. Petersen


Fred,

> This commit enhances iscsi initiator modules to capture iscsi debug
> messages using linux kernel tracepoint facility:

Applied to 4.21/scsi-queue, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


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

2018-11-28 Thread Martin K. Petersen


Fred,

> This commit addresses NULL pointer dereference in
> iscsi_eh_session_reset.  Reference should not be made to
> session->leadconn when session->state is set to ISCSI_STATE_TERMINATE.

Applied to 4.20/scsi-fixes, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


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

2018-03-19 Thread Martin K. Petersen

Jianchao,

> iscsi tcp will first send out data, then calculate and send data
> digest. If we don't have BDI_CAP_STABLE_WRITES, the page cache will
> be written in spite of the on going writeback. Consequently, wrong
> digest will be got and sent to target.
>
> To fix this, set BDI_CAP_STABLE_WRITES when data digest is enabled
> in iscsi_tcp .slave_configure callback.

Applied to 4.16/scsi-fixes. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


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

2018-03-14 Thread Martin K. Petersen

> iscsi tcp will first send out data, then calculate and send data
> digest. If we don't have BDI_CAP_STABLE_WRITES, the page cache will
> be written in spite of the on going writeback. Consequently, wrong
> digest will be got and sent to target.
>
> To fix this, set BDI_CAP_STABLE_WRITES when data digest is enabled
> in iscsi_tcp .slave_configure callback.

Lee, Chris: Please review!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


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

2018-03-14 Thread Martin K. Petersen

> Never directly free @dev after calling device_register(), even
> if it returned an error! Always use put_device() to give up the
> reference initialized.

Lee, Chris: Please review!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


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

2018-01-03 Thread Martin K. Petersen

Rafael,

> If, for any reason, userland shuts down iscsi transport interfaces
> before proper logouts - like when logging in to LUNs manually, without
> logging out on server shutdown, or when automated scripts can't
> umount/logout from logged LUNs - kernel will hang forever on its
> sd_sync_cache() logic, after issuing the SYNCHRONIZE_CACHE cmd to all
> still existent paths.

Applied to 4.16/scsi-queue. Thank you!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


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

2017-12-20 Thread Martin K. Petersen

> If, for any reason, userland shuts down iscsi transport interfaces
> before proper logouts - like when logging in to LUNs manually, without
> logging out on server shutdown, or when automated scripts can't
> umount/logout from logged LUNs - kernel will hang forever on its
> sd_sync_cache() logic, after issuing the SYNCHRONIZE_CACHE cmd to all
> still existent paths.

Chris and Lee: Please review. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


Re: [PATCH] scsi: scsi_transport_iscsi: fix spelling mistake: 'Cound' -> 'Could'

2017-10-31 Thread Martin K. Petersen

Arvind,

> Trivial fix to spelling mistakes in 'iscsi_get_host_stats'.

Applied to 4.15/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


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

2017-10-16 Thread Martin K. Petersen

Kees,

> 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.

Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com>

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


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

2017-10-02 Thread Martin K. Petersen

Khazhismel,

> Noticed these don't seem to be in 4.14/scsi-queue

Not sure what happened there. I apologize.

They are now in 4.14/scsi-fixes.

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


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

2017-08-29 Thread Martin K. Petersen

Chris,

> Looks good to me, fixes up the code given that the comment there about
> calling iscsi_remove_session wasn't being followed.

Applied these two to 4.14/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


Re: [PATCH 13/15] scsi: make device_type const

2017-08-25 Thread Martin K. Petersen

Bhumika,

> Make these const as they are only stored in the type field of a device
> structure, which is const.

Applied to 4.14/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


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

2017-03-15 Thread Martin K. Petersen
Elena Reshetova <elena.reshet...@intel.com> writes:

> refcount_t type and corresponding API should be used instead of
> atomic_t when the variable is used as a reference counter. This allows
> to avoid accidental refcounter overflows that might lead to
> use-after-free situations.

Applied to 4.12/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


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

2017-02-28 Thread Martin K. Petersen
>>>>> "Chris" == Chris Leech <cle...@redhat.com> writes:

Chris> There's a rather long standing regression from the commit
Chris> "libiscsi: Reduce locking contention in fast path"

Applied to 4.11/scsi-fixes.

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


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

2017-02-23 Thread Martin K. Petersen
>>>>> "Chris" == Chris Leech <cle...@redhat.com> writes:

Chris> There's a rather long standing regression from commit 659743b
Chris> [SCSI] libiscsi: Reduce locking contention in fast path

Chris> Depending on iSCSI target behavior, it's possible to hit the case
Chris> in iscsi_complete_task where the task is still on a pending list
Chris> (!list_empty(>running)).  When that happens the task is
Chris> removed from the list while holding the session back_lock, but
Chris> other task list modification occur under the frwd_lock.  That
Chris> leads to linked list corruption and eventually a panicked system.

Chris> Rather than back out the session lock split entirely, in order to
Chris> try and keep some of the performance gains this patch adds
Chris> another lock to maintain the task lists integrity.

Chris> Major enterprise supported kernels have been backing out the lock
Chris> split for while now, thanks to the efforts at IBM where a lab
Chris> setup has the most reliable reproducer I've seen on this issue.
Chris> This patch has been tested there successfully.

Reviews, please!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


Re: [PATCHv2] MAINTAINERS: Update open-iscsi maintainers

2016-09-27 Thread Martin K. Petersen
>>>>> "Lee" == Lee Duncan <ldun...@suse.com> writes:

Lee> Yes, that would be great. Thank you.

Applied to 4.9/scsi-queue.

>> Is it your plan to go through the SCSI tree?

Lee> Yes, the iscsi initiator kernel code updates have been going
Lee> through the Linux SCSI mailing list and repository for a while,
Lee> now.

Yep. Just wanted to make sure.

Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


Re: [PATCHv2] MAINTAINERS: Update open-iscsi maintainers

2016-09-26 Thread Martin K. Petersen
>>>>> "Lee" == Lee Duncan <ldun...@suse.com> writes:

Lee,

Lee> Chris Leech and I are taking over as open-iscsi maintainers.

Do you want me to queue the MAINTAINER update?

Lee>  * Removed git repository, since code in tree

Is it your plan to go through the SCSI tree?

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


Re: [PATCH] Use ida_simple for SCSI iSCSI transport session id

2016-03-07 Thread Martin K. Petersen
>>>>> "Lee" == Lee Duncan <ldun...@suse.com> writes:

Lee> It looks like Mike and Chris are good with it.

However, it received no formal reviews or acked-bys...

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


Re: iSCSI request keep rejected by microsoft iSCSI target because of write_same check

2014-12-03 Thread Martin K. Petersen
 Mike == Mike Christie micha...@cs.wisc.edu writes:

Mike Are you sure about this? The issue you are talking about and the
Mike one jazz is is the same issue right?

Oh, I see. I wasn't CC:ed on the first part of this thread so I missed
the fact that it was RSOC that was the problem. I read the mail
yesterday as if we got bad response to WRITE SAME(10/16).

Mike I do not have any of the old replies from MS, but I have some of
Mike the mails I sent them. It looks like we were asking them about
Mike when sd.c would send a REPORT SUPPORTED OPERATION, the old MS
Mike target would return the iscsi specific error code. And it looks
Mike like they had us try a updated version and in there it was changed
Mike to just work on their side.

I wasn't included in any exchanges beyond we'll have a look. So I
don't have much data to go on.

Mike j...@deti74.ru's patch would work around the same problem because
Mike in sd_read_write_same, sd would see no_write_same is set and not
Mike send REPORT SUPPORTED OPERATION.

Yeah. 

I still don't have a problem quirking the MS target. As long as I can
get good strings and revs to match on. Obviously setting no_write_same
for all iSCSI targets is a no-go.

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


Re: iSCSI request keep rejected by microsoft iSCSI target because of write_same check

2014-12-03 Thread Martin K. Petersen
 Mike == Mike Christie micha...@cs.wisc.edu writes:

Mike Shot, not sure what was tested in that thread now. I tried out
Mike the newer MS iscsi target, 3.3, and still hit the same issue that
Mike was reported here.

Mike What info did you need? Here is vendor/product/version info:

Just sent out a proposed patch.

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


Re: iSCSI request keep rejected by microsoft iSCSI target because of write_same check

2014-12-02 Thread Martin K. Petersen
 Mike == Michael Christie micha...@cs.wisc.edu writes:

Mike,

Mike This was the issue we worked with Microsoft on wasn’t it? You guys
Mike figured out it was fixed in their target in a recent release
Mike right?

The issue we worked recently was wrt. the thin provisioning reporting.

The WRITE SAME problem was that the target returns an iSCSI-specific
error code rather than a check condition with ILLEGAL REQUEST. You were
going to talk to MS.

However, if somebody sends me the relevant INQUIRY strings for the MS
target I'll add it to the WRITE SAME quirk list.

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


Re: iSCSI request keep rejected by microsoft iSCSI target because of write_same check

2014-01-09 Thread Martin K. Petersen
 Mike == Mike Christie micha...@cs.wisc.edu writes:

 2. report_opcode is optional in SPC-3, so it's possible that not all
 iscsi target support it. But is it correct for microsoft iSCSI target
 to reject the command rather than return it with normal SCSI
 response?

Mike The iscsi spec has the reason code command not supported so I
Mike guess it is ok for the target to do this. I do not think I have
Mike ever seen that reason code used in production level targets, so it
Mike is probably not common.

It's kind of unfriendly to not send a check condition...


Mike I think we should implement handling in the iscsi layer for it. I
Mike can make a patch if you have not already.

It would be awfully nice to get it turned into an ILLEGAL
REQUEST/0x20/0x0.

-- 
Martin K. Petersen  Oracle Linux Engineering

-- 
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...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/groups/opt_out.