Re: [PATCH] target: Avoid target_shutdown_sessions loop during queue_depth change

2017-06-01 Thread Nicholas A. Bellinger
On Thu, 2017-06-01 at 08:57 +0200, Christoph Hellwig wrote: > How about this slightly easier to read version? Fine by me. Applied.

Re: [PATCH] target: Avoid target_shutdown_sessions loop during queue_depth change

2017-06-01 Thread Nicholas A. Bellinger
On Thu, 2017-06-01 at 08:57 +0200, Christoph Hellwig wrote: > How about this slightly easier to read version? Fine by me. Applied.

[PATCH-v2] target/iblock: Convert WRITE_SAME to blkdev_issue_zeroout

2017-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> The people who are actively using iblock_execute_write_same_direct() are doing so in the context of ESX VAAI BlockZero, together with EXTENDED_COPY and COMPARE_AND_WRITE primitives. In practice though I've not seen any users of IBLOCK WRIT

[PATCH-v2] target/iblock: Convert WRITE_SAME to blkdev_issue_zeroout

2017-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger The people who are actively using iblock_execute_write_same_direct() are doing so in the context of ESX VAAI BlockZero, together with EXTENDED_COPY and COMPARE_AND_WRITE primitives. In practice though I've not seen any users of IBLOCK WRITE_SAME for anything other than

[PATCH] target: Avoid target_shutdown_sessions loop during queue_depth change

2017-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> When target_shutdown_sessions() is invoked to shutdown all active sessions associated with a se_node_acl when se_node_acl->queue_depth is changed via core_tpg_set_initiator_node_queue_depth(), it's possible that new connections reconnect im

[PATCH] target: Avoid target_shutdown_sessions loop during queue_depth change

2017-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger When target_shutdown_sessions() is invoked to shutdown all active sessions associated with a se_node_acl when se_node_acl->queue_depth is changed via core_tpg_set_initiator_node_queue_depth(), it's possible that new connections reconnect immediately after expli

Re: [PATCH] iscsi: Fix a sleep-in-atomic bug

2017-06-01 Thread Nicholas A. Bellinger
Hi Jia-Ju, On Wed, 2017-05-31 at 11:26 +0800, Jia-Ju Bai wrote: > The driver may sleep under a spin lock, and the function call path is: > iscsit_tpg_enable_portal_group (acquire the lock by spin_lock) > iscsi_update_param_value > kstrdup(GFP_KERNEL) --> may sleep > > To fix it, the

Re: [PATCH] iscsi: Fix a sleep-in-atomic bug

2017-06-01 Thread Nicholas A. Bellinger
Hi Jia-Ju, On Wed, 2017-05-31 at 11:26 +0800, Jia-Ju Bai wrote: > The driver may sleep under a spin lock, and the function call path is: > iscsit_tpg_enable_portal_group (acquire the lock by spin_lock) > iscsi_update_param_value > kstrdup(GFP_KERNEL) --> may sleep > > To fix it, the

Re: [PATCH] tcmu: Add fifo type waiter list support to avoid starvation

2017-06-01 Thread Nicholas A. Bellinger
Hey MNC, Any comments on this..? It's been sitting on the list for a while now.. ;) On Fri, 2017-05-05 at 10:51 +0800, lixi...@cmss.chinamobile.com wrote: > From: Xiubo Li > > The fifo type waiter list will hold the udevs who are waiting for the > blocks from

Re: [PATCH] tcmu: Add fifo type waiter list support to avoid starvation

2017-06-01 Thread Nicholas A. Bellinger
Hey MNC, Any comments on this..? It's been sitting on the list for a while now.. ;) On Fri, 2017-05-05 at 10:51 +0800, lixi...@cmss.chinamobile.com wrote: > From: Xiubo Li > > The fifo type waiter list will hold the udevs who are waiting for the > blocks from the data global pool. The unmap

Re: linux-next: manual merge of the target-bva tree with the target-updates tree

2017-05-31 Thread Nicholas A. Bellinger
On Thu, 2017-06-01 at 05:05 +, Bart Van Assche wrote: > On Wed, 2017-05-31 at 21:27 -0700, Nicholas A. Bellinger wrote: > > but a weeks worth of list silence for your series doesn't mean > > you're free to push un-reviewed stuff for drivers/target/ into > > lin

Re: linux-next: manual merge of the target-bva tree with the target-updates tree

2017-05-31 Thread Nicholas A. Bellinger
On Thu, 2017-06-01 at 05:05 +, Bart Van Assche wrote: > On Wed, 2017-05-31 at 21:27 -0700, Nicholas A. Bellinger wrote: > > but a weeks worth of list silence for your series doesn't mean > > you're free to push un-reviewed stuff for drivers/target/ into > > lin

Re: linux-next: manual merge of the target-bva tree with the target-updates tree

2017-05-31 Thread Nicholas A. Bellinger
On Thu, 2017-06-01 at 04:59 +, Bart Van Assche wrote: > On Thu, 2017-06-01 at 14:10 +1000, Stephen Rothwell wrote: > > Hi Bart, > > > > Today's linux-next merge of the target-bva tree got a conflict in: > > > > drivers/target/target_core_transport.c > > > > between commit: > > > >

