Re: [PATCH V7 4/6] blk-mq: introduce .get_budget and .put_budget in blk_mq_ops

2017-10-17 Thread Hannes Reinecke
On 10/17/2017 03:29 AM, Ming Lei wrote: > On Mon, Oct 16, 2017 at 01:30:09PM +0200, Hannes Reinecke wrote: >> On 10/13/2017 07:29 PM, Ming Lei wrote: >>> On Fri, Oct 13, 2017 at 05:08:52PM +, Bart Van Assche wrote: On Sat, 2017-10-14 at 00:45 +0800, Ming Lei wrote: > On Fri, Oct 13,

[PATCH] scsi: Handle power-on reset unit attention

2017-10-17 Thread Hannes Reinecke
As per SAM there is a status precedence, with any sense code 29/XX taking second place just after an ACA ACTIVE status. Additionally, each target might prefer to not queue any unit attention conditions, but just report one. Due to the above this will be that one with the highest precedence. This

[PATCH] sd: always retry READ CAPACITY for ALUA state transition

2017-10-17 Thread Hannes Reinecke
During ALUA state transitions the device might return a sense code 02/04/0a (Logical unit not accessible, asymmetric access state transition). As this is a transient error we should just retry the READ CAPACITY call until the state transition finishes and the correct capacity can be returned.

[PATCH] scsi: Do not retry invalid function error

2017-10-17 Thread Hannes Reinecke
Hitachi USP-V returns 'Invalid function' when the internal staging mechanism encountered an error. These errors should not be retried on another path. Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_error.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH v2 02/15] usb: gadget: make config_item_type structures const

2017-10-17 Thread Felipe Balbi
Hi, Bhumika Goyal writes: > Make these structures const as they are only passed to the const > argument of the functions config_{group/item}_init_type_name. > > Signed-off-by: Bhumika Goyal > --- > * Changes in v2- Combine all the followup patches and

Re: [PATCH V7 4/6] blk-mq: introduce .get_budget and .put_budget in blk_mq_ops

2017-10-17 Thread Ming Lei
On Tue, Oct 17, 2017 at 08:38:01AM +0200, Hannes Reinecke wrote: > On 10/17/2017 03:29 AM, Ming Lei wrote: > > On Mon, Oct 16, 2017 at 01:30:09PM +0200, Hannes Reinecke wrote: > >> On 10/13/2017 07:29 PM, Ming Lei wrote: > >>> On Fri, Oct 13, 2017 at 05:08:52PM +, Bart Van Assche wrote: >

Re: [PATCH v9 10/10] block, nvme: Introduce blk_mq_req_flags_t

2017-10-17 Thread Hannes Reinecke
On 10/17/2017 01:29 AM, Bart Van Assche wrote: > Several block layer and NVMe core functions accept a combination > of BLK_MQ_REQ_* flags through the 'flags' argument but there is > no verification at compile time whether the right type of block > layer flags is passed. Make it possible for sparse

Re: [PATCH v9 09/10] block, scsi: Make SCSI quiesce and resume work reliably

