Re: [RESEND PATCH v2 0/2] Update SCSI target removal path

2016-03-30 Thread jthumshirn
On 2016-03-30 18:43, James Bottomley wrote: On Wed, 2016-03-30 at 09:09 +0200, Johannes Thumshirn wrote: [resend with linux-scsi@ in Cc, my apologies] This is a follow up to "scsi: Add intermediate STARGET_REMOVE state to scsi_target_state". If anyone has an idea how to create a regression tes

Re: tcm_qla2xxx Add SCSI command jammer/discard capabilty to the tcm_qla2xxx module - revision3

2016-03-30 Thread Nicholas A. Bellinger
(Adding target-devel + Qlogic target folks) On Tue, 2016-03-29 at 22:05 -0700, Bart Van Assche wrote: > On 03/29/16 07:42, Laurence Oberman wrote: > > I have been using this jammer functionality to continue testing the SCSI > > F/C drivers and recovery for over a year now. > > Any chance you woul

[PATCH 3/3] qla2xxx: Assign names to the flags in cmd_flags

2016-03-30 Thread Bart Van Assche
Use a C bitfield instead of emulating this functionality with bit manipulations. Since only bits 5, 16 and 20 are ever tested, remove the code that sets the other bits. This is easy to verify by running the following command: $ git grep -nH 'BIT_[0-9]' drivers/scsi/qla2xxx | grep cmd_flags Signed

[PATCH 2/3] qla2xxx: Remove set-but-not-used variables

