[Bug 100921] Kernel cannot read partition table automatically.But use partprobe command can.

2015-07-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=100921 --- Comment #2 from Wallance --- Oh,I have solved it. -- You are receiving this mail because: You are the assignee for the bug. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.

Re: [PATCH] libiscsi: Fix host busy blocking during connection teardown

2015-07-08 Thread Chris Leech
On Tue, Jun 23, 2015 at 6:11 PM, John Soni Jose wrote: > > Issue: > In case of hw iscsi offload, an host can have N-number of active > connections. There can be IO's running on some connections which > make host->host_busy always TRUE. Now if logout from a connection > is tried then the code

Re: [PATCH] [SCSI] FlashPoint: optimize string comparison

2015-07-08 Thread Khalid Aziz
On 07/08/2015 01:12 AM, Frans Klaver wrote: On Wed, Jul 8, 2015 at 7:45 AM, Christophe JAILLET wrote: Le 07/07/2015 19:04, Khalid Aziz a écrit : On 07/07/2015 02:45 AM, Frans Klaver wrote: On Tue, Jul 7, 2015 at 7:39 AM, Christophe JAILLET wrote: Stop comparing the strings as soon as we

[PATCH] st: Destroy st_index_idr on module exit

2015-07-08 Thread Johannes Thumshirn
Destroy st_index_idr on module exit, reclaiming the allocated memory. This was detected by the following semantic patch (written by Luis Rodriguez ) @ defines_module_init @ declarer name module_init, module_exit; declarer name DEFINE_IDR; identifier init; @@ module_init(init); @ defines_module_

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

2015-07-08 Thread Sagi Grimberg
On 7/8/2015 6:06 PM, Hannes Reinecke wrote: We're adding extra fields here, so we need to make sure to not overflow the buffer. You probably have to pass in the buffersize to avoid an overflow ... Yeah, I know, it's theoretical at the moment. But there's nothing which prevents anyone to add othe

[PATCH] lpfc: Destroy lpfc_hba_index IDR on module exit

2015-07-08 Thread Johannes Thumshirn
Destroy lpfc_hba_index IDR on module exit, reclaiming the allocated memory. This was detected by the following semantic patch (written by Luis Rodriguez ) @ defines_module_init @ declarer name module_init, module_exit; declarer name DEFINE_IDR; identifier init; @@ module_init(init); @ defines_m

Re: [PATCH v4 5/5] target: Return ABORTED_COMMAND sense key for PI errors

2015-07-08 Thread Hannes Reinecke
On 07/08/2015 04:58 PM, Sagi Grimberg wrote: > PI errors were reported with ILLEGAL_REQUEST sense key but > there was actually no problem with the request. Target > detected PI errors should be reported with aborted command > sense key. > > Signed-off-by: Sagi Grimberg > --- > drivers/target/tar

Re: [PATCH v4 4/5] target: Use scsi helpers to build the sense data correctly

2015-07-08 Thread Hannes Reinecke
On 07/08/2015 04:58 PM, Sagi Grimberg wrote: > Instead of open coding the sense buffer construction, use > scsi scsi_build_sense_buffer() and scsi_set_sense_information() > helpers which moved to scsi_common. > > Signed-off-by: Sagi Grimberg > Reviewed-by: Christoph Hellwig > --- > drivers/targ

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

2015-07-08 Thread Hannes Reinecke
On 07/08/2015 04:58 PM, 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 > Reviewed-by: Christoph Hel

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

2015-07-08 Thread Sagi Grimberg
In fixed size sense format the information field is a four byte field. Signed-off-by: Sagi Grimberg --- drivers/scsi/scsi_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_common.c b/drivers/scsi/scsi_common.c index 41432c1..8cfb7ee 100644 --- a/drive

[PATCH v4 4/5] target: Use scsi helpers to build the sense data correctly

2015-07-08 Thread Sagi Grimberg
Instead of open coding the sense buffer construction, use scsi scsi_build_sense_buffer() and scsi_set_sense_information() helpers which moved to scsi_common. Signed-off-by: Sagi Grimberg Reviewed-by: Christoph Hellwig --- drivers/target/target_core_spc.c | 31 +