2017-10-17 Thread Hannes Reinecke
On 10/17/2017 01:29 AM, Bart Van Assche wrote: > The contexts from which a SCSI device can be quiesced or resumed are: > * Writing into /sys/class/scsi_device/*/device/state. > * SCSI parallel (SPI) domain validation. > * The SCSI device power management methods. See also scsi_bus_pm_ops. > > It

[PATCH] scsi: Add REPORTLUN2 to EMC SYMMETRIX blacklist entry

2017-10-17 Thread Hannes Reinecke
From: Kurt Garloff All EMC SYMMETRIX support REPORT_LUNS, even if configured to report SCSI-2 for whatever reason. Signed-off-by: Kurt Garloff Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_devinfo.c | 2 +- 1 file changed, 1

[PATCH] scsi: Add 'AIX VDASD' to blacklist

2017-10-17 Thread Hannes Reinecke
The AIX VDASD devices do support VPD pages, but implement only SPC. So set BLIST_TRY_VPD_PAGS to correctly display the VPD information in sysfs. Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_devinfo.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH V8 3/5] scsi: Align block queue to dma_get_cache_alignment()

2017-10-17 Thread Huacai Chen
In non-coherent DMA mode, kernel uses cache flushing operations to maintain I/O coherency, so scsi's block queue should be aligned to ARCH_DMA_MINALIGN. Otherwise, If a DMA buffer and a kernel structure share a same cache line, and if the kernel structure has dirty data, cache_invalidate (no

[PATCH V8 5/5] libata: Align DMA buffer to dma_get_cache_alignment()

2017-10-17 Thread Huacai Chen
In non-coherent DMA mode, kernel uses cache flushing operations to maintain I/O coherency, so in ata_do_dev_read_id() the DMA buffer should be aligned to ARCH_DMA_MINALIGN. Otherwise, If a DMA buffer and a kernel structure share a same cache line, and if the kernel structure has dirty data,

[PATCH V8 4/5] libsas: Align SMP req/resp to dma_get_cache_alignment()

2017-10-17 Thread Huacai Chen
In non-coherent DMA mode, kernel uses cache flushing operations to maintain I/O coherency, so libsas's SMP request/response should be aligned to ARCH_DMA_MINALIGN. Otherwise, If a DMA buffer and a kernel structure share a same cache line, and if the kernel structure has dirty data,

Re: [PATCH] scsi: libfc: Convert timers to use timer_setup()

2017-10-17 Thread Johannes Thumshirn
Looks good, Acked-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton

[PATCH V8 1/5] dma-mapping: Rework dma_get_cache_alignment()

2017-10-17 Thread Huacai Chen
Make dma_get_cache_alignment() to accept a 'dev' argument. As a result, it can return different alignments due to different devices' I/O cache coherency. Currently, ARM/ARM64 and MIPS support coherent & noncoherent devices co-exist. This may be extended in the future, so add a new function

Re: [PATCH v2 1/8] lib/scatterlist: Introduce sgl_alloc() and sgl_free()

2017-10-17 Thread Johannes Thumshirn
Thanks Bart, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham

Re: [PATCH v9 07/10] ide, scsi: Tell the block layer at request allocation time about preempt requests

2017-10-17 Thread Hannes Reinecke
On 10/17/2017 01:29 AM, Bart Van Assche wrote: > Convert blk_get_request(q, op, __GFP_RECLAIM) into > blk_get_request_flags(q, op, BLK_MQ_PREEMPT). This patch does not > change any functionality. > > Signed-off-by: Bart Van Assche > Tested-by: Martin Steigerwald

Re: [PATCH v9 08/10] block: Add the QUEUE_FLAG_PREEMPT_ONLY request queue flag

2017-10-17 Thread Hannes Reinecke
On 10/17/2017 01:29 AM, Bart Van Assche wrote: > This flag will be used in the next patch to let the block layer > core know whether or not a SCSI request queue has been quiesced. > A quiesced SCSI queue namely only processes RQF_PREEMPT requests. > > Signed-off-by: Bart Van Assche

Re: [PATCH v9 05/10] block: Introduce blk_get_request_flags()

2017-10-17 Thread Hannes Reinecke
On 10/17/2017 01:29 AM, Bart Van Assche wrote: > A side effect of this patch is that the GFP mask that is passed to > several allocation functions in the legacy block layer is changed > from GFP_KERNEL into __GFP_DIRECT_RECLAIM. > > Signed-off-by: Bart Van Assche >

Re: [PATCH v9 06/10] block: Introduce BLK_MQ_REQ_PREEMPT

2017-10-17 Thread Hannes Reinecke
On 10/17/2017 01:29 AM, Bart Van Assche wrote: > Set RQF_PREEMPT if BLK_MQ_REQ_PREEMPT is passed to > blk_get_request_flags(). > > Signed-off-by: Bart Van Assche > Tested-by: Martin Steigerwald > Cc: Christoph Hellwig > Cc: Ming Lei

[PATCH] scsi: Add TRY_VPD_PAGES to HITACHI OPEN-V blacklist entry

2017-10-17 Thread Hannes Reinecke
HITACHI is always supporting VPD pages, even though it's claiming to support SCSI Revision 3 only. Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_devinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_devinfo.c

[PATCH] scsi: Always retry internal target error

2017-10-17 Thread Hannes Reinecke
EMC Symmetrix is returning 'internal target error' for a variety of conditions, most of which will be transient. So we should always retry it, even with failfast set. Otherwise we'd get spurious path flaps with multipath. Signed-off-by: Hannes Reinecke ---

[PATCH V8 2/5] MIPS: Implement dma_map_ops::get_cache_alignment()

2017-10-17 Thread Huacai Chen
Currently, MIPS is an architecture which support coherent & noncoherent devices co-exist. So implement get_cache_alignment() function pointer in 'struct dma_map_ops' to return different dma alignments. Cc: sta...@vger.kernel.org Signed-off-by: Huacai Chen ---

Re: [PATCH v2 01/15] configfs: make ci_type field, some pointers and function arguments const

2017-10-17 Thread Greg KH
On Mon, Oct 16, 2017 at 05:18:40PM +0200, Bhumika Goyal wrote: > The ci_type field of the config_item structure do not modify the fields > of the config_item_type structure it points to. And the other pointers > initialized with ci_type do not modify the fields as well. > So, make the ci_type

Re: [PATCH v2 00/15] make structure field, function arguments and structures const

2017-10-17 Thread Greg KH
On Tue, Oct 17, 2017 at 12:16:18PM +0200, Julia Lawall wrote: > > > On Tue, 17 Oct 2017, Greg KH wrote: > > > On Mon, Oct 16, 2017 at 05:18:39PM +0200, Bhumika Goyal wrote: > > > Make the ci_type field and some function arguments as const. After this > > > change, make config_item_type

Re: [PATCH v2 12/15] RDMA/cma: make config_item_type const

2017-10-17 Thread Leon Romanovsky
On Mon, Oct 16, 2017 at 05:18:51PM +0200, Bhumika Goyal wrote: > Make these structures const as they are either passed to the functions > having the argument as const or stored as a reference in the "ci_type" > const field of a config_item structure. > > Signed-off-by: Bhumika Goyal

Re: [PATCH V8 5/5] libata: Align DMA buffer to dma_get_cache_alignment()

2017-10-17 Thread Sergei Shtylyov
On 10/17/2017 11:05 AM, Huacai Chen wrote: In non-coherent DMA mode, kernel uses cache flushing operations to maintain I/O coherency, so in ata_do_dev_read_id() the DMA buffer should be aligned to ARCH_DMA_MINALIGN. Otherwise, If a DMA buffer and a kernel structure share a same cache line, and

Re: [PATCH v2 00/15] make structure field, function arguments and structures const

2017-10-17 Thread Julia Lawall
On Tue, 17 Oct 2017, Greg KH wrote: > On Mon, Oct 16, 2017 at 05:18:39PM +0200, Bhumika Goyal wrote: > > Make the ci_type field and some function arguments as const. After this > > change, make config_item_type structures as const. > > > > * Changes in v2- Combine all the followup patches and

Re: [PATCH v2 11/15] stm class: make config_item_type const

2017-10-17 Thread Greg KH
On Mon, Oct 16, 2017 at 05:18:50PM +0200, Bhumika Goyal wrote: > Make config_item_type structures const as they are either passed to a > function having the argument as const or used inside a if statement or > stored in the const "ci_type" field of a config_item structure. > > Done using

Re: [PATCH v9 09/10] block, scsi: Make SCSI quiesce and resume work reliably

2017-10-17 Thread Ming Lei
On Tue, Oct 17, 2017 at 08:33:36AM +0200, Hannes Reinecke wrote: > On 10/17/2017 01:29 AM, Bart Van Assche wrote: > > The contexts from which a SCSI device can be quiesced or resumed are: > > * Writing into /sys/class/scsi_device/*/device/state. > > * SCSI parallel (SPI) domain validation. > > *