2016-03-30 Thread Bart Van Assche
Detected these variables by building the qla2xxx driver with W=1. Note: removing the code that sets BIT_14 is fine since that bit is never tested. The output of git grep -nH -- '->cmd_flags\s*&' drivers/scsi/qla2xxx is as follows: drivers/scsi/qla2xxx/tcm_qla2xxx.c:285: WARN_ON(cmd->cmd_flags &

[PATCH 1/3] qla2xxx: Indicate out-of-memory with -ENOMEM

2016-03-30 Thread Bart Van Assche
In the Linux kernel it is preferred to return a meaningful error code instead of -1. This patch does not change the behavior of the caller of qla82xx_pinit_from_rom(). Signed-off-by: Bart Van Assche Cc: Quinn Tran Cc: Himanshu Madhani Cc: Christoph Hellwig --- drivers/scsi/qla2xxx/qla_nx.c |

[PATCH 0/3] qla2xxx: Patches for kernel v4.7

2016-03-30 Thread Bart Van Assche
Hello James and Martin, The following three patches are what I came up with after having analyzed the output of a static source code analysis tool (sparse) for the QLogic qla2xxx driver: 0001-qla2xxx-Indicate-out-of-memory-with-ENOMEM.patch 0002-qla2xxx-Remove-set-but-not-used-variables.patch

Re: [RESEND PATCH v2 2/2] scsi: Add intermediate STARGET_REMOVE state to scsi_target_state

2016-03-30 Thread Sebastian Herbszt
Johannes Thumshirn wrote: > Add intermediate STARGET_REMOVE state to scsi_target_state to avoid running > into the BUG_ON() in scsi_target_reap(). > > This intermediate state is only valid in the path from scsi_remove_target() to > scsi_target_destroy() indicating this target is going to be remove

Re: [PATCHv3] scsi: disable automatic target scan

2016-03-30 Thread Benjamin Block
Hello Hannes, I am a bit late here, but as this got pulled and Steffen didn't have time to give it a review, I did today. On 08:39 Thu 17 Mar , Hannes Reinecke wrote: > On larger installations it is useful to disable automatic LUN > scanning, and only add the required LUNs via udev rules. > T

[PATCH 5/5] scsi_transport_iscsi: Declare local symbols static

2016-03-30 Thread Bart Van Assche
Avoid that building with W=1 causes gcc to report warnings about symbols that have not been declared. Signed-off-by: Bart Van Assche Reviewed-by: Mike Christie --- drivers/scsi/scsi_transport_iscsi.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/scsi_t

[PATCH 4/5] scsi_transport_iscsi: Unexport iscsi_is_flashnode_conn_dev()

2016-03-30 Thread Bart Van Assche
The output of "git grep -nHw iscsi_is_flashnode_conn_dev" shows that this function is only called from inside source file drivers/scsi/scsi_transport_iscsi.c. Hence unexport this function. Signed-off-by: Bart Van Assche Reviewed-by: Mike Christie --- drivers/scsi/scsi_transport_iscsi.c | 3 +--

[PATCH 3/5] scsi_transport_iscsi: Remove set-but-not-used variables

2016-03-30 Thread Bart Van Assche
Avoid that building with W=1 causes gcc to report warnings about set-but-not-used variables. Signed-off-by: Bart Van Assche Reviewed-by: Mike Christie --- drivers/scsi/scsi_transport_iscsi.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scs

[PATCH 2/5] libiscsi: Remove set-but-not-used variables

2016-03-30 Thread Bart Van Assche
Avoid that building with W=1 causes gcc to report warnings about set-but-not-used variables. Signed-off-by: Bart Van Assche Reviewed-by: Mike Christie --- drivers/scsi/libiscsi.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/lib

[PATCH 1/5] libiscsi: Unexport iscsi_eh_target_reset()

2016-03-30 Thread Bart Van Assche
Running "git grep -nHw iscsi_eh_target_reset" shows that this function is only called from inside the drivers/scsi/libiscsi.c source file. Hence unexport this function. Signed-off-by: Bart Van Assche Reviewed-by: Mike Christie --- drivers/scsi/libiscsi.c | 3 +-- 1 file changed, 1 insertion(+),

[PATCH 0/5] Fix several static checker warnings reported against the iSCSI kernel code

2016-03-30 Thread Bart Van Assche
Hello James and Martin, These five patches are what I came up with after analyzing the output of "make M=drivers/scsi W=1 C=2" for the iSCSI initiator kernel code. Please consider these patches for inclusion in kernel v4.7. The actual patches are: 0001-libiscsi-Unexport-iscsi_eh_target_reset

Re: [PATCH v2 0/2] Update SCSI target removal path

2016-03-30 Thread Laurence Oberman
I can test this next week. I can test pre and then post patch. Will update when its validated. Laurence Oberman Principal Software Maintenance Engineer Red Hat Global Support Services - Original Message - From: "Ewan D. Milne" To: "jthumshirn" Cc: "Martin K. Petersen" , "James E.J. Bott

Re: [RESEND PATCH v2 0/2] Update SCSI target removal path

2016-03-30 Thread James Bottomley
On Wed, 2016-03-30 at 09:09 +0200, Johannes Thumshirn wrote: > [resend with linux-scsi@ in Cc, my apologies] > > This is a follow up to "scsi: Add intermediate STARGET_REMOVE state > to scsi_target_state". > > If anyone has an idea how to create a regression test suite for the > target removal

Re: [PATCH v2] sd: Fix excessive capacity printing on devices with blocks bigger than 512 bytes

2016-03-30 Thread Ewan D. Milne
On Mon, 2016-03-28 at 21:18 -0400, Martin K. Petersen wrote: > During revalidate we check whether device capacity has changed before we > decide whether to output disk information or not. > > The check for old capacity failed to take into account that we scaled > sdkp->capacity based on the report

Re: [PATCH v2 0/2] Update SCSI target removal path

2016-03-30 Thread Ewan D. Milne
On Wed, 2016-03-30 at 13:01 +0200, jthumshirn wrote: > [+Cc linux-scsi back] > On 2016-03-30 02:59, Martin K. Petersen wrote: > >> "Ewan" == Ewan D Milne writes: > > > > Ewan> I would probably use an APCON or other physical layer switch to > > Ewan> drop the FC link and test the error recover

Re: [RESEND PATCH v2 2/2] scsi: Add intermediate STARGET_REMOVE state to scsi_target_state

2016-03-30 Thread Ewan D. Milne
On Wed, 2016-03-30 at 09:09 +0200, Johannes Thumshirn wrote: > Add intermediate STARGET_REMOVE state to scsi_target_state to avoid running > into the BUG_ON() in scsi_target_reap(). > > This intermediate state is only valid in the path from scsi_remove_target() to > scsi_target_destroy() indicatin

Re: [RESEND PATCH v2 1/2] Revert "scsi: fix soft lockup in scsi_remove_target() on module removal"

2016-03-30 Thread Ewan D. Milne
On Wed, 2016-03-30 at 09:09 +0200, Johannes Thumshirn wrote: > This reverts commit 90a88d6ef88edcfc4f644dddc7eef4ea41bccf8b. > > Signed-off-by: Johannes Thumshirn > Cc: sta...@vger.kernel.org > --- > drivers/scsi/scsi_sysfs.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) > > dif

