Re: dm-multipath test scripts

2016-02-19 Thread Mike Snitzer
On Fri, Feb 19 2016 at 2:42pm -0500, Mike Snitzer wrote: > On Fri, Feb 19 2016 at 3:37am -0500, > Junichi Nomura wrote: > > > On 02/19/16 09:33, Nomura Junichi wrote: > > > On 02/19/16 02:17, Mike Snitzer wrote: > > >> What is the last kernel version that your scripts have worked on? > > > >

Re: dm-multipath test scripts

2016-02-19 Thread Mike Snitzer
On Fri, Feb 19 2016 at 3:37am -0500, Junichi Nomura wrote: > On 02/19/16 09:33, Nomura Junichi wrote: > > On 02/19/16 02:17, Mike Snitzer wrote: > >> What is the last kernel version that your scripts have worked on? > > > > v4.4 worked fine. I'll check with v4.5-rc4 when I get a machine. > > v

Re: [PATCHv8 20/23] scsi: Add 'access_state' attribute

2016-02-19 Thread Bart Van Assche
On 02/19/2016 12:17 AM, Hannes Reinecke wrote: > +static ssize_t > +sdev_show_access_state(struct device *dev, > +struct device_attribute *attr, > +char *buf) > +{ > + struct scsi_device *sdev = to_scsi_device(dev); > + unsigned char access_state; > +

Re: [PATCH 0/7] Runtime PM support for AHCI host controller driver

2016-02-19 Thread Tejun Heo
On Thu, Feb 18, 2016 at 10:54:10AM +0200, Mika Westerberg wrote: > Linux already supports runtime PM of disks (drivers/scsi/sd.c) so that > after certain amount of idle time the disk is suspended automatically. This > series extends the support to AHCI host controllers. Whenever SATA ports > are de

Re: [PATCH 0/7] Runtime PM support for AHCI host controller driver

2016-02-19 Thread Jens Axboe
On 02/18/2016 09:40 AM, Tejun Heo wrote: Hello, Patchset looks good to me. Once Jens acks the first patch, I'll apply the whole series to libata/for-4.6 w/ the field initialization updated. You can add my acked-by to that one, looks good to me. -- Jens Axboe -- To unsubscribe from this list

Re: [PATCH v9 3/3] add support for DWC UFS Host Controller

2016-02-19 Thread Arnd Bergmann
On Thursday 18 February 2016 17:20:27 Joao Pinto wrote: > > Documentation/devicetree/bindings/ufs/ufs-dwc.txt | 19 + > MAINTAINERS | 6 + > drivers/scsi/ufs/Kconfig | 51 +++ > drivers/scsi/ufs/Makefile |

Re: [PATCH 5/6] hisi_sas: add hisi_sas_slave_configure()

2016-02-19 Thread Hannes Reinecke
On 02/19/2016 11:46 AM, John Garry wrote: > On 18/02/2016 10:57, John Garry wrote: >> On 18/02/2016 10:30, Hannes Reinecke wrote: >>> On 02/18/2016 11:12 AM, John Garry wrote: On 18/02/2016 07:40, Hannes Reinecke wrote: >>> [ .. ] > Well, the classical thing would be to associate each requ

Re: [PATCH v2] fusion-mptbase: handle failed allocation for workqueue

2016-02-19 Thread Tomas Henzl
On 18.2.2016 17:55, Ewan Milne wrote: > On Thu, 2016-02-18 at 11:40 -0500, Ewan Milne wrote: >> It also appears to me upon further inspection that the existing code has >> other problems. In particular, once mpt_mapresources() has returned >> with a nonzero error code, it looks like iounmap() shou

Re: [PATCH 5/6] hisi_sas: add hisi_sas_slave_configure()

2016-02-19 Thread John Garry
On 18/02/2016 10:57, John Garry wrote: On 18/02/2016 10:30, Hannes Reinecke wrote: On 02/18/2016 11:12 AM, John Garry wrote: On 18/02/2016 07:40, Hannes Reinecke wrote: [ .. ] Well, the classical thing would be to associate each request tag with a SAS task; or, in your case, associate each sl

Re: [PATCH 0/7] Runtime PM support for AHCI host controller driver

2016-02-19 Thread Mika Westerberg
On Thu, Feb 18, 2016 at 11:40:29AM -0500, Tejun Heo wrote: > Hello, > > Patchset looks good to me. Once Jens acks the first patch, I'll apply > the whole series to libata/for-4.6 w/ the field initialization > updated. Thanks! -- To unsubscribe from this list: send the line "unsubscribe linux-scs

Re: dm-multipath test scripts

2016-02-19 Thread Junichi Nomura
On 02/19/16 09:33, Nomura Junichi wrote: > On 02/19/16 02:17, Mike Snitzer wrote: >> What is the last kernel version that your scripts have worked on? > > v4.4 worked fine. I'll check with v4.5-rc4 when I get a machine. v4.5-rc4 works fine, too. So if all tests fail for you, it might be due to d

[PATCHv8 19/23] scsi_dh: add 'rescan' callback

2016-02-19 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(). The rescan callback will be invoked from the Unit Attention handling of ASC/ASCQ 3F 03 (INQUIRY DATA HAS CHANGED). Reviewed-

[PATCHv8 02/23] scsi_dh_alua: separate out alua_stpg()

2016-02-19 Thread Hannes Reinecke
Separate out SET TARGET PORT GROUP functionality into a separate function alua_stpg(). Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 95 +++--- 1 file changed, 61 insertions(+)

[PATCHv8 10/23] revert commit a8e5a2d593cb ("[SCSI] scsi_dh_alua: ALUA handler attach should succeed while TPG is transitioning")

2016-02-19 Thread Hannes Reinecke
This reverts commit a8e5a2d593cbfccf530c3382c2c328d2edaa7b66 Obsoleted by the next patch. Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Ewan Milne Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 31 -- 1 f

[PATCHv8 20/23] scsi: Add 'access_state' attribute

2016-02-19 Thread Hannes Reinecke
Add an 'access_state' attribute to struct scsi_device to display the asymmetric LUN access state. Reviewed-by: Ewan Milne Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_sysfs.c | 53 ++ include/scsi/scsi_device.h

[PATCHv8 18/23] scsi_dh_alua: Send TEST UNIT READY to poll for transitioning

2016-02-19 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. Re

[PATCHv8 21/23] scsi_dh_alua: use common definitions for ALUA state

2016-02-19 Thread Hannes Reinecke
scsi_proto.h now contains definitions for the ALUA state, so we don't have to carry them in the device handler. Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 58 +- 1 file changed, 25 insertions(+), 33

[PATCHv8 06/23] scsi_dh_alua: allocate RTPG buffer separately

2016-02-19 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. Reviewed-by: Ewan Milne Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 57 ++

[PATCHv8 13/23] scsi_dh_alua: Use workqueue for RTPG

2016-02-19 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

[PATCHv8 17/23] scsi_dh_alua: update all port states

2016-02-19 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. Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 35

[PATCHv8 01/23] scsi_dh_alua: Pass buffer as function argument

2016-02-19 Thread Hannes Reinecke
Pass in the buffer as a function argument for submit_rtpg(). Reviewed-by: Martin K. Petersen Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletio

[PATCHv8 23/23] scsi_dh_alua: Update version to 2.0

2016-02-19 Thread Hannes Reinecke
Reviewed-by: Christoph Hellwig 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 fc77765..5bcdf8d 100644

[PATCHv8 22/23] scsi_dh_alua: update 'access_state' field

2016-02-19 Thread Hannes Reinecke
Track attached SCSI devices and update the 'access_state' field whenever an ALUA state change has been detected. Reviewed-by: Bart Van Assche Reviewed-by: Ewan Milne Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 48 +

Re: [PATCH 3/7] scsi: Drop runtime PM usage count after host is added

2016-02-19 Thread Mika Westerberg
On Fri, Feb 19, 2016 at 09:50:50AM +1100, Julian Calaby wrote: > Hi Mika, > > On Thu, Feb 18, 2016 at 7:54 PM, Mika Westerberg > wrote: > > Runtime PM of the SCSI host is already handled by calls to > > scsi_autopm_get_host() and scsi_autopm_put_host() from appropriate places > > whenever the hos

[PATCHv8 11/23] scsi_dh_alua: move optimize_stpg evaluation

2016-02-19 Thread Hannes Reinecke
When the optimize_stpg module option is set we should just set it once during port_group allocation. Doing so allows us to override it later with device specific settings. Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler

[PATCHv8 12/23] scsi_dh_alua: remove 'rel_port' from alua_dh_data structure

2016-02-19 Thread Hannes Reinecke
The 'relative port' field is not used, and might get stale when the port group changes. So remove the field altogether. Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 6 +- 1 file changed, 1 insert

[PATCHv8 14/23] scsi_dh_alua: Allow workqueue to run synchronously

2016-02-19 Thread Hannes Reinecke
Some arrays may only capable of handling one STPG at a time, so this patch adds a singlethreaded workqueue for STPGs to be submitted synchronously. Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 21 +++

[PATCHv8 07/23] scsi_dh_alua: Use separate alua_port_group structure

2016-02-19 Thread Hannes Reinecke
The port group needs to be a separate structure as several LUNs might belong to the same group. Reviewed-by: Christoph Hellwig Reviewed-by: Ewan Milne Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 181 - include/scsi/scsi_dh.h

[PATCHv8 04/23] scsi_dh_alua: call alua_rtpg() if stpg fails

2016-02-19 Thread Hannes Reinecke
If the call to SET TARGET PORT GROUPS fails we have no idea what state the array is left in, so we need to issue a call to REPORT TARGET PORT GROUPS in these cases. Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_d

[PATCHv8 03/23] scsi_dh_alua: Make stpg synchronous

2016-02-19 Thread Hannes Reinecke
The 'activate_complete' function needs to be executed after stpg has finished, so we can as well execute stpg synchronously and call the function directly. Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c

[PATCHv8 15/23] scsi_dh_alua: Add new blacklist flag 'BLIST_SYNC_ALUA'

2016-02-19 Thread Hannes Reinecke
Add a new blacklist flag BLIST_SYNC_ALUA to instruct the alua device handler to use synchronous command submission for ALUA commands. Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 2 ++ drivers/scsi/s

[PATCHv8 09/23] scsi_dh_alua: simplify alua_initialize()

2016-02-19 Thread Hannes Reinecke
Rework alua_check_vpd() to use scsi_vpd_get_tpg() and move the port group selection into the function, too. With that we can simplify alua_initialize() to just call alua_check_tpgs() and alua_check_vpd(); Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke

[PATCHv8 05/23] scsi_dh_alua: switch to scsi_execute_req_flags()

2016-02-19 Thread Hannes Reinecke
All commands are issued synchronously, so no need to open-code scsi_execute_req_flags() anymore. And we can get rid of the static sense code structure element. scsi_execute_req_flags() will be setting REQ_QUIET and REQ_PREEMPT, but that is perfectly fine as we're evaluating and logging any errors o

[PATCHv8 16/23] scsi_dh_alua: Recheck state on unit attention

2016-02-19 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. This allows us to return NEEDS_RETRY instead of ADD_TO_MLQUEUE, allowing to terminate the retries after a certain time. At the same time a workqueue it

[PATCHv8 00/23] ALUA device handler update, part II

2016-02-19 Thread Hannes Reinecke
As promised here is now the second part of my ALUA device handler update. This contains a major rework of the ALUA device handler as execution is moved onto a workqueue. This has the advantage that we avoid having to do multiple calls to the same LUN (as happens frequently when failing over a LUN w

[PATCHv8 08/23] scsi_dh_alua: use unique device id

2016-02-19 Thread Hannes Reinecke
Use scsi_vpd_lun_id() to assign a unique device identification to the alua port group structure. Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 55 +++--- 1 file changed, 50 ins