Re: [PATCH v2 00/15] make structure field, function arguments and structures const

2017-10-17 Thread Greg KH
On Mon, Oct 16, 2017 at 05:18:39PM +0200, Bhumika Goyal wrote: > Make the ci_type field and some function arguments as const. After this > change, make config_item_type structures as const. > > * Changes in v2- Combine all the followup patches and the constification > patches into a series. Who

Re: [PATCH v2 08/15] nvmet: make config_item_type const

2017-10-17 Thread Sagi Grimberg
Acked-by: Sagi Grimberg

Re: [PATCH v2 07/15] usb: gadget: configfs: make config_item_type const

2017-10-17 Thread Felipe Balbi
Bhumika Goyal writes: > Make config_item_type structures const as they are either passed to a > function having the argument as const or stored in the const "ci_type" > field of a config_item structure. > > Done using Coccinelle. > > Signed-off-by: Bhumika Goyal

Re: [PATCH V8 4/5] libsas: Align SMP req/resp to dma_get_cache_alignment()

2017-10-17 Thread Marek Szyprowski
Hi Huacai, On 2017-10-17 10:05, Huacai Chen wrote: In non-coherent DMA mode, kernel uses cache flushing operations to maintain I/O coherency, so libsas's SMP request/response should be aligned to ARCH_DMA_MINALIGN. Otherwise, If a DMA buffer and a kernel structure share a same cache line, and

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

2017-10-17 Thread James Bottomley
On Tue, 2017-10-17 at 09:11 +0200, Hannes Reinecke wrote: > During ALUA state transitions the device might return > a sense code 02/04/0a (Logical unit not accessible, asymmetric > access state transition). As this is a transient error > we should just retry the READ CAPACITY call until > the

Re: [PATCH] scsi: sd: Implement blacklist option for WRITE SAME w/ UNMAP

2017-10-17 Thread Laurence Oberman
On Fri, 2017-09-29 at 10:01 -0400, Laurence Oberman wrote: > On Fri, 2017-09-29 at 09:21 -0400, Martin K. Petersen wrote: > > Laurence, > > > > > I am testing this but its not being picked up so I want to know > > > if > > > I > > > have the kernel command line wrong here. > > > > > >

Re: [PATCH v2 7/8] scsi/pmcraid: Remove an unused structure member

2017-10-17 Thread Bart Van Assche
On Tue, 2017-10-17 at 08:21 +0200, Hannes Reinecke wrote: > On 10/17/2017 12:49 AM, Bart Van Assche wrote: > > Signed-off-by: Bart Van Assche > > Reviewed-by: Johannes Thumshirn > > Cc: linux-scsi@vger.kernel.org > > Cc: Martin K. Petersen

Re: [PATCH] scsi: sd: Implement blacklist option for WRITE SAME w/ UNMAP

2017-10-17 Thread Laurence Oberman
On Tue, 2017-10-17 at 10:26 -0400, Laurence Oberman wrote: > On Fri, 2017-09-29 at 10:01 -0400, Laurence Oberman wrote: > > On Fri, 2017-09-29 at 09:21 -0400, Martin K. Petersen wrote: > > > Laurence, > > > > > > > I am testing this but its not being picked up so I want to know > > > > if > > > >