Re: linux-next: manual merge of the target-bva tree with the target-updates tree

2017-05-31 Thread Nicholas A. Bellinger
On Thu, 2017-06-01 at 04:59 +, Bart Van Assche wrote: > On Thu, 2017-06-01 at 14:10 +1000, Stephen Rothwell wrote: > > Hi Bart, > > > > Today's linux-next merge of the target-bva tree got a conflict in: > > > > drivers/target/target_core_transport.c > > > > between commit: > > > >

Re: linux-next: manual merge of the target-bva tree with the target-updates tree

2017-05-31 Thread Nicholas A. Bellinger
On Thu, 2017-06-01 at 14:10 +1000, Stephen Rothwell wrote: > Hi Bart, > > Today's linux-next merge of the target-bva tree got a conflict in: > > drivers/target/target_core_transport.c > > between commit: > > 4ff83daa0200 ("target: Re-add check to reject control WRITEs with overflow >

Re: linux-next: manual merge of the target-bva tree with the target-updates tree

2017-05-31 Thread Nicholas A. Bellinger
On Thu, 2017-06-01 at 14:10 +1000, Stephen Rothwell wrote: > Hi Bart, > > Today's linux-next merge of the target-bva tree got a conflict in: > > drivers/target/target_core_transport.c > > between commit: > > 4ff83daa0200 ("target: Re-add check to reject control WRITEs with overflow >

[GIT PULL] target fixes for v4.12-rc4

2017-05-31 Thread Nicholas A. Bellinger
. Ly (2): ibmvscsis: Clear left-over abort_cmd pointers ibmvscsis: Fix the incorrect req_lim_delta Jiang Yi (1): iscsi-target: Always wait for kthread_should_stop() before kthread exit Mike Christie (1): tcmu: fix crash during device removal Nicholas Bellinger (2): target: Re-add

[GIT PULL] target fixes for v4.12-rc4

2017-05-31 Thread Nicholas A. Bellinger
. Ly (2): ibmvscsis: Clear left-over abort_cmd pointers ibmvscsis: Fix the incorrect req_lim_delta Jiang Yi (1): iscsi-target: Always wait for kthread_should_stop() before kthread exit Mike Christie (1): tcmu: fix crash during device removal Nicholas Bellinger (2): target: Re-add

Re: [PATCH] iscsi-target: Fix initial login PDU asynchronous socket close OOPs

2017-05-31 Thread Nicholas A. Bellinger
On Wed, 2017-05-31 at 15:28 -0500, Mike Christie wrote: > On 05/30/2017 11:58 PM, Nicholas A. Bellinger wrote: > > Hey MNC, > > > > On Fri, 2017-05-26 at 22:14 -0500, Mike Christie wrote: > >> Thanks for the patch. > >> The patch fixes the cra

Re: [PATCH] iscsi-target: Fix initial login PDU asynchronous socket close OOPs

2017-05-31 Thread Nicholas A. Bellinger
On Wed, 2017-05-31 at 15:28 -0500, Mike Christie wrote: > On 05/30/2017 11:58 PM, Nicholas A. Bellinger wrote: > > Hey MNC, > > > > On Fri, 2017-05-26 at 22:14 -0500, Mike Christie wrote: > >> Thanks for the patch. > >> The patch fixes the cra

Re: [PATCH] iscsi-target: Fix initial login PDU asynchronous socket close OOPs

2017-05-30 Thread Nicholas A. Bellinger
12:32 AM, Nicholas A. Bellinger wrote: > > > > - state = iscsi_target_sk_state_check(sk); > > - write_unlock_bh(>sk_callback_lock); > > - > > - pr_debug("iscsi_target_sk_state_change: state: %d\n", state); > > + orig_state_change

Re: [PATCH] iscsi-target: Fix initial login PDU asynchronous socket close OOPs

2017-05-30 Thread Nicholas A. Bellinger
12:32 AM, Nicholas A. Bellinger wrote: > > > > - state = iscsi_target_sk_state_check(sk); > > - write_unlock_bh(>sk_callback_lock); > > - > > - pr_debug("iscsi_target_sk_state_change: state: %d\n", state); > > + orig_state_change

[PATCH] iscsi-target: Fix initial login PDU asynchronous socket close OOPs

2017-05-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch fixes a OOPs originally introduced by: commit bb048357dad6d604520c91586334c9c230366a14 Author: Nicholas Bellinger <n...@linux-iscsi.org> Date: Thu Sep 5 14:54:04 2013 -0700 iscsi-target: Add sk->sk_state_ch

[PATCH] iscsi-target: Fix initial login PDU asynchronous socket close OOPs

2017-05-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch fixes a OOPs originally introduced by: commit bb048357dad6d604520c91586334c9c230366a14 Author: Nicholas Bellinger Date: Thu Sep 5 14:54:04 2013 -0700 iscsi-target: Add sk->sk_state_change to cleanup after TCP failure which would trig

Re: [RESEND PATCH] vhost/scsi: Don't reinvent the wheel but use existing llist API