[PATCH v4 5/5] target: Return ABORTED_COMMAND sense key for PI errors

2015-07-08 Thread Sagi Grimberg
PI errors were reported with ILLEGAL_REQUEST sense key but there was actually no problem with the request. Target detected PI errors should be reported with aborted command sense key. Signed-off-by: Sagi Grimberg --- drivers/target/target_core_transport.c | 6 +++--- 1 file changed, 3 insertions

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

2015-07-08 Thread Sagi Grimberg
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 Reviewed-by: Christoph Hellwig --- drivers/scsi/scsi_common.c | 98

[PATCH v4 2/5] target: Split transport_send_check_condition_and_sense()

2015-07-08 Thread Sagi Grimberg
From: Bart Van Assche Move the code for translating a sense_reason_t code into a SCSI status ASC and ASCQ codes from transport_send_check_condition_and_sense() into the new function translate_sense_reason(). Convert the switch statement that performs the translation into table-driven code. Signe

[PATCH v4 0/5] Target sense data handling modifications

2015-07-08 Thread Sagi Grimberg
This patch set modifies the target sense data handling. First, cleanup transport_send_check_condition_and_sense() by splitting the sense translation to a separate function. Second, convert sense reason the switch statement to a table driven code. Third, Use scsi common helpers to correctly set the

[PATCH v4 1/5] target: Inline transport_get_sense_codes()

2015-07-08 Thread Sagi Grimberg
From: Bart Van Assche Inline this function in its call site since it performs a trivial task and since it is only called once. Signed-off-by: Bart Van Assche Signed-off-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig --- drivers/target/target_core_transport.c |

Re: [PATCH v3 2/3] megaraid_sas : use dev_printk when possible

2015-07-08 Thread Bjorn Helgaas
On Wed, Jul 8, 2015 at 5:47 AM, Hannes Reinecke wrote: > On 07/07/2015 10:52 PM, Bjorn Helgaas wrote: >> Use dev_printk() when possible to make messages more useful. >> >> Signed-off-by: Bjorn Helgaas >> --- >> drivers/scsi/megaraid/megaraid_sas_base.c | 304 >> +-- >>

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

2015-07-08 Thread Sagi Grimberg
On 7/8/2015 2:14 PM, Sagi Grimberg wrote: And it's actually not true that you'd need descriptor sense to encode the sector information; it'll be stored in the 'information' section (byte 3-6) for fixed format sense. But when I return the sector info in a fixed size format, the initiator is not

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

2015-07-08 Thread Sagi Grimberg
On 7/8/2015 2:44 PM, Christoph Hellwig wrote: On Wed, Jul 08, 2015 at 12:59:18PM +0200, Hannes Reinecke wrote: Actually it's controlled by the D_SENSE bit in the Control mode page (that's bit[2] of byte 2 in the control mode page). Which is currently set to '0', ie we will be returning fixed sen

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

2015-07-08 Thread Christoph Hellwig
On Wed, Jul 08, 2015 at 12:59:18PM +0200, Hannes Reinecke wrote: > Actually it's controlled by the D_SENSE bit in the Control mode page > (that's bit[2] of byte 2 in the control mode page). > Which is currently set to '0', ie we will be returning fixed sense > information. > _If_ we were to report

[PATCH 3/5] scsi: Add 'access_state' attribute

2015-07-08 Thread Hannes Reinecke
Add an 'access_state' attribute to display the LUN access state. Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_sysfs.c | 53 ++ include/scsi/scsi_device.h | 13 include/scsi/scsi_dh.h | 1 + 3 files changed, 67 insertions(+)

[PATCH 2/5] scsi_dh: add 'rescan' callback

2015-07-08 Thread Hannes Reinecke
If a device needs to be rescanned the device_handler might need to be rechecked, too. So add a 'rescan' callback to the device handler and call it upon scsi_rescan_device(). Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 53 +++--- drivers

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

2015-07-08 Thread Sagi Grimberg
On 7/8/2015 1:59 PM, Hannes Reinecke wrote: On 07/08/2015 12:49 PM, Christoph Hellwig wrote: On Wed, Jul 08, 2015 at 01:36:04PM +0300, Sagi Grimberg wrote: We don't have any other information today, but sector is not the only information that is requires a descriptor format, so maybe it will be

