Re: [PATCH 13/15] ib_srp: Allow SRP disconnect through sysfs

2012-07-17 Thread bart
> On 03/25/2012 09:01 AM, Bart Van Assche wrote: >> +static void srp_rport_delete(struct srp_rport *rport) >> +{ >> +struct srp_target_port *target = rport->lld_data; >> + >> +BUG_ON(!target); >> + > > I don't think this null check is ne

Re: [PATCH 17/18] srp_transport: Add transport layer recovery support

2012-07-17 Thread bart
> On Mon, 2012-07-16 at 18:07 -0400, Mike Christie wrote: >> On 01/14/2012 05:56 AM, Bart Van Assche wrote: >> > Add the necessary functions in the SRP transport module to allow >> > an SRP initiator driver to implement transport layer recovery. >> >> I was

Re: [PATCH] lpfc: fix model description

2015-04-26 Thread Bart Van Assche
On 04/27/15 00:32, Sebastian Herbszt wrote: Bart Van Assche wrote: * Switch from snprintf() to scnprintf() because the latter function guarantees '\0'-termination if the output has to be truncated. Doesn't snprintf() guarantee this too? The only difference between snprintf(

[PATCH 04/12] IB/srp: Fix connection state tracking

2015-04-30 Thread Bart Van Assche
[] sysfs_write_file+0xef/0x170 [] vfs_write+0xc8/0x190 [] sys_write+0x51/0x90 Signed-off-by: Bart Van Assche Cc: Sagi Grimberg Cc: Sebastian Parschauer Cc: #v3.19 --- drivers/infiniband/ulp/srp/ib_srp.c | 7 --- drivers/infiniband/ulp/srp/ib_srp.h | 1 + 2 files changed, 5 insertions(+), 3 deletions

[PATCH 08/12] IB/srp: Rearrange module description

2015-04-30 Thread Bart Van Assche
Move the module version and release date into separate fields. This makes the modinfo output easier to read. Signed-off-by: Bart Van Assche Cc: Sagi Grimberg Cc: Sebastian Parschauer --- drivers/infiniband/ulp/srp/ib_srp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH 10/12] IB/srp: Remove !ch->target tests from the reconnect code

2015-04-30 Thread Bart Van Assche
ointer. srp_free_ch_ib() is never called concurrently with srp_rport_reconnect(). Signed-off-by: Bart Van Assche Cc: Sagi Grimberg Cc: Sebastian Parschauer --- drivers/infiniband/ulp/srp/ib_srp.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/d

[PATCH 03/12] IB/srp: Remove an extraneous scsi_host_put() from an error path

2015-04-30 Thread Bart Van Assche
Fix a scsi_get_host() / scsi_host_put() imbalance in the error path of srp_create_target(). See also patch "IB/srp: Avoid that I/O hangs due to a cable pull during LUN scanning" (commit ID 34aa654ecb8e). Signed-off-by: Bart Van Assche Cc: Sagi Grimberg Cc: Sebastian Parschauer C

Re: [PATCH 01/12] scsi_transport_srp: Introduce srp_wait_for_queuecommand()

2015-04-30 Thread Bart Van Assche
On 04/30/15 11:37, Christoph Hellwig wrote: On Thu, Apr 30, 2015 at 10:56:42AM +0200, Bart Van Assche wrote: Introduce the helper function srp_wait_for_queuecommand(). Move the definition of scsi_request_fn_active(). This patch does not change any functionality. A second call to

Re: [PATCH 09/12] IB/srp: Remove a superfluous check from srp_free_req_data()

2015-04-30 Thread Bart Van Assche
On 04/30/15 12:18, Sagi Grimberg wrote: On 4/30/2015 12:01 PM, Bart Van Assche wrote: All srp_free_req_data() callers guarantee that ch->target != NULL hence remove the ch->target test from srp_free_req_data(). ch->target is not referenced anywhere in this routine. So why does this

Re: [PATCH 06/12] scsi_transport_srp: Reduce failover time

2015-04-30 Thread Bart Van Assche
On 04/30/15 12:13, Sagi Grimberg wrote: On 4/30/2015 11:59 AM, Bart Van Assche wrote: Unlike FC, there is no risk that SCSI devices will be offlined by the error handler if it is started while a reconnect attempt is ongoing. Hence report timeout errors as soon as possible if a higher software

Re: [PATCH 04/12] IB/srp: Fix connection state tracking