2017-05-23 Thread Nicholas A. Bellinger
On Fri, 2017-05-12 at 09:42 +0900, Byungchul Park wrote: > Although llist provides proper APIs, they are not used. Make them used. > > Signed-off-by: Byungchul Park <byungchul.p...@lge.com> > Acked-by: Nicholas Bellinger <n...@linux-iscsi.org> > --- > drivers/vhos

Re: [RESEND PATCH] vhost/scsi: Don't reinvent the wheel but use existing llist API

2017-05-23 Thread Nicholas A. Bellinger
On Fri, 2017-05-12 at 09:42 +0900, Byungchul Park wrote: > Although llist provides proper APIs, they are not used. Make them used. > > Signed-off-by: Byungchul Park > Acked-by: Nicholas Bellinger > --- > drivers/vhost/scsi.c | 11 +++ > 1 file changed, 3 inser

Re: [PATCH] target: remove dead code

2017-05-23 Thread Nicholas A. Bellinger
On Thu, 2017-05-11 at 13:39 -0700, Tyrel Datwyler wrote: > On 05/09/2017 02:46 PM, Gustavo A. R. Silva wrote: > > Local variable _ret_ is assigned to a constant value and it is never > > updated again. Remove this variable and the dead code it guards. > > > > Addresses-Coverity-ID: 140761 > >

Re: [PATCH] target: remove dead code

2017-05-23 Thread Nicholas A. Bellinger
On Thu, 2017-05-11 at 13:39 -0700, Tyrel Datwyler wrote: > On 05/09/2017 02:46 PM, Gustavo A. R. Silva wrote: > > Local variable _ret_ is assigned to a constant value and it is never > > updated again. Remove this variable and the dead code it guards. > > > > Addresses-Coverity-ID: 140761 > >

[GIT PULL] target updates for v4.12-rc1

2017-05-11 Thread Nicholas A. Bellinger
ule removal due to stuck thread Nicholas Bellinger (4): target: Fix compare_and_write_callback handling for non GOOD status iscsi-target: Set session_fall_back_to_erl0 when forcing reinstatement target: Don't force session reset if queue_depth does not change Revert "target: Fi

[GIT PULL] target updates for v4.12-rc1

2017-05-11 Thread Nicholas A. Bellinger
ule removal due to stuck thread Nicholas Bellinger (4): target: Fix compare_and_write_callback handling for non GOOD status iscsi-target: Set session_fall_back_to_erl0 when forcing reinstatement target: Don't force session reset if queue_depth does not change Revert "target: Fi

[PATCH] target: Re-add check to reject control WRITEs with overflow data

2017-05-11 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> During v4.3 when the overflow/underflow check was relaxed by commit c72c525022: commit c72c5250224d475614a00c1d7e54a67f77cd3410 Author: Roland Dreier <rol...@purestorage.com> Date: Wed Jul 22 15:08:18 2015 -0700 t

[PATCH] target: Re-add check to reject control WRITEs with overflow data

2017-05-11 Thread Nicholas A. Bellinger
From: Nicholas Bellinger During v4.3 when the overflow/underflow check was relaxed by commit c72c525022: commit c72c5250224d475614a00c1d7e54a67f77cd3410 Author: Roland Dreier Date: Wed Jul 22 15:08:18 2015 -0700 target: allow underflow/overflow for PR OUT etc. commands

[PATCH 3/3] target: Don't force session reset if queue_depth does not change

2017-05-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> Keeping in the idempotent nature of target_core_fabric_configfs.c, if a queue_depth value is set and it's the same as the existing value, don't attempt to force session reinstatement. Reported-by: Raghu Krishnamurthy <r...@datera.io&g

[PATCH 3/3] target: Don't force session reset if queue_depth does not change

2017-05-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Keeping in the idempotent nature of target_core_fabric_configfs.c, if a queue_depth value is set and it's the same as the existing value, don't attempt to force session reinstatement. Reported-by: Raghu Krishnamurthy Cc: Raghu Krishnamurthy Tested-by: Gary Guo Cc

[PATCH 0/3] target: Fixes for v4.12-rc1

2017-05-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> Hi all, Here are a couple of fixes from the last weeks testing while continuing longevity and scale out workloads on v4.x target code. This series contains three patches. The first is to address a COMPARE_AND_WRITE se_cmd reference leak

[PATCH 1/3] target: Fix compare_and_write_callback handling for non GOOD status

2017-05-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> Following the bugfix for handling non SAM_STAT_GOOD COMPARE_AND_WRITE status during COMMIT phase in commit 9b2792c3da1, the same bug exists for the READ phase as well. This would manifest first as a lost SCSI response, and eventual hung task

[PATCH 0/3] target: Fixes for v4.12-rc1

2017-05-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi all, Here are a couple of fixes from the last weeks testing while continuing longevity and scale out workloads on v4.x target code. This series contains three patches. The first is to address a COMPARE_AND_WRITE se_cmd reference leak where the READ phase hits a non

[PATCH 1/3] target: Fix compare_and_write_callback handling for non GOOD status