Re: [PATCH v2 5/8] target: Use sgl_alloc_order() and sgl_free()

2017-10-17 Thread Bart Van Assche
On Tue, 2017-10-17 at 08:14 +0200, Hannes Reinecke wrote: > On 10/17/2017 12:49 AM, Bart Van Assche wrote: > > [ ... ] > > void target_free_sgl(struct scatterlist *sgl, int nents) > > { > > - struct scatterlist *sg; > > - int count; > > - > > - for_each_sg(sgl, sg, nents, count) > > -

Re: [PATCH] scsi: gdth: Convert timers to use timer_setup()

2017-10-17 Thread Kees Cook
On Mon, Oct 16, 2017 at 9:09 PM, Martin K. Petersen wrote: > > Kees, > >> In preparation for unconditionally passing the struct timer_list >> pointer to all timer callbacks, switch to using the new timer_setup() >> and from_timer() to pass the timer pointer explicitly.

Re: [PATCH] scsi: sg: Re-fix off by one in sg_fill_request_table()

2017-10-17 Thread Douglas Gilbert
On 2017-10-15 01:16 PM, Ben Hutchings wrote: Commit 109bade9c625 ("scsi: sg: use standard lists for sg_requests") introduced an off-by-one error in sg_ioctl(), which was fixed by commit bd46fc406b30 ("scsi: sg: off by one in sg_ioctl()"). Unfortunately commit 4759df905a47 ("scsi: sg: factor out

[GIT PULL] SCSI fixes for 4.14-rc5

2017-10-17 Thread James Bottomley
Four mostly error leg fixes and one more important regression in a prior commit (the qla2xxx one). The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short changelog is: Hannes Reinecke (1):   scsi: fixup kernel warning during rmmod()

Re: scsi: Add TRY_VPD_PAGES to HITACHI OPEN-V blacklist entry

2017-10-17 Thread Xose Vazquez Perez
On 10/17/2017 09:10 AM, Hannes Reinecke wrote: > HITACHI is always supporting VPD pages, even though it's claiming > to support SCSI Revision 3 only. "HP/OPEN-" is also affected. HP XP is a rebrand of HITACHI VSP. {"HP", "OPEN-", "*", BLIST_REPORTLUN2}, /* HP XP Arrays */ > Signed-off-by:

Re: [PATCH 0/2] block/SCSI MQ: two RESTART related patches

2017-10-17 Thread John Garry
On 17/10/2017 06:12, Ming Lei wrote: On Tue, Oct 17, 2017 at 01:04:16PM +0800, Ming Lei wrote: Hi Jens, The 1st patch runs idle hctx after dealy in scsi_mq_get_budget(), so that we can keep same behaviour with before, and it can be thought as a fix. The 2nd patch cleans up RESTART, and

Re: [PATCH v2 1/8] lib/scatterlist: Introduce sgl_alloc() and sgl_free()

2017-10-17 Thread Hannes Reinecke
On 10/17/2017 12:49 AM, Bart Van Assche wrote: > Many kernel drivers contain code that allocates and frees both a > scatterlist and the pages that populate that scatterlist. > Introduce functions in lib/scatterlist.c that perform these tasks > instead of duplicating this functionality in multiple

Re: [PATCH v2 2/8] crypto: scompress - use sgl_alloc() and sgl_free()

2017-10-17 Thread Hannes Reinecke
On 10/17/2017 12:49 AM, Bart Van Assche wrote: > Use the sgl_alloc() and sgl_free() functions instead of open coding > these functions. > > Signed-off-by: Bart Van Assche > Cc: Ard Biesheuvel > Cc: Herbert Xu > ---

Re: [PATCH v2 4/8] nvmet/rdma: Use sgl_alloc() and sgl_free()

2017-10-17 Thread Hannes Reinecke
On 10/17/2017 12:49 AM, Bart Van Assche wrote: > Use the sgl_alloc() and sgl_free() functions instead of open coding > these functions. > > Signed-off-by: Bart Van Assche > Reviewed-by: Johannes Thumshirn > Cc: Keith Busch >

Re: [PATCH v2 3/8] nvmet/fc: Use sgl_alloc() and sgl_free()

2017-10-17 Thread Hannes Reinecke
On 10/17/2017 12:49 AM, Bart Van Assche wrote: > Use the sgl_alloc() and sgl_free() functions instead of open coding > these functions. > > Signed-off-by: Bart Van Assche > Reviewed-by: Johannes Thumshirn > Cc: Keith Busch >

Re: [PATCH v2 5/8] target: Use sgl_alloc_order() and sgl_free()

2017-10-17 Thread Hannes Reinecke
On 10/17/2017 12:49 AM, Bart Van Assche wrote: > Use the sgl_alloc_order() and sgl_free() functions instead of open > coding these functions. > > Signed-off-by: Bart Van Assche > Cc: Nicholas A. Bellinger > Cc: Christoph Hellwig > Cc:

Re: [PATCH v2 6/8] scsi/ipr: Use sgl_alloc_order() and sgl_free_order()

2017-10-17 Thread Hannes Reinecke
On 10/17/2017 12:49 AM, Bart Van Assche wrote: > Use the sgl_alloc_order() and sgl_free_order() functions instead > of open coding these functions. > > Signed-off-by: Bart Van Assche > Reviewed-by: Johannes Thumshirn > Cc: linux-scsi@vger.kernel.org >

Re: [PATCH v2 7/8] scsi/pmcraid: Remove an unused structure member

2017-10-17 Thread Hannes Reinecke
On 10/17/2017 12:49 AM, Bart Van Assche wrote: > Signed-off-by: Bart Van Assche > Reviewed-by: Johannes Thumshirn > Cc: linux-scsi@vger.kernel.org > Cc: Martin K. Petersen > Cc: Anil Ravindranath

Re: [PATCH v9 02/10] md: Introduce md_stop_all_writes()

2017-10-17 Thread Hannes Reinecke
On 10/17/2017 01:28 AM, Bart Van Assche wrote: > Introduce md_stop_all_writes() because the next patch will add > a second caller for this function. This patch does not change > any functionality. > > Signed-off-by: Bart Van Assche > Reviewed-by: Johannes Thumshirn

Re: [PATCH v2 8/8] scsi/pmcraid: Use sgl_alloc_order() and sgl_free_order()

2017-10-17 Thread Hannes Reinecke
On 10/17/2017 12:49 AM, Bart Van Assche wrote: > Use the sgl_alloc_order() and sgl_free_order() functions instead > of open coding these functions. > > Signed-off-by: Bart Van Assche > Reviewed-by: Johannes Thumshirn > Cc: linux-scsi@vger.kernel.org >

Re: [PATCH v9 01/10] md: Rename md_notifier into md_reboot_notifier

2017-10-17 Thread Hannes Reinecke
On 10/17/2017 01:28 AM, Bart Van Assche wrote: > This avoids confusion with the pm notifier that will be added > through a later patch. > > Signed-off-by: Bart Van Assche > Reviewed-by: Johannes Thumshirn > Reviewed-by: Shaohua Li >

Re: [PATCH v9 03/10] md: Neither resync nor reshape while the system is frozen

2017-10-17 Thread Hannes Reinecke
On 10/17/2017 01:28 AM, Bart Van Assche wrote: > Some people use the md driver on laptops and use the suspend and > resume functionality. Since it is essential that submitting of > new I/O requests stops before a hibernation image is created, > interrupt the md resync and reshape actions if the

Re: [PATCH v9 04/10] block: Make q_usage_counter also track legacy requests

2017-10-17 Thread Hannes Reinecke
On 10/17/2017 01:28 AM, Bart Van Assche wrote: > From: Ming Lei > > This patch makes it possible to pause request allocation for > the legacy block layer by calling blk_mq_freeze_queue() and > blk_mq_unfreeze_queue(). > > Signed-off-by: Ming Lei > [

Re: [PATCH] scsi: libiscsi: Convert timers to use timer_setup()

2017-10-17 Thread Chris Leech
Reviewed-by: Chris Leech - Original Message - > In preparation for unconditionally passing the struct timer_list pointer to > all timer callbacks, switch to using the new timer_setup() and from_timer() > to pass the timer pointer explicitly. > > Cc: Lee Duncan

[PATCH V2] scsi: storvsc: Allow only one remove lun work item to be issued per lun

2017-10-17 Thread Cathy Avery
When running multipath on a VM if all available paths go down the driver can schedule large amounts of storvsc_remove_lun work items to the same lun. In response to the failing paths typically storvsc responds by taking host->scan_mutex and issuing a TUR per lun. If there has been heavy IO to the

[PATCH] scsi: storvsc: Allow only one remove lun work item to be issued per lun

2017-10-17 Thread Cathy Avery
When running multipath on a VM if all available paths go down the driver can schedule large amounts of storvsc_remove_lun work items to the same lun. In response to the failing paths typically storvsc responds by taking host->scan_mutex and issuing a TUR per lun. If there has been heavy IO to the

Re: [PATCH V7 4/6] blk-mq: introduce .get_budget and .put_budget in blk_mq_ops

2017-10-17 Thread Bart Van Assche
On 10/16/17 23:38, Hannes Reinecke wrote: Again, these are just some pre-defined values to avoid I/O starvation when having several LUNs. _if_ we can guarantee I/O fairness between several (hundreds!) devices all sharing the same tagspace we wouldn't need these variables. I think we already

Re: [PATCH v9 09/10] block, scsi: Make SCSI quiesce and resume work reliably

2017-10-17 Thread Bart Van Assche
On Tue, 2017-10-17 at 08:43 +0800, Ming Lei wrote: > On Mon, Oct 16, 2017 at 04:29:04PM -0700, Bart Van Assche wrote: > > [ ... ] > > int > > scsi_device_quiesce(struct scsi_device *sdev) > > { > > + struct request_queue *q = sdev->request_queue; > > int err; > > > > + /* > > +*

Re: [PATCH v9 09/10] block, scsi: Make SCSI quiesce and resume work reliably

2017-10-17 Thread Bart Van Assche
On Tue, 2017-10-17 at 08:33 +0200, Hannes Reinecke wrote: > How do you ensure that PREEMPT requests are not stuck in the queue > _behind_ non-PREEMPT requests? > Once they are in the queue the request are already allocated, so your > deferred allocation won't work. > _And_ deferred requests will

Re: integer overflow in aic7xxx (was [bug report] Linux-2.6.12-rc2)

2017-10-17 Thread Dan Carpenter
Argh... My script chose a stupid subject. Sorry for not catching that. regards, dan carpenter On Wed, Oct 18, 2017 at 12:52:49AM +0300, Dan Carpenter wrote: > Hey, > > This code is older than git is so it probably doesn't matter. But just > for laughs does anyone know what this should be? >

Re: [PATCH] sd: Micro-optimize READ / WRITE CDB encoding

2017-10-17 Thread Bart Van Assche
On Tue, 2017-10-17 at 18:17 -0400, Douglas Gilbert wrote: > On 2017-10-17 05:03 PM, Bart Van Assche wrote: > > @@ -1025,7 +1025,6 @@ static int sd_setup_read_write_cmnd(struct scsi_cmnd > > *SCpnt) > > struct gendisk *disk = rq->rq_disk; > > struct scsi_disk *sdkp = scsi_disk(disk); > >

[bug report] Linux-2.6.12-rc2

2017-10-17 Thread Dan Carpenter
Hey, This code is older than git is so it probably doesn't matter. But just for laughs does anyone know what this should be? drivers/scsi/aic7xxx/aic7xxx_core.c:4807 ahc_init_scbdata() warn: integer overflow (literal): u32max + 1 drivers/scsi/aic7xxx/aic7xxx_core.c 4794

Re: [PATCH] sd: Micro-optimize READ / WRITE CDB encoding

2017-10-17 Thread Douglas Gilbert
On 2017-10-17 05:03 PM, Bart Van Assche wrote: Only compute 'threshold' if .last_sector_bug has been set. Reduce the number of branches that has to be taken to check the starting LBA and transfer length alignment. Optimize the encoding of the READ(10), WRITE(10), READ(16), WRITE(16), READ(32)

[PATCH v10 09/10] block, scsi: Make SCSI quiesce and resume work reliably

2017-10-17 Thread Bart Van Assche
The contexts from which a SCSI device can be quiesced or resumed are: * Writing into /sys/class/scsi_device/*/device/state. * SCSI parallel (SPI) domain validation. * The SCSI device power management methods. See also scsi_bus_pm_ops. It is essential during suspend and resume that neither the

[PATCH v10 04/10] block: Make q_usage_counter also track legacy requests

2017-10-17 Thread Bart Van Assche
From: Ming Lei This patch makes it possible to pause request allocation for the legacy block layer by calling blk_mq_freeze_queue() and blk_mq_unfreeze_queue(). Signed-off-by: Ming Lei [ bvanassche: Combined two patches into one, edited a comment and

[PATCH v10 00/10] block, scsi, md: Improve suspend and resume

2017-10-17 Thread Bart Van Assche
Hello Jens, It is known that during the resume following a hibernate, especially when using an md RAID1 array created on top of SCSI devices, sometimes the system hangs instead of coming up properly. This patch series fixes that problem. These patches have been tested on top of the block layer

[PATCH v10 03/10] md: Neither resync nor reshape while the system is frozen

2017-10-17 Thread Bart Van Assche
Some people use the md driver on laptops and use the suspend and resume functionality. Since it is essential that submitting of new I/O requests stops before a hibernation image is created, interrupt the md resync and reshape actions if the system is being frozen. Note: the resync and reshape will

Re: [PATCH v4 2/5] dt-bindings: scsi: ufs: add document for hisi-ufs

2017-10-17 Thread Rob Herring
On Fri, Oct 13, 2017 at 03:49:33PM +0800, Li Wei wrote: > add ufs node document for Hisilicon. > > Signed-off-by: Li Wei > --- > Documentation/devicetree/bindings/ufs/ufs-hisi.txt | 47 > ++ > 1 file changed, 47 insertions(+) > create mode 100644

[PATCH] sd: Micro-optimize READ / WRITE CDB encoding

2017-10-17 Thread Bart Van Assche
Only compute 'threshold' if .last_sector_bug has been set. Reduce the number of branches that has to be taken to check the starting LBA and transfer length alignment. Optimize the encoding of the READ(10), WRITE(10), READ(16), WRITE(16), READ(32) and WRITE(32) CDB encoding. Signed-off-by: Bart

[PATCH v10 05/10] block: Introduce blk_get_request_flags()

2017-10-17 Thread Bart Van Assche
A side effect of this patch is that the GFP mask that is passed to several allocation functions in the legacy block layer is changed from GFP_KERNEL into __GFP_DIRECT_RECLAIM. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Tested-by: Martin

[PATCH v10 10/10] block, nvme: Introduce blk_mq_req_flags_t

2017-10-17 Thread Bart Van Assche
Several block layer and NVMe core functions accept a combination of BLK_MQ_REQ_* flags through the 'flags' argument but there is no verification at compile time whether the right type of block layer flags is passed. Make it possible for sparse to verify this. This patch does not change any

Re: [PATCH v10 00/10] block, scsi, md: Improve suspend and resume

2017-10-17 Thread Bart Van Assche
On Tue, 2017-10-17 at 17:28 -0600, Jens Axboe wrote: > On 10/17/2017 05:26 PM, Bart Van Assche wrote: > > It is known that during the resume following a hibernate, especially when > > using an md RAID1 array created on top of SCSI devices, sometimes the system > > hangs instead of coming up

[PATCH v10 06/10] block: Introduce BLK_MQ_REQ_PREEMPT

2017-10-17 Thread Bart Van Assche
Set RQF_PREEMPT if BLK_MQ_REQ_PREEMPT is passed to blk_get_request_flags(). Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Tested-by: Martin Steigerwald Cc: Christoph Hellwig Cc: Ming Lei

[PATCH v10 07/10] ide, scsi: Tell the block layer at request allocation time about preempt requests

2017-10-17 Thread Bart Van Assche
Convert blk_get_request(q, op, __GFP_RECLAIM) into blk_get_request_flags(q, op, BLK_MQ_PREEMPT). This patch does not change any functionality. Signed-off-by: Bart Van Assche Tested-by: Martin Steigerwald Acked-by: David S. Miller

[PATCH v10 01/10] md: Rename md_notifier into md_reboot_notifier

2017-10-17 Thread Bart Van Assche
This avoids confusion with the pm notifier that will be added through a later patch. Signed-off-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Reviewed-by: Shaohua Li Reviewed-by: Hannes Reinecke Tested-by:

[PATCH v10 08/10] block: Add the QUEUE_FLAG_PREEMPT_ONLY request queue flag

2017-10-17 Thread Bart Van Assche
This flag will be used in the next patch to let the block layer core know whether or not a SCSI request queue has been quiesced. A quiesced SCSI queue namely only processes RQF_PREEMPT requests. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke

Re: [PATCH V8 5/5] libata: Align DMA buffer todma_get_cache_alignment()

2017-10-17 Thread 陈华才
Hi, Sergei, Without this patch, in non-coherent mode, ata_do_set_mode() return with "no PIO support", and disk detection fails. Huacai -- Original -- From: "Sergei Shtylyov"; Date: Tue, Oct 17, 2017 05:43 PM To: "Huacai

[PATCH v10 02/10] md: Introduce md_stop_all_writes()

2017-10-17 Thread Bart Van Assche
Introduce md_stop_all_writes() because the next patch will add a second caller for this function. This patch does not change any functionality. Signed-off-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Reviewed-by: Shaohua Li

Re: [PATCH v10 00/10] block, scsi, md: Improve suspend and resume

2017-10-17 Thread Jens Axboe
On 10/17/2017 05:26 PM, Bart Van Assche wrote: > Hello Jens, > > It is known that during the resume following a hibernate, especially when > using an md RAID1 array created on top of SCSI devices, sometimes the system > hangs instead of coming up properly. This patch series fixes that > problem.

Re: [PATCH V8 4/5] libsas: Align SMP req/resp todma_get_cache_alignment()

2017-10-17 Thread 陈华才
Hi, Marek, Yes, I know in include/linux/slab.h, there is #define KMALLOC_MIN_SIZE ARCH_DMA_MINALIGN But I observed that the req/resp isn't aligned to ARCH_DMA_MINALIGN and I don't know why. Problems I experienced is: In non-coherent mode, mvsas with an expander cannot detect any disks.

Re: [PATCH 0/2] block/SCSI MQ: two RESTART related patches

2017-10-17 Thread Ming Lei
On Tue, Oct 17, 2017 at 04:47:23PM +0100, John Garry wrote: > On 17/10/2017 06:12, Ming Lei wrote: > > On Tue, Oct 17, 2017 at 01:04:16PM +0800, Ming Lei wrote: > > > Hi Jens, > > > > > > The 1st patch runs idle hctx after dealy in scsi_mq_get_budget(), > > > so that we can keep same behaviour

Re: [PATCH v10 00/10] block, scsi, md: Improve suspend and resume

2017-10-17 Thread Jens Axboe
On 10/17/2017 05:40 PM, Bart Van Assche wrote: > On Tue, 2017-10-17 at 17:28 -0600, Jens Axboe wrote: >> On 10/17/2017 05:26 PM, Bart Van Assche wrote: >>> It is known that during the resume following a hibernate, especially when >>> using an md RAID1 array created on top of SCSI devices,

Re: [PATCH] scsi: sg: Re-fix off by one in sg_fill_request_table()

2017-10-17 Thread Martin K. Petersen
Ben, > Commit 109bade9c625 ("scsi: sg: use standard lists for sg_requests") > introduced an off-by-one error in sg_ioctl(), which was fixed by > commit bd46fc406b30 ("scsi: sg: off by one in sg_ioctl()"). > > Unfortunately commit 4759df905a47 ("scsi: sg: factor out > sg_fill_request_table()")

Re: [PATCH] scsi: Add 'AIX VDASD' to blacklist

2017-10-17 Thread Martin K. Petersen
Hannes, > The AIX VDASD devices do support VPD pages, but implement only SPC. So > set BLIST_TRY_VPD_PAGS to correctly display the VPD information in > sysfs. Applied to 4.15/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: Add TRY_VPD_PAGES to HITACHI OPEN-V blacklist entry

2017-10-17 Thread Martin K. Petersen
Hannes, > HITACHI is always supporting VPD pages, even though it's claiming to > support SCSI Revision 3 only. Applied to 4.15/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: Do not retry invalid function error

2017-10-17 Thread Martin K. Petersen
Hannes, > Hitachi USP-V returns 'Invalid function' when the internal staging > mechanism encountered an error. These errors should not be retried on > another path. s/invalid/illegal/ Applied to 4.15/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: Add REPORTLUN2 to EMC SYMMETRIX blacklist entry

2017-10-17 Thread Martin K. Petersen
Hannes, > All EMC SYMMETRIX support REPORT_LUNS, even if configured to report > SCSI-2 for whatever reason. Applied to 4.15/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] sd: Micro-optimize READ / WRITE CDB encoding

2017-10-17 Thread Martin K. Petersen
Bart, > Only compute 'threshold' if .last_sector_bug has been set. Reduce > the number of branches that has to be taken to check the starting > LBA and transfer length alignment. Optimize the encoding of the > READ(10), WRITE(10), READ(16), WRITE(16), READ(32) and WRITE(32) > CDB encoding.

Re: [PATCH] scsi: gdth: Convert timers to use timer_setup()

2017-10-17 Thread Kees Cook
On Tue, Oct 17, 2017 at 8:06 PM, Martin K. Petersen wrote: > > Kees, > >> Thanks for the reviews! Do you want the timer tree to carry these >> patches, or can you pick them up in the scsi tree? > > Up to you. I'm not going to rebase my 4.15 queue this late in the cycle

Re: [PATCH 1/1] qla2xxx: Initialize Work element before requesting IRQs

2017-10-17 Thread Bart Van Assche
On Mon, 2017-10-16 at 11:26 -0700, Madhani, Himanshu wrote: > diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c > index 937209805baf..3bd956d3bc5d 100644 > --- a/drivers/scsi/qla2xxx/qla_os.c > +++ b/drivers/scsi/qla2xxx/qla_os.c > @@ -3061,6 +3061,8 @@

Re: [PATCH v10 00/10] block, scsi, md: Improve suspend and resume

2017-10-17 Thread Oleksandr Natalenko
I've indeed tested some previous versions of this patchset, but still use Ming's solution. Can it be clarified which one (Bart's or Ming's) is a correct approach? On středa 18. října 2017 1:28:14 CEST Jens Axboe wrote: > On 10/17/2017 05:26 PM, Bart Van Assche wrote: > > Hello Jens, > > > > It

Re: [PATCH] scsi: Always retry internal target error

2017-10-17 Thread Martin K. Petersen
Hannes, > + if (!strncmp(scmd->device->vendor, "EMC", 3) && > + !strncmp(scmd->device->model, "SYMMETRIX", 9) && > + (sshdr.asc == 0x44) && (sshdr.ascq == 0x0)) { > + /* > + * EMC Symmetrix returns 'Internal

Re: [PATCH] scsi: gdth: Convert timers to use timer_setup()

2017-10-17 Thread Martin K. Petersen
Kees, > Thanks for the reviews! Do you want the timer tree to carry these > patches, or can you pick them up in the scsi tree? Up to you. I'm not going to rebase my 4.15 queue this late in the cycle so the patches would end up going in at the end of the merge window. If you prefer to have them

[Bug 195285] qla2xxx FW immediatly crashing after target start

2017-10-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=195285 --- Comment #14 from himanshu.madh...@cavium.com --- I am OOO. I will respond to your message when i am back at work. Thanks, Himanshu -- You are receiving this mail because: You are watching the assignee of the bug.

[Bug 195285] qla2xxx FW immediatly crashing after target start

2017-10-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=195285 Anthony (anthony.blood...@gmail.com) changed: What|Removed |Added Status|NEW |RESOLVED

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

2017-10-17 Thread Hannes Reinecke
On 10/17/2017 03:57 PM, James Bottomley wrote: > On Tue, 2017-10-17 at 09:11 +0200, Hannes Reinecke wrote: >> During ALUA state transitions the device might return >> a sense code 02/04/0a (Logical unit not accessible, asymmetric >> access state transition). As this is a transient error >> we

Re: [PATCH v9 09/10] block, scsi: Make SCSI quiesce and resume work reliably

2017-10-17 Thread Hannes Reinecke
On 10/17/2017 10:18 PM, Bart Van Assche wrote: > On Tue, 2017-10-17 at 08:33 +0200, Hannes Reinecke wrote: >> How do you ensure that PREEMPT requests are not stuck in the queue >> _behind_ non-PREEMPT requests? >> Once they are in the queue the request are already allocated, so your >> deferred

  1   2   >