Re: Patch: Make the iscsi lld create a WQ_HIGHPRI workqueue itself

2016-03-30 Thread Richard Sharpe
On Mon, Mar 28, 2016 at 4:53 PM, Mike Christie wrote: > On 03/28/2016 03:46 PM, Richard Sharpe wrote: >> Hi folks, >> >> We noticed recently while testing with large numbers of iSCSI >> connections that iscsid was going to heroic lengths to change the nice >> value of the iSCSI work queue to -20.

Re: [PATCH v2 0/2] Update SCSI target removal path

2016-03-30 Thread jthumshirn
[+Cc linux-scsi back] On 2016-03-30 02:59, Martin K. Petersen wrote: "Ewan" == Ewan D Milne writes: Ewan> I would probably use an APCON or other physical layer switch to Ewan> drop the FC link and test the error recovery/device loss. But we Ewan> don't have one. They go for a couple of hundr

Re: [RESEND] [PATCH v11 3/6] added support for DesignWare Controller

2016-03-30 Thread Joao Pinto
Hi Thomas, On 3/29/2016 1:15 PM, Winkler, Tomas wrote: > > diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index > 2570d94..8b0cdf0 100644 > --- a/drivers/scsi/ufs/ufshcd.h > +++ b/drivers/scsi/ufs/ufshcd.h > @@ -262,6 +262,7 @@ struct ufs_pwr_mode_info { > * @suspend: call

Re: [PATCH v2] sd: Fix excessive capacity printing on devices with blocks bigger than 512 bytes

2016-03-30 Thread Hannes Reinecke
On 03/29/2016 03:18 AM, Martin K. Petersen wrote: > During revalidate we check whether device capacity has changed before we > decide whether to output disk information or not. > > The check for old capacity failed to take into account that we scaled > sdkp->capacity based on the reported logical

[RESEND PATCH v2 2/2] scsi: Add intermediate STARGET_REMOVE state to scsi_target_state

2016-03-30 Thread Johannes Thumshirn
Add intermediate STARGET_REMOVE state to scsi_target_state to avoid running into the BUG_ON() in scsi_target_reap(). This intermediate state is only valid in the path from scsi_remove_target() to scsi_target_destroy() indicating this target is going to be removed. Signed-off-by: Johannes Thumshir

[RESEND PATCH v2 1/2] Revert "scsi: fix soft lockup in scsi_remove_target() on module removal"

2016-03-30 Thread Johannes Thumshirn
This reverts commit 90a88d6ef88edcfc4f644dddc7eef4ea41bccf8b. Signed-off-by: Johannes Thumshirn Cc: sta...@vger.kernel.org --- drivers/scsi/scsi_sysfs.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 00bc721..

[RESEND PATCH v2 0/2] Update SCSI target removal path

2016-03-30 Thread Johannes Thumshirn
[resend with linux-scsi@ in Cc, my apologies] This is a follow up to "scsi: Add intermediate STARGET_REMOVE state to scsi_target_state". If anyone has an idea how to create a regression test suite for the target removal path I'd be all ears, given the fact that this is the 3rd or 4th patch targe