2017-05-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Following the bugfix for handling non SAM_STAT_GOOD COMPARE_AND_WRITE status during COMMIT phase in commit 9b2792c3da1, the same bug exists for the READ phase as well. This would manifest first as a lost SCSI response, and eventual hung task during fabric driver logout

[PATCH 2/3] iscsi-target: Set session_fall_back_to_erl0 when forcing reinstatement

2017-05-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> While testing modification of per se_node_acl queue_depth forcing session reinstatement via lio_target_nacl_cmdsn_depth_store() -> core_tpg_set_initiator_node_queue_depth(), a hung task bug triggered when changing cmdsn_depth invoke

[PATCH 2/3] iscsi-target: Set session_fall_back_to_erl0 when forcing reinstatement

2017-05-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger While testing modification of per se_node_acl queue_depth forcing session reinstatement via lio_target_nacl_cmdsn_depth_store() -> core_tpg_set_initiator_node_queue_depth(), a hung task bug triggered when changing cmdsn_depth invoked session reinstatement while an is

Re: [PATCH] tcmu: Recalculate the tcmu_cmd size to save cmd area memories

2017-05-02 Thread Nicholas A. Bellinger
On Tue, 2017-05-02 at 21:06 -0500, Mike Christie wrote: > On 05/02/2017 02:54 AM, lixi...@cmss.chinamobile.com wrote: > > From: Xiubo Li > > > > For the "struct tcmu_cmd_entry" in cmd area, the minimum size > > will be sizeof(struct tcmu_cmd_entry) == 112 Bytes. And

Re: [PATCH] tcmu: Recalculate the tcmu_cmd size to save cmd area memories

2017-05-02 Thread Nicholas A. Bellinger
On Tue, 2017-05-02 at 21:06 -0500, Mike Christie wrote: > On 05/02/2017 02:54 AM, lixi...@cmss.chinamobile.com wrote: > > From: Xiubo Li > > > > For the "struct tcmu_cmd_entry" in cmd area, the minimum size > > will be sizeof(struct tcmu_cmd_entry) == 112 Bytes. And it could > > fill about

Re: [PATCH v7 0/2] tcmu: Dynamic growing data area support

2017-05-01 Thread Nicholas A. Bellinger
On Tue, 2017-05-02 at 11:38 +0800, lixi...@cmss.chinamobile.com wrote: > From: Xiubo Li > > Changed for V7: > - #1 fix two issues. > - #2 fix kbuild warning and some issues. > > Changed for V6: > - Remove the tcmu_vma_close(). Since the unmap thread will do the

Re: [PATCH v7 0/2] tcmu: Dynamic growing data area support

2017-05-01 Thread Nicholas A. Bellinger
On Tue, 2017-05-02 at 11:38 +0800, lixi...@cmss.chinamobile.com wrote: > From: Xiubo Li > > Changed for V7: > - #1 fix two issues. > - #2 fix kbuild warning and some issues. > > Changed for V6: > - Remove the tcmu_vma_close(). Since the unmap thread will do the same for it > - The unmap thread

Re: [PATCH v6 2/2] tcmu: Add global data block pool support

2017-05-01 Thread Nicholas A. Bellinger
On Mon, 2017-05-01 at 13:40 -0500, Mike Christie wrote: > On 04/30/2017 06:29 AM, Xiubo Li wrote: > > [...] > >> To avoid starvation, I think you want a second list/fifo that holds the > >> watiers. In tcmu_get_empty_block if the list is not empty, record how > >> many pages we needed and then

Re: [PATCH v6 2/2] tcmu: Add global data block pool support

2017-05-01 Thread Nicholas A. Bellinger
On Mon, 2017-05-01 at 13:40 -0500, Mike Christie wrote: > On 04/30/2017 06:29 AM, Xiubo Li wrote: > > [...] > >> To avoid starvation, I think you want a second list/fifo that holds the > >> watiers. In tcmu_get_empty_block if the list is not empty, record how > >> many pages we needed and then

Re: [PATCH v6 0/2] tcmu: Dynamic growing data area support

2017-05-01 Thread Nicholas A. Bellinger
Hi Xiubo & Co, On Wed, 2017-04-26 at 14:25 +0800, lixi...@cmss.chinamobile.com wrote: > From: Xiubo Li > > Changed for V6: > - Remove the tcmu_vma_close(). Since the unmap thread will do the same for it > - The unmap thread will skip the busy devices. > - Using

Re: [PATCH v6 0/2] tcmu: Dynamic growing data area support

2017-05-01 Thread Nicholas A. Bellinger
Hi Xiubo & Co, On Wed, 2017-04-26 at 14:25 +0800, lixi...@cmss.chinamobile.com wrote: > From: Xiubo Li > > Changed for V6: > - Remove the tcmu_vma_close(). Since the unmap thread will do the same for it > - The unmap thread will skip the busy devices. > - Using and testing the V5 version 3

Re: [PATCH 0/5] target: Fine-tuning for some function implementations

2017-05-01 Thread Nicholas A. Bellinger
Hi Markus, Apologies for the delayed follow-up here as well. On Sun, 2017-04-09 at 21:43 +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 9 Apr 2017 21:33:21 +0200 > > A few update suggestions were taken into account > from static source code