[PATCH 4/5] scsi_dh_alua: add 'state' callback function

2015-07-08 Thread Hannes Reinecke
Add a 'state' callback function to display the current path status in sysfs. Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 47 ++ 1 file changed, 47 insertions(+) diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scs

[PATCH 0/5] device handler interface update

2015-07-08 Thread Hannes Reinecke
Hi all, the current scsi_dh interface is very limited in functionality. In particular it's not possible to update the internal state without triggering a failover, and it not possible to figure out the internal state of the device handler. This patchset adds the functionality to rescan the device

[PATCH 5/5] scsi_dh_rdac: Add 'state' callback

2015-07-08 Thread Hannes Reinecke
Add a 'state' callback to display the current LUN access state to sysfs. Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_rdac.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/

[PATCH 1/5] scsi: rescan VPD attributes

2015-07-08 Thread Hannes Reinecke
This patch implements a VPD page rescan if the 'rescan' sysfs attribute is triggered. Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 11 +++ drivers/scsi/scsi.c| 20 +--- drivers/scsi/scsi_scan.c |

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

2015-07-08 Thread Hannes Reinecke
On 07/08/2015 12:49 PM, Christoph Hellwig wrote: > On Wed, Jul 08, 2015 at 01:36:04PM +0300, Sagi Grimberg wrote: >> We don't have any other information today, but sector is not the only >> information that is requires a descriptor format, so maybe it will be a >> bit awkward to condition the descr

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

2015-07-08 Thread Christoph Hellwig
On Wed, Jul 08, 2015 at 01:36:04PM +0300, Sagi Grimberg wrote: > We don't have any other information today, but sector is not the only > information that is requires a descriptor format, so maybe it will be a > bit awkward to condition the descriptor format on the sector info? The only reason why

Re: [PATCH v3 3/3] megaraid_sas : fix whitespace errors

2015-07-08 Thread Hannes Reinecke
On 07/07/2015 10:52 PM, Bjorn Helgaas wrote: > Fix whitespace and indentation errors. No code change. > > Signed-off-by: Bjorn Helgaas > --- > drivers/scsi/megaraid/megaraid_sas_base.c | 244 > ++--- > 1 file changed, 118 insertions(+), 126 deletions(-) > Reviewed-by:

Re: [PATCH v3 2/3] megaraid_sas : use dev_printk when possible

2015-07-08 Thread Hannes Reinecke
On 07/07/2015 10:52 PM, Bjorn Helgaas wrote: > Use dev_printk() when possible to make messages more useful. > > Signed-off-by: Bjorn Helgaas > --- > drivers/scsi/megaraid/megaraid_sas_base.c | 304 > +-- > drivers/scsi/megaraid/megaraid_sas_fusion.c | 95 >

Re: [PATCH v3 1/3] megaraid : use dev_printk when possible

2015-07-08 Thread Hannes Reinecke
On 07/07/2015 10:52 PM, Bjorn Helgaas wrote: > Use dev_printk() when possible to make messages more useful. > > Signed-off-by: Bjorn Helgaas > --- > drivers/scsi/megaraid.c | 140 > ++- > 1 file changed, 66 insertions(+), 74 deletions(-) > Reviewed-

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

2015-07-08 Thread Sagi Grimberg
On 7/8/2015 1:19 PM, Christoph Hellwig wrote: On Mon, Jul 06, 2015 at 04:15:08PM +0300, Sagi Grimberg wrote: PI errors should be reported in a descriptor format sense data. Fix that by adding a desc_format flag to struct sense_info and pass it to scsi_build_sense_buffer() to do the right thing.

Re: [PATCH v3 2/5] target: Split transport_send_check_condition_and_sense()