2015-05-05 Thread Bart Van Assche
On 04/30/15 18:08, Doug Ledford wrote: On Thu, 2015-04-30 at 10:58 +0200, Bart Van Assche wrote: @@ -2367,7 +2368,7 @@ static int srp_cm_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event) case IB_CM_DREQ_RECEIVED: shost_printk(KERN_WARNING, target->scsi_h

[PATCH v2 11/12] IB/srp: Remove !ch->target tests from the reconnect code

2015-05-18 Thread Bart Van Assche
ointer. srp_free_ch_ib() is never called concurrently with srp_rport_reconnect(). Signed-off-by: Bart Van Assche Reviewed-by: Sagi Grimberg Cc: Sebastian Parschauer --- drivers/infiniband/ulp/srp/ib_srp.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/infiniba

Re: [PATCH 10/12] scsi: Use DECLARE_BITMAP

2015-05-19 Thread Bart Van Assche
(sr_index_lock); /* This semaphore is used to mediate the 0->1 reference get in the Reviewed-by: Bart Van Assche -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.

Re: [PATCH-v2 2/9] target/pr: Use atomic bitop for se_dev_entry->pr_reg reservation check

2015-05-22 Thread Bart Van Assche
hlist_node link; Hello Nic, This change causes the "se_lun = deve->se_lun" assignment in transport_lookup_cmd_lun() to assign an RCU pointer to a non-RCU pointer. Shouldn't such an assignment be protected via rcu_dereference() ? Thanks, Bart. -- To unsubscribe from t

Re: [PATCH-v2 0/9] target: se_node_acl + se_lun RCU conversions

2015-05-22 Thread Bart Van Assche
On 05/22/15 08:11, Nicholas A. Bellinger wrote: > Here is -v2 series for converting LIO target se_node_acl + se_lun > mapping tables from fixed size arrays to dynamic RCU hlist_heads. The full list of new sparse warnings introduced by this patch series for source files under drivers/target is as f

Re: [PATCH target] target: se_dev_check_wce() can be static

2015-05-26 Thread Bart Van Assche
) { bool wce = false; Since patch "target: fix DPO and FUA bit checks" removed the last user of this function, please remove this function completely instead of declaring it static. Thanks, Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi&qu

Re: [PATCH-v2 0/4] target: Eliminate se_port + t10_alua_tg_pt_gp_member

2015-05-26 Thread Bart Van Assche
that has *not* been annotated as an RCU pointer. I think in the for-next branch of the target repository that this macro is used to access RCU-annotated pointers. Is that why sparse complains about how lockless_dereference() is used in the target tree ? Bart. -- To unsubscribe from this list:

Re: [PATCH-v2 2/4] target: Drop lun_sep_lock for se_lun->lun_se_dev RCU usage

2015-05-26 Thread Bart Van Assche
On 05/26/15 08:57, Nicholas A. Bellinger wrote: > @@ -625,6 +626,7 @@ int core_dev_add_initiator_node_lun_acl( > u32 lun_access) > { > struct se_node_acl *nacl = lacl->se_lun_nacl; > + struct se_device *dev = lockless_dereference(lun->lun_se_dev); > > if (!nacl) >

Re: [PATCH 0/10] qla2xxx: Fix various warnings reported by static source code analysis tools

2015-06-02 Thread Bart Van Assche
On 06/02/2015 01:09 PM, Himanshu Madhani wrote: On 2/23/15, 12:49 AM, "Bart Van Assche" wrote: On 02/02/15 05:52, Saurav Kashyap wrote: Thanks for the patches. We will run regression with these changes and ack if everything goes through fine. Hello Saurav, That sounds great.

[PATCH v2 0/10] qla2xxx: Fix various warnings reported by static source code analysis tools

2015-06-04 Thread Bart Van Assche
This patch series addresses several warnings reported by static source code analysis tools for the qla2xxx driver (gcc (W=1), sparse (C=2) and smatch (C=2 CHECK="smatch -p=kernel")). The patches in this series are: 0001-qla2xxx-Declare-local-functions-static.patch 0002-qla2xxx-Remove-set-but-not-

[PATCH 01/10] qla2xxx: Declare local functions static

2015-06-04 Thread Bart Van Assche
Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Cc: Quinn Tran Cc: Saurav Kashyap --- drivers/scsi/qla2xxx/qla_bsg.c | 2 +- drivers/scsi/qla2xxx/qla_iocb.c | 4 ++-- drivers/scsi/qla2xxx/qla_nx.c | 2 +- drivers/scsi/qla2xxx/qla_nx2.c | 4 ++-- 4 files changed, 6 insertions

[PATCH 02/10] qla2xxx: Remove set-but-not-used variables

2015-06-04 Thread Bart Van Assche
Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Cc: Quinn Tran Cc: Saurav Kashyap --- drivers/scsi/qla2xxx/qla_attr.c | 2 -- drivers/scsi/qla2xxx/qla_bsg.c| 5 - drivers/scsi/qla2xxx/qla_dbg.c| 24 ++-- drivers/scsi/qla2xxx/qla_init.c | 10

[PATCH 03/10] qla2xxx: Replace two macros with an inline function

2015-06-04 Thread Bart Van Assche
Replace the QLA82XX_ADDR_IN_RANGE() and QLA8044_ADDR_IN_RANGE() macros with the inline function addr_in_range(). This avoids that the compiler reports the following warning when building with W=1: comparison of unsigned expression >= 0 is always true. Signed-off-by: Bart Van Assche Acked

[PATCH 04/10] qla2xxx: Remove __constant_ prefix

2015-06-04 Thread Bart Van Assche
Whether htonl() or __constant_htonl() is used, if the argument is a constant the conversion happens at compile time. Hence leave out the __constant_ prefix for this and other endianness conversion functions. This improves source code readability. Signed-off-by: Bart Van Assche Acked-by: Himanshu

[PATCH 05/10] qla2xxx: Specify the [noderef] attribute once

2015-06-04 Thread Bart Van Assche
This patch avoids that sparse complains about duplicate [noderef] attributes. Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Cc: Quinn Tran Cc: Saurav Kashyap --- drivers/scsi/qla2xxx/qla_dbg.c | 2 +- drivers/scsi/qla2xxx/qla_init.c | 2 +- drivers/scsi/qla2xxx/qla_iocb.c | 4

[PATCH 06/10] qla2xxx: Fix sparse annotations

2015-06-04 Thread Bart Van Assche
This patch removes 21 casts between an __iomem pointer type and another data type but also introduces five new casts (see also the casts with "__force"). Although this patch does not change any functionality, IMHO the code with __force casts needs further review. Signed-off-by: Bart

[PATCH 07/10] qla2xxx: Remove a superfluous test

2015-06-04 Thread Bart Van Assche
Avoid that smatch reports the following warning: drivers/scsi/qla2xxx/qla_attr.c:1081: qla2x00_model_desc_show() warn: this array is probably non-NULL. 'vha->hw->model_desc' Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Cc: Quinn Tran Cc: Saurav Kashyap --- driv

[PATCH 08/10] qla2xxx: Remove unreachable code

2015-06-04 Thread Bart Van Assche
The "return QLA_SUCCESS" statement just above the "fw_load_failed" label cannot be reached, hence remove it. Additionally remove the "else" keyword since the code block below the if-statement ends with a return statement. Signed-off-by: Bart Van Assche Acked-by: Hi

[PATCH 09/10] qla2xxx: Comment out unreachable code

2015-06-04 Thread Bart Van Assche
Comment out the code that is never reached in qla83xx_idc_unlock() and also in qlt_set_data_offset() to avoid that static source code analysis tools report warnings for this code. Signed-off-by: Bart Van Assche Cc: Himanshu Madhani Cc: Quinn Tran Cc: Saurav Kashyap --- drivers/scsi/qla2xxx

[PATCH 10/10] qla2xxx: Fix indentation

2015-06-04 Thread Bart Van Assche
Detected by smatch. Signed-off-by: Bart Van Assche Cc: Himanshu Madhani Cc: Quinn Tran Cc: Saurav Kashyap --- drivers/scsi/qla2xxx/qla_init.c | 2 +- drivers/scsi/qla2xxx/qla_iocb.c | 8 drivers/scsi/qla2xxx/qla_isr.c | 4 ++-- drivers/scsi/qla2xxx/qla_nx.c | 2 +- drivers

Re: [PATCH 0/2] target: 64-bit LUN support

2015-06-11 Thread Bart Van Assche
y require to add an additional configuration parameter in configfs for the LUN addressing format. E.g. for users who connect an AIX initiator system to LIO it would be much more convenient to use LUN numbers like 1, 2, 3 instead of the raw LUN numbers 256, 512, 768. Thanks, Bart. --

Re: OOPS: While logging out of iSCSI Session when MultiPath is Enabled

2015-06-18 Thread Bart Van Assche
panic and everything works fine. A similar issue had been reported some time ago on the dm-devel mailing list but should already have been fixed in a later v4.1 rc version. Please retest with v4.1-rc8 or later. Thanks, Bart. -- To unsubscribe from this list: send the line "unsubscribe

Re: [RESEND][PATCH 0/6] Fixes for memory corruption in mpt2sas

2015-07-02 Thread Bart Van Assche
completely eliminated the memory corruption panics. If you have to repost this series please convert BUG_ON(!spin_is_locked(&ioc->sas_device_lock)); into lockdep_is_held(...). Otherwise, for the whole series: Reviewed-by: Bart Van Assche -- To unsubscribe from this list: send the line

Re: blk-mq vs kmemleak

2015-07-03 Thread Bart Van Assche
apply to kmemleak ? A few weeks ago I had noticed similar kmemleak reports. However, when I reran my test with kmemleak disabled memory usage was stable. See also https://www.redhat.com/archives/dm-devel/2015-May/msg00198.html. Thanks, Bart. -- To unsubscribe from this list: send the lin

Re: [PATCH RFC] target: Use scsi helpers to build the sense data correctly

2015-07-05 Thread Bart Van Assche
452cdd https://github.com/bvanassche/linux/commit/50e0e2c6681091cda23e677fe9b6fbd2c70d99b1 https://github.com/bvanassche/linux/commit/02b27ec5c94117a976e16421556c1cb7287b6635 Bart, any chance you could resend them? Bart, would you prefer to re-send your changes on top of v1 of this one? It sh

Re: [PATCHv2] sd: retry READ CAPACITY for ALUA state transition

2015-07-06 Thread Bart Van Assche
"known". - Let multipathd ignore paths for which READ CAPACITY failed until the capacity becomes known. Thanks, Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] scsi: retry MODE SENSE on unit attention

2015-07-06 Thread Bart Van Assche
scsi_sense_valid(sshdr) && + sshdr->sense_key == UNIT_ATTENTION && retry_count) { + retry_count--; + goto retry; } return result; Reviewed-by: Bart Van Assche -- To unsubscribe from this list: send the line "uns

Re: [PATCH] scsi: Add ALUA state change UA handling

2015-07-06 Thread Bart Van Assche
On 07/06/2015 04:41 AM, Hannes Reinecke wrote: Log the ALUA state change unit attention correctly with the message log and emit an event to allow user-space tools to react to it. Signed-off-by: Hannes Reinecke Reviewed-by: Ewan D. Milne Reviewed-by: Bart Van Assche -- To unsubscribe from

Re: [PATCH v3 3/5] scsi: Move sense handling routines to scsi_common

2015-07-06 Thread Bart Van Assche
On 07/06/2015 06:15 AM, Sagi Grimberg wrote: Sense data handling is also done in the target stack. Hence, move sense handling routines to scsi_common so the target will be able to use them as well. Signed-off-by: Sagi Grimberg Reviewed-by: Bart Van Assche -- To unsubscribe from this list

Re: [PATCH v3 5/5] target: Fix wrong setting of sense format for PI errors

2015-07-06 Thread Bart Van Assche
sense_info { u8 asc; u8 ascq; bool add_sector_info; + int desc_format; }; Something minor: has it been considered to use the data type "bool" instead of "int" for desc_format ? Bart. -- To unsubscribe from this list: send the line "unsubscribe l

Re: [PATCH v3 5/5] target: Fix wrong setting of sense format for PI errors

2015-07-06 Thread Bart Van Assche
On 07/06/2015 09:14 AM, Sagi Grimberg wrote: On 7/6/2015 6:28 PM, Bart Van Assche wrote: On 07/06/2015 06:15 AM, Sagi Grimberg wrote: diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 0181f8b..79bb8d1 100644 --- a/drivers/target

Re: blk-mq vs kmemleak

2015-07-07 Thread Bart Van Assche
On 07/07/15 03:33, Catalin Marinas wrote: On Fri, Jul 03, 2015 at 06:04:00PM +0100, Bart Van Assche wrote: A few weeks ago I had noticed similar kmemleak reports. However, when I reran my test with kmemleak disabled memory usage was stable. See also https://www.redhat.com/archives/dm-devel/2015

Re: [PATCHv2] sd: retry READ CAPACITY for ALUA state transition

2015-07-07 Thread Bart Van Assche
UN via the Device Identification VPD page. How about caching the TPG and RTP IDs per LUN such that the scsi_dh_alua code can figure out which LUNs are associated with which target ports by iterating over the known LUNs ? Thanks, Bart. -- To unsubscribe from this list: send the line "unsubsc

[PATCH v3 0/10] qla2xxx: Fix various warnings reported by static source code analysis tools

2015-07-09 Thread Bart Van Assche
This patch series addresses several warnings reported by static source code analysis tools for the qla2xxx driver (gcc (W=1), sparse (C=2) and smatch (C=2 CHECK="smatch -p=kernel")). The patches in this series are: 0001-qla2xxx-Report-both-rsp_info-and-rsp_info_len.patch 0002-qla2xxx-Declare-loca

[PATCH v3 02/10] qla2xxx: Declare local functions static

2015-07-09 Thread Bart Van Assche
Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Cc: Quinn Tran Cc: Saurav Kashyap --- drivers/scsi/qla2xxx/qla_bsg.c | 2 +- drivers/scsi/qla2xxx/qla_iocb.c | 4 ++-- drivers/scsi/qla2xxx/qla_nx.c | 2 +- drivers/scsi/qla2xxx/qla_nx2.c | 4 ++-- 4 files changed, 6 insertions

[PATCH v3 03/10] qla2xxx: Remove set-but-not-used variables

2015-07-09 Thread Bart Van Assche
Detected these variables by building with W=1. Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Cc: Quinn Tran Cc: Saurav Kashyap --- drivers/scsi/qla2xxx/qla_attr.c | 2 -- drivers/scsi/qla2xxx/qla_bsg.c| 5 - drivers/scsi/qla2xxx/qla_dbg.c| 24

[PATCH v3 01/10] qla2xxx: Report both rsp_info and rsp_info_len

2015-07-09 Thread Bart Van Assche
Let the debug statement in qlafx00_tm_iocb_entry() report both rsp_info and rsp_info_len instead of reporting rsp_info_len twice. Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Cc: Quinn Tran Cc: Saurav Kashyap --- drivers/scsi/qla2xxx/qla_mr.c | 4 ++-- 1 file changed, 2

[PATCH v3 04/10] qla2xxx: Replace two macros with an inline function

2015-07-09 Thread Bart Van Assche
Replace the QLA82XX_ADDR_IN_RANGE() and QLA8044_ADDR_IN_RANGE() macros with the inline function addr_in_range(). This avoids that the compiler reports the following warning when building with W=1: comparison of unsigned expression >= 0 is always true. Signed-off-by: Bart Van Assche Acked

[PATCH v3 06/10] qla2xxx: Avoid that sparse complains about duplicate [noderef] attributes

2015-07-09 Thread Bart Van Assche
Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Cc: Quinn Tran Cc: Saurav Kashyap --- drivers/scsi/qla2xxx/qla_dbg.c | 2 +- drivers/scsi/qla2xxx/qla_init.c | 2 +- drivers/scsi/qla2xxx/qla_iocb.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi

[PATCH v3 09/10] qla2xxx: Remove dead code

2015-07-09 Thread Bart Van Assche
The "return QLA_SUCCESS" statement just above the "fw_load_failed" label cannot be reached, hence remove it. Additionally remove the "else" keyword since the code block below the if-statement ends with a return statement. Signed-off-by: Bart Van Assche Acked-by: Hi

[PATCH v3 10/10] qla2xxx: Avoid that sparse complains about context imbalances

2015-07-09 Thread Bart Van Assche
Surround conditional locking statements with "#ifndef __CHECKER__" / "#endif" to hide these for the sparse static source code analysis tool. Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_dbg.c| 36 drivers/scsi/qla2x

[PATCH v3 08/10] qla2xxx: Remove a superfluous test

2015-07-09 Thread Bart Van Assche
Avoid that smatch reports the following warning: drivers/scsi/qla2xxx/qla_attr.c:1081: qla2x00_model_desc_show() warn: this array is probably non-NULL. 'vha->hw->model_desc' Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Cc: Quinn Tran Cc: Saurav Kashyap --- driv

[PATCH v3 07/10] qla2xxx: Fix sparse annotations

2015-07-09 Thread Bart Van Assche
This patch removes 21 casts between an __iomem pointer type and another data type but also introduces five new casts (see also the casts with "__force"). Although this patch does not change any functionality, IMHO the code with __force casts needs further review. Signed-off-by: Bart

[PATCH v3 05/10] qla2xxx: Remove __constant_ prefix

2015-07-09 Thread Bart Van Assche
Whether htonl() or __constant_htonl() is used, if the argument is a constant the conversion happens at compile time. Hence leave out the __constant_ prefix for this and other endianness conversion functions. This improves source code readability. Signed-off-by: Bart Van Assche Acked-by: Himanshu

Re: [PATCH] scsi: Fix sense information setting in fixed sized format

2015-07-09 Thread Bart Van Assche
|= 0x80; - put_unaligned_be64(info, &buf[3]); + put_unaligned_be32(info, &buf[3]); } } EXPORT_SYMBOL(scsi_set_sense_information); Reviewed-by: Bart Van Assche -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the b

Re: [RESEND][PATCH] qla2xxx: use t10_pi_tuple

2015-07-12 Thread Bart Van Assche
before but please use sg_virt() in the above code instead of open coding it. Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2] qla2xxx: use t10_pi_tuple

2015-07-12 Thread Bart Van Assche
On 07/12/15 14:54, Sebastian Herbszt wrote: Drop unused scsi_dif_tuple and use t10_pi_tuple instead of own sd_dif_tuple copy. Also use sg_virt() instead of open coding it. Reviewed-by: Bart Van Assche -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the

Re: [PATCH 3/3] target: Return descriptor format sense data

2015-07-14 Thread Bart Van Assche
F_h in the INFORMATION field: [ ... ]". I think this means the value _h is allowed in fixed format sense data. Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at htt

Re: [PATCH v1 3/4] target: Return descriptor format sense data in case the LU spans 64bit sectors

2015-07-15 Thread Bart Van Assche
On 07/15/15 00:55, Sagi Grimberg wrote: +bool target_sense_desc_format(struct se_device *dev) +{ + return dev->transport->get_blocks(dev) > 0xULL; +} Please consider to use U32_MAX instead of 0xULL since that would make this function easier to read and to verif

Re: [PATCH] scsi: Fixup fixed sense generation

2015-07-31 Thread Bart Van Assche
d_sense_buffer() changes and another patch for the scsi_set_sense_information() changes. Please also add a statement that triggers a kernel warning if an out-of-range key value is passed to scsi_build_sense_buffer() instead of ignoring out-of-range sense key values silently. Thanks, Bart. -- T

[PATCH 0/3] IB/srp patches for Linux kernel v4.3

2015-07-31 Thread Bart Van Assche
Hello Doug, Please apply the following three patches at your earliest convenience: 0001-IB-srp-Constify-a-function-argument.patch 0002-IB-srp-Handle-partial-connection-success-correctly.patch 0003-IB-srp-Bump-driver-version-and-release-date.patch Thanks, Bart. -- To unsubscribe from this list

[PATCH 3/3] IB/srp: Bump driver version and release date

2015-07-31 Thread Bart Van Assche
Since version 1.0 e.g. scsi-mq has been added. Since this is a significant change, bump the driver version and release date. Signed-off-by: Bart Van Assche Cc: Sagi Grimberg Cc: Sebastian Parschauer Cc: Christoph Hellwig --- drivers/infiniband/ulp/srp/ib_srp.c | 4 ++-- 1 file changed, 2

[PATCH 2/3] IB/srp: Handle partial connection success correctly

2015-07-31 Thread Bart Van Assche
Signed-off-by: Bart Van Assche Cc: Sagi Grimberg Cc: Sebastian Parschauer Cc: Christoph Hellwig Cc: sta...@vger.kernel.org --- drivers/infiniband/ulp/srp/ib_srp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp

[PATCH 1/3] IB/srp: Constify a function argument

2015-07-31 Thread Bart Van Assche
This patch does not change any functionality. Signed-off-by: Bart Van Assche Cc: Sagi Grimberg Cc: Sebastian Parschauer Cc: Christoph Hellwig --- drivers/infiniband/ulp/srp/ib_srp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b

Re: blk-mq vs kmemleak

2015-07-31 Thread Bart Van Assche
On 07/08/2015 01:17 AM, Christoph Hellwig wrote: On Tue, Jul 07, 2015 at 06:59:37AM -0700, Bart Van Assche wrote: Please note that my test was run with CONFIG_SLUB_DEBUG=y which causes a red zone to be allocated before and after each block of allocated memory. Could that explain the kmalloc-96

Re: blk-mq vs kmemleak

2015-08-03 Thread Bart Van Assche
eak callbacks to allow tracking of such pages. Signed-off-by: Catalin Marinas Reported-by: Bart Van Assche That patch works fine on my test setup, hence: Tested-by: Bart Van Assche Thanks ! Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of

Re: threads scsi_eh_ and scsi_tmf_ don't die when ib_srp reconnect

2015-08-10 Thread Bart Van Assche
2.0.32#in-tree Hello Konstantin, Does the above output mean that you are using the ib_srp-backport driver ? If so, please upgrade to version v2.0.34. That version includes all SRP initiator fixes that have been posted on the linux-rdma and linux-scsi mailing lists for inclusion in Linux kern

Re: threads scsi_eh_ and scsi_tmf_ don't die when ib_srp reconnect

2015-08-11 Thread Bart Van Assche
a kernel from Greg KH's stable repository or another kernel ? And to which values were the ib_srp kernel module parameters set (cat /etc/modprobe.d/ib_srp.conf) ? Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@

Re: threads scsi_eh_ and scsi_tmf_ don't die when ib_srp reconnect

2015-08-12 Thread Bart Van Assche
On 08/11/2015 10:15 PM, Konstantin Krotov wrote: > 11.08.2015 23:28, Bart Van Assche пишет: >> Are you using a kernel from Greg KH's stable repository or another kernel ? >> And to which values were the > yes, sources from upstream, 3.19.1 Hello Konstantin, Can you test

Re: threads scsi_eh_ and scsi_tmf_ don't die when ib_srp reconnect

2015-08-14 Thread Bart Van Assche
On 08/14/2015 02:06 AM, Konstantin Krotov wrote: I tested the patch, the problem is not reproduced. Thanks for confirming that the patch fixes this issue. I will send a slightly modified version of this patch soon to the Linux RDMA maintainer. Bart. -- To unsubscribe from this list: send

Re: [patch] qla4xxx: remove some bogus casts

2015-08-17 Thread Bart Van Assche
having applied the patch series I posted in July (and that was acknowledged by QLogic): http://thread.gmane.org/gmane.linux.scsi/103135 ? Thanks, Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More

Re: [patch] qla4xxx: remove some bogus casts

2015-08-22 Thread Bart Van Assche
On 08/18/15 01:47, Dan Carpenter wrote: On Mon, Aug 17, 2015 at 09:45:45PM -0700, Bart Van Assche wrote: On 08/17/2015 07:36 AM, Dan Carpenter wrote: These casts are wrong and unnecessary. They annoy static checkers because they imply we are planning to write sizeof(long) bytes to a sizeof

Re: SCSI scanning behavior

2015-08-26 Thread Bart Van Assche
ht_ be able to tweak this by ignoring devices with PQ=1 and LUN!=0; however, it might break other things. Hello Hannes, The code in scsi_scan.c already skips LUNs with PQ=1 and PDT=0x1f. I'm not sure we should skip LUNS with PQ=1 and a PDT value other than 0x1f. Thanks, Bart. -- To uns

Re: [scsi:misc 35/39] drivers/scsi/qla2xxx/qla_iocb.c:1972:18: sparse: incorrect type in assignment (different base types)

2015-08-26 Thread Bart Van Assche
olunteering, please let me know. Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 7/7] [RFC] nvme: Fix a race condition

2016-10-11 Thread Bart Van Assche
On 10/11/16 09:46, Christoph Hellwig wrote: On Wed, Sep 28, 2016 at 05:01:45PM -0700, Bart Van Assche wrote: Avoid that nvme_queue_rq() is still running when nvme_stop_queues() returns. Untested. Signed-off-by: Bart Van Assche Cc: Keith Busch Cc: Christoph Hellwig Cc: Sagi Grimberg

Re: [PATCH 11/24] libfc: Return LS_RJT_BUSY for PRLI in status PLOGI

2016-10-14 Thread Bart Van Assche
On 10/13/2016 06:10 AM, Hannes Reinecke wrote: Occasionally it might happen that we receive a PRLI while we're still waiting for our PLOGI response. In that case we should return 'busy' LS status instead of 'plogi required' LS status. Reviewed-by: Bart Van Assche --

Re: [PATCH 13/24] libfc: safeguard against invalid exchange index

2016-10-14 Thread Bart Van Assche
On 10/13/2016 06:10 AM, Hannes Reinecke wrote: The cached exchange index might be invalid, in which case we should drop down to allocate a new one. And we should not try to access an invalid exchange when responding to a BA_ABTS. Reviewed-by: Bart Van Assche -- To unsubscribe from this list

Re: [PATCH 14/24] libfc: quarantine timed out xids

2016-10-14 Thread Bart Van Assche
received after that. So we need to quarantine the xid until the lport is reset. Yes, I know this will (eventually) deplete the xid pool. But for now it's the safest method. Reviewed-by: Bart Van Assche -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" i

Re: [PATCH 19/24] libfc: Check xid when looking up REC exchanges

2016-10-14 Thread Bart Van Assche
On 10/13/2016 06:10 AM, Hannes Reinecke wrote: We currently can only lookup the local xid, so we need to reject REC with empty rxid. Reviewed-by: Bart Van Assche -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kerne

Re: [PATCH 18/24] libfc: wait for E_D_TOV when out-of-order sequence is received

2016-10-14 Thread Bart Van Assche
On 10/13/2016 06:10 AM, Hannes Reinecke wrote: When detecting an out-of-order sequence we should be waiting for E_D_TOV before trying to abort the sequence. The response might still be stuck in the queue somewhere. Reviewed-by: Bart Van Assche -- To unsubscribe from this list: send the line

Re: [PATCH 22/24] fcoe: FIP debugging

2016-10-14 Thread Bart Van Assche
frport->enode_mac, 0); Hmm ... checkpatch should have complained about this and should have recommended to keep the format string on a single line. Anyway: Reviewed-by: Bart Van Assche -- To unsubscribe from this list: send the line "unsubscribe linux-scsi&q

Re: [PATCH 24/24] fcoe: filter out frames from invalid vlans

2016-10-14 Thread Bart Van Assche
On 10/13/2016 06:11 AM, Hannes Reinecke wrote: Any multicase address is set on all interfaces, the base interface and any VLAN interfaces on top of this. So we might receive frames which are not destined for us. Reviewed-by: Bart Van Assche -- To unsubscribe from this list: send the line

Re: [PATCH 23/24] fcoe: correct sending FIP VLAN packets on VLAN 0

2016-10-14 Thread Bart Van Assche
On 10/13/2016 06:10 AM, Hannes Reinecke wrote: The FIP VLAN frame consists of an ethernet header followed by the FIP VLAN frame, so we need to skip the ethernet header if we want to check the FIP opcode. Reviewed-by: Bart Van Assche -- To unsubscribe from this list: send the line "unsubs

Re: [PATCH 20/24] fcoe: set default TC priority

2016-10-14 Thread Bart Van Assche
On 10/13/2016 06:10 AM, Hannes Reinecke wrote: If DCB is not enabled or compiled in we still should be setting a sane default priority. So put FCoE frames in priority class 'interactive' and FIP frames in priority class 'besteffort'. Reviewed-by: Bart Van Assche -- To u

[PATCH v3 01/11] blk-mq: Do not invoke .queue_rq() for a stopped queue

2016-10-18 Thread Bart Van Assche
The meaning of the BLK_MQ_S_STOPPED flag is "do not call .queue_rq()". Hence modify blk_mq_make_request() such that requests are queued instead of issued if a queue has been stopped. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Sagi Grimberg Cc

[PATCH v3 0/11] Fix race conditions related to stopping block layer queues

2016-10-18 Thread Bart Van Assche
-and-star.patch 0008-SRP-transport-Move-queuecommand-wait-code-to-SCSI-co.patch 0009-SRP-transport-scsi-mq-Wait-for-.queue_rq-if-necessar.patch 0010-nvme-Use-BLK_MQ_S_STOPPED-instead-of-QUEUE_FLAG_STOP.patch 0011-nvme-Fix-a-race-condition.patch Thanks, Bart. -- To unsubscribe from this list

[PATCH v3 02/11] blk-mq: Introduce blk_mq_hctx_stopped()

2016-10-18 Thread Bart Van Assche
Multiple functions test the BLK_MQ_S_STOPPED bit so introduce a helper function that performs this test. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Sagi Grimberg Cc: Johannes Thumshirn --- block/blk-mq.c | 12 ++-- drivers/md/dm-rq.c

[PATCH v3 03/11] blk-mq: Introduce blk_mq_queue_stopped()

2016-10-18 Thread Bart Van Assche
The function blk_queue_stopped() allows to test whether or not a traditional request queue has been stopped. Introduce a helper function that allows block drivers to query easily whether or not one or more hardware contexts of a blk-mq queue have been stopped. Signed-off-by: Bart Van Assche

[PATCH v3 04/11] blk-mq: Introduce blk_mq_quiesce_queue()

2016-10-18 Thread Bart Van Assche
blk_mq_quiesce_queue() waits until ongoing .queue_rq() invocations have finished. This function does *not* wait until all outstanding requests have finished (this means invocation of request.end_io()). Signed-off-by: Bart Van Assche Cc: Ming Lei Cc: Hannes Reinecke Cc: Johannes Thumshirn

[PATCH v3 05/11] blk-mq: Add a kick_requeue_list argument to blk_mq_requeue_request()

2016-10-18 Thread Bart Van Assche
Most blk_mq_requeue_request() and blk_mq_add_to_requeue_list() calls are followed by kicking the requeue list. Hence add an argument to these two functions that allows to kick the requeue list. This was proposed by Christoph Hellwig. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc

[PATCH v3 06/11] dm: Use BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED in blk-mq code

2016-10-18 Thread Bart Van Assche
Instead of manipulating both QUEUE_FLAG_STOPPED and BLK_MQ_S_STOPPED in the dm start and stop queue functions, only manipulate the latter flag. Signed-off-by: Bart Van Assche Cc: Mike Snitzer --- drivers/md/dm-rq.c | 18 ++ 1 file changed, 2 insertions(+), 16 deletions(-) diff

[PATCH v3 08/11] SRP transport: Move queuecommand() wait code to SCSI core

2016-10-18 Thread Bart Van Assche
Additionally, add a comment about the queuecommand() call from scsi_send_eh_cmnd(). Signed-off-by: Bart Van Assche Cc: James Bottomley Cc: Martin K. Petersen Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Doug Ledford --- drivers/scsi/scsi_lib.c | 40

[PATCH v3 07/11] dm: Fix a race condition related to stopping and starting queues

2016-10-18 Thread Bart Van Assche
n_slowpath+0xb0/0xc0 [] entry_SYSCALL_64_fastpath+0xa6/0xa8 Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Cc: Mike Snitzer --- drivers/md/dm-rq.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/md/dm-rq.c b/driv

[PATCH v3 10/11] nvme: Use BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED in blk-mq code

2016-10-18 Thread Bart Van Assche
queue flags can be called concurrently, e.g. blk_cleanup_queue(). Signed-off-by: Bart Van Assche Cc: Keith Busch Cc: Christoph Hellwig Cc: Sagi Grimberg --- drivers/nvme/host/core.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme

[PATCH v3 09/11] SRP transport, scsi-mq: Wait for .queue_rq() if necessary

2016-10-18 Thread Bart Van Assche
Rename srp_wait_for_queuecommand() into scsi_wait_for_queuecommand(). Ensure that if scsi-mq is enabled that scsi_wait_for_queuecommand() waits until ongoing shost->hostt->queuecommand() calls have finished. Signed-off-by: Bart Van Assche Cc: James Bottomley Cc: Martin K. Petersen Cc

[PATCH v3 11/11] nvme: Fix a race condition

2016-10-18 Thread Bart Van Assche
Avoid that nvme_queue_rq() is still running when nvme_stop_queues() returns. Signed-off-by: Bart Van Assche Cc: Keith Busch Cc: Sagi Grimberg Cc: Christoph Hellwig --- drivers/nvme/host/core.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/nvme

Re: [PATCH v3 0/11] Fix race conditions related to stopping block layer queues

2016-10-18 Thread Bart Van Assche
On 10/18/2016 02:48 PM, Bart Van Assche wrote: - blk_mq_quiesce_queue() has been reworked (thanks to Ming Lin and Sagi for their feedback). (replying to my own e-mail) A correction: Ming Lei provided feedback on v2 of this patch series instead of Ming Lin. Bart. -- To unsubscribe from

Re: [PATCH v3 02/11] blk-mq: Introduce blk_mq_hctx_stopped()

2016-10-19 Thread Bart Van Assche
On 10/19/2016 06:19 AM, Christoph Hellwig wrote: On Tue, Oct 18, 2016 at 02:49:09PM -0700, Bart Van Assche wrote: Multiple functions test the BLK_MQ_S_STOPPED bit so introduce a helper function that performs this test. Looks sensible. Any reason to have it in the public blk-mq.h instead of

Re: [PATCH v3 04/11] blk-mq: Introduce blk_mq_quiesce_queue()

2016-10-19 Thread Bart Van Assche
st *rq, blk_qc_t *cookie) +{ + if (blk_mq_hctx_stopped(hctx) || + blk_mq_direct_issue_request(rq, cookie) != 0) + blk_mq_insert_request(rq, false, true, true); +} Any reason not to merge this function with blk_mq_direct_issue_request? That sounds like a good idea to me. I will make the pr

Re: [PATCH v3 04/11] blk-mq: Introduce blk_mq_quiesce_queue()

2016-10-19 Thread Bart Van Assche
On 10/18/2016 02:50 PM, Bart Van Assche wrote: blk_mq_quiesce_queue() waits until ongoing .queue_rq() invocations have finished. This function does *not* wait until all outstanding requests have finished (this means invocation of request.end_io()). (replying to my own e-mail) The zero-day

  1   2   3   4   5   6   7   8   9   10   >