Re: [PATCH 0/5] target: Fine-tuning for some function implementations

2017-05-01 Thread Nicholas A. Bellinger
Hi Markus, Apologies for the delayed follow-up here as well. On Sun, 2017-04-09 at 21:43 +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 9 Apr 2017 21:33:21 +0200 > > A few update suggestions were taken into account > from static source code analysis. > > Markus Elfring

[GIT PULL] target fixes for v4.11-rc7

2017-04-11 Thread Nicholas A. Bellinger
aren't CC'ed here, they'll be posted to Greg-KH separately. Thank you, --nab Manish Narani (1): usb: gadget: Correct usb EP argument for BOT status request Mike Christie (1): target: Fix ALUA transition state race between multiple initiators Nicholas Bellinger (7): tcmu: Allow cmd_time_out

[GIT PULL] target fixes for v4.11-rc7

2017-04-11 Thread Nicholas A. Bellinger
aren't CC'ed here, they'll be posted to Greg-KH separately. Thank you, --nab Manish Narani (1): usb: gadget: Correct usb EP argument for BOT status request Mike Christie (1): target: Fix ALUA transition state race between multiple initiators Nicholas Bellinger (7): tcmu: Allow cmd_time_out

Re: [PATCH] tcmu: Skip Data-Out blocks before gathering Data-In buffer for BIDI case

2017-04-02 Thread Nicholas A. Bellinger
On Fri, 2017-03-31 at 10:35 +0800, lixi...@cmss.chinamobile.com wrote: > From: Xiubo Li > > For the bidirectional case, the Data-Out buffer blocks will always at > the head of the tcmu_cmd's bitmap, and before gathering the Data-In > buffer, first of all it should

Re: [PATCH] tcmu: Skip Data-Out blocks before gathering Data-In buffer for BIDI case

2017-04-02 Thread Nicholas A. Bellinger
On Fri, 2017-03-31 at 10:35 +0800, lixi...@cmss.chinamobile.com wrote: > From: Xiubo Li > > For the bidirectional case, the Data-Out buffer blocks will always at > the head of the tcmu_cmd's bitmap, and before gathering the Data-In > buffer, first of all it should skip the Data-Out ones, or the

Re: [PATCH 1/2] iscsi-target: Fix TMR reference leak during session shutdown

2017-04-02 Thread Nicholas A. Bellinger
On Thu, 2017-03-30 at 17:08 +, Bart Van Assche wrote: > On Thu, 2017-03-30 at 08:29 +0000, Nicholas A. Bellinger wrote: > > diff --git a/drivers/target/iscsi/iscsi_target_util.c > > b/drivers/target/iscsi/iscsi_target_util.c > > index 5041a9c..b464033 100644 > >

Re: [PATCH 1/2] iscsi-target: Fix TMR reference leak during session shutdown

2017-04-02 Thread Nicholas A. Bellinger
On Thu, 2017-03-30 at 17:08 +, Bart Van Assche wrote: > On Thu, 2017-03-30 at 08:29 +0000, Nicholas A. Bellinger wrote: > > diff --git a/drivers/target/iscsi/iscsi_target_util.c > > b/drivers/target/iscsi/iscsi_target_util.c > > index 5041a9c..b464033 100644 > >

[PATCH] iscsi-target: Drop work-around for legacy GlobalSAN initiator

2017-04-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> Once upon a time back in 2009, a work-around was added to support the GlobalSAN iSCSI initiator v3.3 for MacOSX, which during login did not propose nor respond to MaxBurstLength, FirstBurstLength, DefaultTime2Wait and DefaultTime2Retai

[PATCH] iscsi-target: Drop work-around for legacy GlobalSAN initiator

2017-04-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Once upon a time back in 2009, a work-around was added to support the GlobalSAN iSCSI initiator v3.3 for MacOSX, which during login did not propose nor respond to MaxBurstLength, FirstBurstLength, DefaultTime2Wait and DefaultTime2Retain keys. The work-around

Re: [PATCH 4.10 15/17] qla2xxx: Allow vref count to timeout on vport delete.

2017-03-31 Thread Nicholas A. Bellinger
> Signed-off-by: Joe Carnuccio <joe.carnuc...@cavium.com> > Signed-off-by: Himanshu Madhani <himanshu.madh...@cavium.com> > Signed-off-by: Nicholas Bellinger <n...@linux-iscsi.org> > Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> > > --- > dr

Re: [PATCH 4.10 15/17] qla2xxx: Allow vref count to timeout on vport delete.

2017-03-31 Thread Nicholas A. Bellinger
> Signed-off-by: Himanshu Madhani > Signed-off-by: Nicholas Bellinger > Signed-off-by: Greg Kroah-Hartman > > --- > drivers/scsi/qla2xxx/qla_attr.c |4 +--- > drivers/scsi/qla2xxx/qla_def.h |6 +- > drivers/scsi/qla2xxx/qla_init.c |1 + > drivers/scsi/ql

[PATCH 2/2] target: Avoid mappedlun symlink creation during lun shutdown