2015-07-08 Thread Sagi Grimberg
On 7/8/2015 1:15 PM, Christoph Hellwig wrote: + if (r == (__force int)TCM_CHECK_CONDITION_UNIT_ATTENTION) { You probably want to compare reason here to avoid the cast. I do want it... -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to m

Re: [PATCH v3 4/5] target: Use scsi helpers to build the sense data correctly

2015-07-08 Thread Sagi Grimberg
On 7/8/2015 1:17 PM, Christoph Hellwig wrote: --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -7,6 +7,7 @@ #include #include #include +#include #include #include Please only add the include in the files that need it. (And many of the existing

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

2015-07-08 Thread Christoph Hellwig
On Mon, Jul 06, 2015 at 04:15:08PM +0300, Sagi Grimberg wrote: > PI errors should be reported in a descriptor format sense data. > Fix that by adding a desc_format flag to struct sense_info and pass > it to scsi_build_sense_buffer() to do the right thing. Do we really need the additional flag? We

Re: [PATCH v3 4/5] target: Use scsi helpers to build the sense data correctly

2015-07-08 Thread Christoph Hellwig
> --- a/include/target/target_core_base.h > +++ b/include/target/target_core_base.h > @@ -7,6 +7,7 @@ > #include > #include > #include > +#include > #include > #include Please only add the include in the files that need it. (And many of the existing includes should be fixed up the same

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

2015-07-08 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig -- 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 v3 2/5] target: Split transport_send_check_condition_and_sense()