2017-03-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch closes a race between se_lun deletion during configfs unlink in target_fabric_port_unlink() -> core_dev_del_lun() -> core_tpg_remove_lun(), when transport_clear_lun_ref() blocks waiting for percpu_ref RCU grace period to finis

[PATCH 2/2] target: Avoid mappedlun symlink creation during lun shutdown

2017-03-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch closes a race between se_lun deletion during configfs unlink in target_fabric_port_unlink() -> core_dev_del_lun() -> core_tpg_remove_lun(), when transport_clear_lun_ref() blocks waiting for percpu_ref RCU grace period to finish, but a new NodeACL map

[PATCH 1/2] iscsi-target: Fix TMR reference leak during session shutdown

2017-03-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch fixes a iscsi-target specific TMR reference leak during session shutdown, that could occur when a TMR was quiesced before the hand-off back to iscsi-target code via transport_cmd_check_stop_to_fabric(). The reference leak happens b

[PATCH 1/2] iscsi-target: Fix TMR reference leak during session shutdown

2017-03-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch fixes a iscsi-target specific TMR reference leak during session shutdown, that could occur when a TMR was quiesced before the hand-off back to iscsi-target code via transport_cmd_check_stop_to_fabric(). The reference leak happens because iscsit_free_cmd

[PATCH 0/2] target: Bug-fixes for v4.11-rc

2017-03-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> Hi all, Here are two additional target bug-fixes that have been found by the DATERA Q/A + automation team during extended longevity and stress testing atop v4.1.y stable code. The first is a iscsi-target specific TMR reference leak during s

[PATCH 0/2] target: Bug-fixes for v4.11-rc

2017-03-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi all, Here are two additional target bug-fixes that have been found by the DATERA Q/A + automation team during extended longevity and stress testing atop v4.1.y stable code. The first is a iscsi-target specific TMR reference leak during session shutdown when se_cmd

Re: [PATCH 24/29] drivers: convert iblock_req.pending from atomic_t to refcount_t

2017-03-21 Thread Nicholas A. Bellinger
Hi Elena, On Mon, 2017-03-06 at 16:21 +0200, Elena Reshetova wrote: > 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 >

Re: [PATCH 24/29] drivers: convert iblock_req.pending from atomic_t to refcount_t

2017-03-21 Thread Nicholas A. Bellinger
Hi Elena, On Mon, 2017-03-06 at 16:21 +0200, Elena Reshetova wrote: > 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 >

Re: [PATCH] usb: gadget: Correct usb EP argument for BOT status request

2017-03-21 Thread Nicholas A. Bellinger
Hi Manish, (Added target-devel CC') On Mon, 2017-03-20 at 15:05 +0530, Manish Narani wrote: > This patch corrects the argument in usb_ep_free_request as it is > mistakenly set to ep_out. It should be ep_in for status request. > > Signed-off-by: Manish Narani > --- >

Re: [PATCH] usb: gadget: Correct usb EP argument for BOT status request

2017-03-21 Thread Nicholas A. Bellinger
Hi Manish, (Added target-devel CC') On Mon, 2017-03-20 at 15:05 +0530, Manish Narani wrote: > This patch corrects the argument in usb_ep_free_request as it is > mistakenly set to ep_out. It should be ep_in for status request. > > Signed-off-by: Manish Narani > --- >

Re: [GIT PULL] target fixes for v4.11-rc3

2017-03-18 Thread Nicholas A. Bellinger
On Sat, 2017-03-18 at 19:08 -0700, Nicholas A. Bellinger wrote: > Hello Linus, > > Here are the target-pending fixes for v4.11-rc3 code. Please go ahead > and pull from: > > git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master > > The bulk of th

Re: [GIT PULL] target fixes for v4.11-rc3

2017-03-18 Thread Nicholas A. Bellinger
On Sat, 2017-03-18 at 19:08 -0700, Nicholas A. Bellinger wrote: > Hello Linus, > > Here are the target-pending fixes for v4.11-rc3 code. Please go ahead > and pull from: > > git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master > > The bulk of th

[GIT PULL] target fixes for v4.11-rc3

2017-03-18 Thread Nicholas A. Bellinger
target: fix race during implicit transition work flushes tcmu: add helper to check if dev was configured tcmu: make cmd timeout configurable Nicholas Bellinger (3): target/pscsi: Fix TYPE_TAPE + TYPE_MEDIMUM_CHANGER export target: Drop pointless tfo->check_stop_free check tcmu: Conv

[GIT PULL] target fixes for v4.11-rc3

2017-03-18 Thread Nicholas A. Bellinger
target: fix race during implicit transition work flushes tcmu: add helper to check if dev was configured tcmu: make cmd timeout configurable Nicholas Bellinger (3): target/pscsi: Fix TYPE_TAPE + TYPE_MEDIMUM_CHANGER export target: Drop pointless tfo->check_stop_free check tcmu: Conv

[PATCH] target; Drop pointless tfo->check_stop_free check

2017-03-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> All in-tree fabric drivers provide a tfo->check_stop_free(), so there is no need to do the extra check within existing transport_cmd_check_stop_to_fabric() code. Just to be sure, add a check in target_fabric_tf_ops_check() to notify any ou

[PATCH] target; Drop pointless tfo->check_stop_free check

2017-03-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger All in-tree fabric drivers provide a tfo->check_stop_free(), so there is no need to do the extra check within existing transport_cmd_check_stop_to_fabric() code. Just to be sure, add a check in target_fabric_tf_ops_check() to notify any out-of-tree drivers that mi

Re: [PATCH 24/29] drivers: convert iblock_req.pending from atomic_t to refcount_t

2017-03-07 Thread Nicholas A. Bellinger
ers/target/target_core_iblock.c | 12 ++-- > drivers/target/target_core_iblock.h | 3 ++- > 2 files changed, 8 insertions(+), 7 deletions(-) For the target_core_iblock part: Acked-by: Nicholas Bellinger <n...@linux-iscsi.org>

Re: [PATCH 24/29] drivers: convert iblock_req.pending from atomic_t to refcount_t

2017-03-07 Thread Nicholas A. Bellinger
iles changed, 8 insertions(+), 7 deletions(-) For the target_core_iblock part: Acked-by: Nicholas Bellinger

[GIT PULL] target updates for v4.11-rc1

2017-03-02 Thread Nicholas A. Bellinger
dhani (2): qla2xxx: Remove SRR code qla2xxx: Remove unused reverse_ini_mode Joe Carnuccio (1): qla2xxx: Simplify usage of SRB structure in driver Mike Christie (1): target: export protocol identifier Nicholas Bellinger (3): target: Fix NULL dereference during LUN lookup + active I/O shutdown

[GIT PULL] target updates for v4.11-rc1

2017-03-02 Thread Nicholas A. Bellinger
dhani (2): qla2xxx: Remove SRR code qla2xxx: Remove unused reverse_ini_mode Joe Carnuccio (1): qla2xxx: Simplify usage of SRB structure in driver Mike Christie (1): target: export protocol identifier Nicholas Bellinger (3): target: Fix NULL dereference during LUN lookup + active I/O shutdown

Re: [PATCH] target: Fix NULL dereference during LUN lookup + active I/O shutdown

2017-03-01 Thread Nicholas A. Bellinger
On Thu, 2017-02-23 at 11:46 -0600, Bryant G. Ly wrote: > > From: Nicholas Bellinger <n...@linux-iscsi.org> > > > > When transport_clear_lun_ref() is shutting down a se_lun via > > configfs with new I/O in-flight, it's possible to trigger a > > NULL pointer der

Re: [PATCH] target: Fix NULL dereference during LUN lookup + active I/O shutdown

2017-03-01 Thread Nicholas A. Bellinger
On Thu, 2017-02-23 at 11:46 -0600, Bryant G. Ly wrote: > > From: Nicholas Bellinger > > > > When transport_clear_lun_ref() is shutting down a se_lun via > > configfs with new I/O in-flight, it's possible to trigger a > > NULL pointer dereference in transport_lookup

[PATCH] target: Fix NULL dereference during LUN lookup + active I/O shutdown

2017-02-22 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> When transport_clear_lun_ref() is shutting down a se_lun via configfs with new I/O in-flight, it's possible to trigger a NULL pointer dereference in transport_lookup_cmd_lun() due to the fact percpu_ref_get() doesn't do any __PERCPU_RE

[PATCH] target: Fix NULL dereference during LUN lookup + active I/O shutdown

2017-02-22 Thread Nicholas A. Bellinger
From: Nicholas Bellinger When transport_clear_lun_ref() is shutting down a se_lun via configfs with new I/O in-flight, it's possible to trigger a NULL pointer dereference in transport_lookup_cmd_lun() due to the fact percpu_ref_get() doesn't do any __PERCPU_REF_DEAD checking before incrementing

Re: [PATCH v3 4/9] vhost/scsi: Don't reinvent the wheel but use existing llist API

2017-02-18 Thread Nicholas A. Bellinger
nged, 3 insertions(+), 8 deletions(-) Acked-by: Nicholas Bellinger <n...@linux-iscsi.org>

Re: [PATCH v3 4/9] vhost/scsi: Don't reinvent the wheel but use existing llist API

2017-02-18 Thread Nicholas A. Bellinger
eletions(-) Acked-by: Nicholas Bellinger

Re: [PATCH] uapi: fix linux/target_core_user.h userspace compilation errors

2017-02-18 Thread Nicholas A. Bellinger
Hi Dmitry, On Wed, 2017-02-15 at 23:04 +0300, Dmitry V. Levin wrote: > Consistently use types from linux/types.h to fix the following > linux/target_core_user.h userspace compilation errors: > > /usr/include/linux/target_core_user.h:108:4: error: unknown type name > 'uint32_t' > uint32_t

Re: [PATCH] uapi: fix linux/target_core_user.h userspace compilation errors

2017-02-18 Thread Nicholas A. Bellinger
Hi Dmitry, On Wed, 2017-02-15 at 23:04 +0300, Dmitry V. Levin wrote: > Consistently use types from linux/types.h to fix the following > linux/target_core_user.h userspace compilation errors: > > /usr/include/linux/target_core_user.h:108:4: error: unknown type name > 'uint32_t' > uint32_t

[GIT PULL] target fixes for v4.10

2017-02-09 Thread Nicholas A. Bellinger
already enforcing at transport layer. (Bryant Ly + Steven Royer). Thank you, --nab Bryant G. Ly (1): ibmvscsis: Add SGL limit Nicholas Bellinger (5): target: Don't BUG_ON during NodeACL dynamic -> explicit conversion target: Use correct SCSI status during EXTENDED_COPY exception targe

[GIT PULL] target fixes for v4.10

2017-02-09 Thread Nicholas A. Bellinger
already enforcing at transport layer. (Bryant Ly + Steven Royer). Thank you, --nab Bryant G. Ly (1): ibmvscsis: Add SGL limit Nicholas Bellinger (5): target: Don't BUG_ON during NodeACL dynamic -> explicit conversion target: Use correct SCSI status during EXTENDED_COPY exception targe

Re: [PATCH 1/5] target: Don't BUG_ON during NodeACL dynamic -> explicit conversion

2017-02-08 Thread Nicholas A. Bellinger
On Tue, 2017-02-07 at 14:44 -0800, Christoph Hellwig wrote: > On Tue, Feb 07, 2017 at 01:17:46PM +0000, Nicholas A. Bellinger wrote: > > + if (orig->se_lun_acl != NULL) { > > + pr_warn_ratelimited("Detected existing explicit" > > +

Re: [PATCH 1/5] target: Don't BUG_ON during NodeACL dynamic -> explicit conversion

2017-02-08 Thread Nicholas A. Bellinger
On Tue, 2017-02-07 at 14:44 -0800, Christoph Hellwig wrote: > On Tue, Feb 07, 2017 at 01:17:46PM +0000, Nicholas A. Bellinger wrote: > > + if (orig->se_lun_acl != NULL) { > > + pr_warn_ratelimited("Detected existing explicit" > > +

Re: [PATCH 4/5] target: Fix multi-session dynamic se_node_acl double free OOPs

2017-02-08 Thread Nicholas A. Bellinger
On Tue, 2017-02-07 at 19:46 -0800, Nicholas A. Bellinger wrote: > On Tue, 2017-02-07 at 15:12 -0800, Christoph Hellwig wrote: > > And the real patch after compile fixing it is here of course: > > > > Getting rid of the extra se_node_acl->acl_free_comp seems to make sens

Re: [PATCH 4/5] target: Fix multi-session dynamic se_node_acl double free OOPs

2017-02-08 Thread Nicholas A. Bellinger
On Tue, 2017-02-07 at 19:46 -0800, Nicholas A. Bellinger wrote: > On Tue, 2017-02-07 at 15:12 -0800, Christoph Hellwig wrote: > > And the real patch after compile fixing it is here of course: > > > > Getting rid of the extra se_node_acl->acl_free_comp seems to make sens

Re: [PATCH 4/5] target: Fix multi-session dynamic se_node_acl double free OOPs

2017-02-07 Thread Nicholas A. Bellinger
On Tue, 2017-02-07 at 15:12 -0800, Christoph Hellwig wrote: > And the real patch after compile fixing it is here of course: > Getting rid of the extra se_node_acl->acl_free_comp seems to make sense here.. The only potential issue is if returning from configfs syscall rmdir

Re: [PATCH 4/5] target: Fix multi-session dynamic se_node_acl double free OOPs

2017-02-07 Thread Nicholas A. Bellinger
On Tue, 2017-02-07 at 15:12 -0800, Christoph Hellwig wrote: > And the real patch after compile fixing it is here of course: > Getting rid of the extra se_node_acl->acl_free_comp seems to make sense here.. The only potential issue is if returning from configfs syscall rmdir

[PATCH 1/5] target: Don't BUG_ON during NodeACL dynamic -> explicit conversion

2017-02-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> After the v4.2+ RCU conversion to se_node_acl->lun_entry_hlist, a BUG_ON() was added in core_enable_device_list_for_node() to detect when the passed *lun does not match the existing orig->se_lun pointer reference. However, this scenar

[PATCH 1/5] target: Don't BUG_ON during NodeACL dynamic -> explicit conversion

2017-02-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger After the v4.2+ RCU conversion to se_node_acl->lun_entry_hlist, a BUG_ON() was added in core_enable_device_list_for_node() to detect when the passed *lun does not match the existing orig->se_lun pointer reference. However, this scenario can occur happe

[PATCH 2/5] target: Use correct SCSI status during EXTENDED_COPY exception

2017-02-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch adds the missing target_complete_cmd() SCSI status parameter change in target_xcopy_do_work(), that was originally missing in commit 926317de33. It correctly propigates up the correct SCSI status during EXTENDED_COPY exception

[PATCH 2/5] target: Use correct SCSI status during EXTENDED_COPY exception

2017-02-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds the missing target_complete_cmd() SCSI status parameter change in target_xcopy_do_work(), that was originally missing in commit 926317de33. It correctly propigates up the correct SCSI status during EXTENDED_COPY exception cases, instead of always using

<    1   2   3   4   5   6   7   8   9   10   >