2015-07-08 Thread Christoph Hellwig
> + if (r == (__force int)TCM_CHECK_CONDITION_UNIT_ATTENTION) { You probably want to compare reason here to avoid the cast. Otherwise looks good, Reviewed-by: Christoph Hellwig -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vge

[Bug 101201] New: hpsa hang when creating ext4 FS

2015-07-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=101201 Bug ID: 101201 Summary: hpsa hang when creating ext4 FS Product: SCSI Drivers Version: 2.5 Kernel Version: 3.16.7-ckt11-1 Hardware: x86-64 OS: Linux Tree: Mai

RE: [PATCH v3 3/3] megaraid_sas : fix whitespace errors

2015-07-08 Thread Sumit Saxena
> -Original Message- > From: Bjorn Helgaas [mailto:bhelg...@google.com] > Sent: Wednesday, July 08, 2015 2:23 AM > To: Kashyap Desai; Uday Lingala; Sumit Saxena > Cc: megaraidlinux@avagotech.com; linux-scsi@vger.kernel.org; James > E.J. > Bottomley; linux-ker...@vger.kernel.org; Joe Per

RE: [PATCH v3 2/3] megaraid_sas : use dev_printk when possible

2015-07-08 Thread Sumit Saxena
> -Original Message- > From: Bjorn Helgaas [mailto:bhelg...@google.com] > Sent: Wednesday, July 08, 2015 2:23 AM > To: Kashyap Desai; Uday Lingala; Sumit Saxena > Cc: megaraidlinux@avagotech.com; linux-scsi@vger.kernel.org; James > E.J. > Bottomley; linux-ker...@vger.kernel.org; Joe Per

[PATCH 08/20] scsi_dh_alua: Make stpg synchronous

2015-07-08 Thread Hannes Reinecke
We should be issuing STPG synchronously as we need to evaluate the return code on failure. Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 189 + 1 file changed, 87 insertions(+), 102 deletions(-) diff --git a/drivers/scsi/device_handl

[PATCH 19/20] scsi_dh_alua: Send TEST UNIT READY to poll for transitioning

2015-07-08 Thread Hannes Reinecke
Sending a 'REPORT TARGET PORT GROUP' command is a costly operation, as the array has to gather information about all ports. So instead of using RTPG to poll for a status update when a port is in transitioning we should be sending a TEST UNIT READY, and wait for the sense code to report success. Si

[PATCH 01/20] scsi_dh_alua: Disable ALUA handling for non-disk devices

2015-07-08 Thread Hannes Reinecke
Non-disk devices might support ALUA, but the firmware implementation is untested and frequently broken. As we're don't actually need it disable ALUA support for non-disk device for now. Signed-off-by: Hannes Reinecke Reviewed-by: Bart Van Assche --- drivers/scsi/device_handler/scsi_dh_alua.c |

[PATCH 03/20] scsi_dh_alua: improved logging

2015-07-08 Thread Hannes Reinecke
Issue different logging messages if ALUA is not supported or the TPGS setting is invalid. Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/devi

[PATCH 17/20] scsi_dh_alua: Recheck state on unit attention

2015-07-08 Thread Hannes Reinecke
When we receive a unit attention code of 'ALUA state changed' we should recheck the state, as it might be due to an implicit ALUA state transition. At the same time a workqueue item might already be queued, which should be started immediately to avoid any delays. Signed-off-by: Hannes Reinecke --

[PATCH 16/20] scsi_dh_alua: Use workqueue for RTPG

2015-07-08 Thread Hannes Reinecke
The current ALUA device_handler has two drawbacks: - We're sending a 'SET TARGET PORT GROUP' command to every LUN, disregarding the fact that several LUNs might be in a port group and will be automatically switched whenever _any_ LUN within that port group receives the command. - Whenever a L

[PATCH 18/20] scsi_dh_alua: update all port states

2015-07-08 Thread Hannes Reinecke
When we read in the target port group state we should be updating all affected port groups, otherwise we risk running out of sync. Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 28 1 file changed, 24 insertions(+), 4 deletions(-) di

[PATCH 10/10] scsi_dh: move 'dh_state' sysfs attribute to generic code

2015-07-08 Thread Hannes Reinecke
As scsi_dh.c is now always compiled in we should be moving the 'dh_state' attribute to the generic code. Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_dh.c| 65 --- drivers/scsi/scsi_sysfs.c | 60 +++

[PATCH 14/20] scsi_dh_alua: parse target device id

2015-07-08 Thread Hannes Reinecke
Parse VPD descriptor to figure out the device identification. As devices might implement several descriptors the order of preference is: - NAA IEE Registered Extended - EUI-64 based 16-byte - EUI-64 based 12-byte - NAA IEEE Registered - NAA IEEE Extended A SCSI name string descriptor is preferred t

[PATCH 12/20] scsi_dh_alua: allocate RTPG buffer separately

2015-07-08 Thread Hannes Reinecke
The RTPG buffer will only evaluated within alua_rtpg(), so we can allocate it locally there and avoid having to put it into the global structure. Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 55 -- 1 file changed, 21 insertions(+), 3

[PATCH 20/20] scsi_dh_alua: Update version to 2.0

2015-07-08 Thread Hannes Reinecke
Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c index 30310c8..d077014 100644 --- a/drivers/scsi/device_handle

[PATCH 09/20] scsi_dh_alua: switch to scsi_execute()

2015-07-08 Thread Hannes Reinecke
All commands are issued synchronously, so no need to open-code scsi_execute anymore. Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 108 - 1 file changed, 27 insertions(+), 81 deletions(-) diff --git a/drivers/scsi/device_handler/scsi

[PATCH 11/20] scsi_dh_alua: Use separate alua_port_group structure

2015-07-08 Thread Hannes Reinecke
The port group needs to be a separate structure as several LUNs might belong to the same group. Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 210 +++-- 1 file changed, 137 insertions(+), 73 deletions(-) diff --git a/drivers/scsi/device_

[PATCH 10/20] scsi_dh_alua: put sense buffer on stack

2015-07-08 Thread Hannes Reinecke
We don't need to have the sense buffer available all the time, putting it on stack is totally sufficient. Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/device_handler/scs

[PATCH 15/20] revert "scsi_dh_alua: ALUA hander attach should succeed while TPG is transitioning"

2015-07-08 Thread Hannes Reinecke
This reverts commit a8e5a2d593cbfccf530c3382c2c328d2edaa7b66 Obsoleted by the next patch. Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/drivers/scsi/device_handler/scsi_dh

[PATCH 13/20] scsi_dh_alua: simplify sense code handling

2015-07-08 Thread Hannes Reinecke
Most sense code is already handled in the generic code, so we shouldn't be adding special cases here. However, when doing so we need to check for unit attention whenever we're sending an internal command. Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 50 +++-

[PATCH 07/20] scsi_dh_alua: Pass buffer as function argument

2015-07-08 Thread Hannes Reinecke
Pass in the buffer as a function argument for submit_vpd() and submit_rtpg(). Reviewed-by: Bart Van Assche Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/drivers/scsi/de

[PATCH 02/20] scsi_dh_alua: Use vpd_pg83 information

2015-07-08 Thread Hannes Reinecke
The SCSI device now has the VPD page 0x83 information attached, so there is no need to query it again. Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 83 +- 1 file changed, 13 insertions(+), 70 deletions

[PATCHv2 00/20] asynchronous ALUA device handler

2015-07-08 Thread Hannes Reinecke
Hi all, here is an update to the ALUA device handler. The main features are: - Topology discovery: the device handler creates a separate port_group structure, which is used to update all paths to the same port group. With that we achieve a significant reduction of the number of RTPGs. - Asy

[PATCH 05/20] scsi: remove scsi_show_sense_hdr()

2015-07-08 Thread Hannes Reinecke
Last caller is gone, so remove it. Reviewed-by: Bart Van Assche Reviewed-by: Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- include/scsi/scsi_dbg.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/scsi/scsi_dbg.h b/include/scsi/scsi_dbg.h index f8170e9..56710e0 1

[PATCH 04/20] scsi_dh_alua: Improve error handling

2015-07-08 Thread Hannes Reinecke
Improve error handling and use standard logging functions instead of hand-crafted ones. Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 78 +++--- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/drivers/scsi/device_handler/s

[PATCH 06/20] scsi_dh_alua: use flag for RTPG extended header

2015-07-08 Thread Hannes Reinecke
We should be using a flag when RTPG extended header is not supported, that saves us sending RTPG twice for older arrays. Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 15 +++ 1 file change

Re: [PATCH 3/3] sd: do not try to spin-up disks for ALUA 'transitioning' state

2015-07-08 Thread Hannes Reinecke
On 07/08/2015 10:41 AM, Sagi Grimberg wrote: > On 7/8/2015 10:41 AM, Hannes Reinecke wrote: >> If a disk reports an ALUA 'transitioning' state we should not >> try to spin up the device. >> >> Signed-off-by: Hannes Reinecke >> --- >> drivers/scsi/sd.c | 2 ++ >> 1 file changed, 2 insertions(+)

Re: [PATCH 3/3] sd: do not try to spin-up disks for ALUA 'transitioning' state

2015-07-08 Thread Sagi Grimberg
On 7/8/2015 10:41 AM, Hannes Reinecke wrote: If a disk reports an ALUA 'transitioning' state we should not try to spin up the device. Signed-off-by: Hannes Reinecke --- drivers/scsi/sd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 7c0bdaa

[PATCH 06/10] scsi_dh: kill struct scsi_dh_data

2015-07-08 Thread Hannes Reinecke
From: Christoph Hellwig Add a ->handler and a ->handler_data field to struct scsi_device and kill this indirection. Also move struct scsi_device_handler to scsi_dh.h so that changes to it don't require rebuilding every SCSI LLDD. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen

[PATCH 07/10] scsi_dh: add a common helper to get a scsi_device from a request_queue

2015-07-08 Thread Hannes Reinecke
From: Christoph Hellwig And cleanup the various messy opencoded versions of this. Note that this moves the sdev_state checks outside the queue_lock coverage, but as we don't hold the lock over the activation they are only advisory anyway. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K.

[PATCH 01/10] dm-mpath, scsi_dh: don't let dm detach device handlers

2015-07-08 Thread Hannes Reinecke
From: Christoph Hellwig While allowing dm-mpath to attach device handlers is a functionality we need for backwards compatibility reason there is no reason to reference count them and detach them if dm-mpath stops using the device for some reason. If the device handler works for the given device

[PATCH 09/10] scsi_dh: return individual errors in scsi_dh_activate()

2015-07-08 Thread Hannes Reinecke
When calling scsi_dh_activate() we should be returning individual errors and not lumping all into one. Reviewed-by: Bart van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_dh.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/scsi_dh.

[PATCH 05/10] scsi_dh: move device matching to the core code

2015-07-08 Thread Hannes Reinecke
From: Christoph Hellwig Add a single list of devices that need non-ALUA device handlers to the core scsi_dh code so that we can autoload the modules for them at probe time. While this is a little ugly in terms of architecture it actually significantly simplifies the code in addition to the new a

[PATCH 03/10] scsi_dh: move to drivers/scsi

2015-07-08 Thread Hannes Reinecke
From: Christoph Hellwig Prepare for building scsi_dh.c into the core SCSI module by moving it to drivers/scsi. Signed-off-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/Makefile | 1 + drivers/scsi/device_handler/Makefile | 1 - drivers/scsi/device_

[PATCH 00/10] Integrate scsi_dh better into the scsi core V4

2015-07-08 Thread Hannes Reinecke
This series ties scsi_dh deeper into the scsi core, and fixes all kinds of issues in it, most importantly the race between using and detaching device handlers. Changes since V1: - updated comments / strings based on review feedback - moved scsi_dh.c to drivers/scsi to fix the srcdir = objdir b

[PATCH 04/10] scsi_dh: integrate into the core SCSI code

2015-07-08 Thread Hannes Reinecke
From: Christoph Hellwig Stop building scsi_dh as a separate module and integrate it fully into the core SCSI code with explicit callouts at bus scan time. For now the callouts are placed at the same point as the old bus notifiers were called, but in the future we will be able to look at ALUA INQ

[PATCH 02/10] dm-mpath, scsi_dh: request scsi_dh modules in scsi_dh, not dm-mpath

2015-07-08 Thread Hannes Reinecke
From: Christoph Hellwig This way we can reused the same code any attachment method, not just those requested from dm-mpath. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Acked-by: Mike Snitzer --- drivers/md/dm-mpath.c | 6 ---

[PATCH 08/10] scsi_dh: don't allow to detach device handlers at runtime

2015-07-08 Thread Hannes Reinecke
From: Christoph Hellwig The I/O submission and completion pathes call into the device handler without any synchronization agains detachment. So disallow detaching device handlers at runtime. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke --- dr

Re: blk-mq vs kmemleak

2015-07-08 Thread Christoph Hellwig
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 objects ? 96 is almost guaranteed to be the se

Re: [PATCH v1 Resend] mpt2sas: setpci reset kernel oops fix

2015-07-08 Thread Christoph Hellwig
On Wed, Jul 08, 2015 at 11:17:47AM +0530, Nagarajkumar Narayanan wrote: > Note: pci_access_mutex is used only if nytro warpdrive cards > (ioc->is_warpdrive based on device id) are used > as we could not test this case with other SAS2 HBA cards > We can remove this check if this behaviour confirme

[PATCH 2/3] scsi: rescan device if an invalid capacity had been reported

2015-07-08 Thread Hannes Reinecke
Device paths in ALUA state 'standby' do not necessarily support the READ_CAPACITY command. This patch adds a new flag 'invalid_capacity' to the scsi device, and rescans the device if an ALUA state change occurred. Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_lib.c| 4 drivers/s

[PATCH 1/3] sd: Fixup capacity for ALUA standby or transitioning ports

2015-07-08 Thread Hannes Reinecke
If a target port is in ALUA 'standby' or 'transitioning' state it might not need to respond to a 'READ CAPACITY' command. So fixup the initialization for these cases. Signed-off-by: Hannes Reinecke --- drivers/scsi/sd.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/

[PATCH 0/3] REAC CAPACITY fixes

2015-07-08 Thread Hannes Reinecke
Hi all, here's a small patch series as an attempt to fix up the READ CAPACITY issue on ALUA devices. The problem is that an ALUA device in state 'standby' or 'transitioning' might return the READ CAPACITY command with a sense code, causing the sd driver to report an error in sd_read_capacity. This

[PATCH 3/3] sd: do not try to spin-up disks for ALUA 'transitioning' state

2015-07-08 Thread Hannes Reinecke
If a disk reports an ALUA 'transitioning' state we should not try to spin up the device. Signed-off-by: Hannes Reinecke --- drivers/scsi/sd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 7c0bdaa..180a6e8 100644 --- a/drivers/scsi/sd.c +++ b/dr

Re: [PATCH] [SCSI] FlashPoint: optimize string comparison

2015-07-08 Thread Frans Klaver
On Wed, Jul 8, 2015 at 7:45 AM, Christophe JAILLET wrote: > Le 07/07/2015 19:04, Khalid Aziz a écrit : >> >> On 07/07/2015 02:45 AM, Frans Klaver wrote: >>> >>> On Tue, Jul 7, 2015 at 7:39 AM, Christophe JAILLET >>> wrote: Stop comparing the strings as soon as we know that they don't ma