Re: [PATCH v4 00/14] mpt3sas driver NVMe support:

2017-09-18 Thread Suganath Prabu Subramani
Hi Martin, On Fri, Sep 15, 2017 at 6:37 AM, Martin K. Petersen wrote: > > Suganath, > >> Is there any update on the submitted mpt3sas patches. > > We are waiting for you to report back your findings on PRP vs. SGL. We are working on this, since there is h/w

qla2xxx UBSAN warning in 4.14-rc1

2017-09-18 Thread Meelis Roos
Hello, I decided to widen the coverage of my kernel testbed and put some FC cards into servers. This one is a PCI-X QLA2340 in HP Proliant DL 380 G4 (first 64-bit generation of Proliants). I got a UBSAN warning from qla2xxx before probing for the firmware. This is reproducible with or without

Re: [PATCH V5 3/3] scsi: Align queue to ARCH_DMA_MINALIGN innon-coherent DMA mode

2017-09-18 Thread Christoph Hellwig
On Mon, Sep 18, 2017 at 03:03:30PM +0800, 陈华才 wrote: > I don't think dma_get_cache_alignment is the "absolute minimum alignment" in > all cases. At least on MIPS/Loongson, if we use I/O coherent mode (Cached DMA > mode), align block queue to 4Bytes is enough. If we align block queue to >

Re: [PATCH V2] megaraid: kmemleak: Track page allocation for fusion

2017-09-18 Thread Christoph Hellwig
Oh, I missed log_to_span. Well, in that case log_to_span is _the_ candidate for moving into a separate allocation. And in fact you're probably better off by using a sensible data structure for it, e.g. a radix tree.

RE: [PATCH V2] megaraid: kmemleak: Track page allocation for fusion

2017-09-18 Thread Shivasharan Srikanteshwara
> -Original Message- > From: Christoph Hellwig [mailto:h...@infradead.org] > Sent: Friday, September 15, 2017 11:30 PM > To: shuw...@redhat.com > Cc: kashyap.de...@broadcom.com; sumit.sax...@broadcom.com; > shivasharan.srikanteshw...@broadcom.com; j...@linux.vnet.ibm.com; >

Re: [PATCH v3 1/3] nvme_fc: create fc class and transport device

2017-09-18 Thread Christoph Hellwig
Looks ok, although I really wish we could come up with some common FC code, including making the existing FC drivers use more infrastructure from libfc.. Reviewed-by: Christoph Hellwig

Re: [PATCH 1/5] block: don't call blk_mq_delay_run_hw_queue() in case of BLK_STS_RESOURCE

2017-09-18 Thread Bart Van Assche
On Sun, 2017-09-17 at 20:40 +0800, Ming Lei wrote: > "if no request has completed before the delay has expired" can't be a > reason to rerun the queue, because the queue can still be busy. That statement of you shows that there are important aspects of the SCSI core and dm-mpath driver that you

Re: [PATCH v4 00/11] Enhance libsas hotplug feature

2017-09-18 Thread John Garry
On 06/09/2017 10:15, Jason Yan wrote: Hello all, Yijing Wang handed over this topic to me. We are working on it the last two months. We have tested the patchset for a long time. Here is the new version. Now the libsas hotplug has some issues, Dan Williams report a similar bug here before

[PATCH] fcoe-utils: Fix get_ctlr_num() for large ctlr_* indices

2017-09-18 Thread Andrey Grafin
Each creation of a FCoE device increases counter which is used as a suffix in a FCoE device name in sysfs (i.e. /sys/bus/fcoe/devices/ctlr_1). Once this counter reaches the value of two digits (10 and larger), get_ctlr_num() stopped working properly and a command like `fcoeadm -i` which depends on

Re: Another UBSAN warning from aic7xxx

2017-09-18 Thread Meelis Roos
> Despite the first one being a false positive, her I am reporting another > one, from a older dual P2 server with Adaptec aic7896/97 Ultra2 SCSI > adapter and QUANTUM VIKING II 4.5WSE HDD-s. The same happens in other machines, like IBM xSeries 305, and is still present in 2017, in 4.14-rc1.

Re: Another UBSAN warning from aic7xxx

2017-09-18 Thread Meelis Roos
> Fixing this reveals another UBSAN warning from the same driver, will fix > that too. This is the warning - devinfo->target_offset is unsigned but ahc_reset_channel() calls it with signed -1 for the parameter. The patch below silences it but is it a good way? [0.394215]

[PATCH V5 0/10] block/scsi: safe SCSI quiescing

2017-09-18 Thread Ming Lei
Hi, The current SCSI quiesce isn't safe and easy to trigger I/O deadlock. Once SCSI device is put into QUIESCE, no new request except for RQF_PREEMPT can be dispatched to SCSI successfully, and scsi_device_quiesce() just simply waits for completion of I/Os dispatched to SCSI stack. It isn't

[PATCH V5 06/10] block: pass flags to blk_queue_enter()

2017-09-18 Thread Ming Lei
We need to pass PREEMPT flags to blk_queue_enter() for allocating request with RQF_PREEMPT in the following patch. Tested-by: Cathy Avery Tested-by: Oleksandr Natalenko Signed-off-by: Ming Lei --- block/blk-core.c | 10

[PATCH V5 05/10] block: rename .mq_freeze_wq and .mq_freeze_depth

2017-09-18 Thread Ming Lei
Both two are used for legacy and blk-mq, so rename them as .freeze_wq and .freeze_depth for avoiding to confuse people. No functional change. Tested-by: Cathy Avery Tested-by: Oleksandr Natalenko Signed-off-by: Ming Lei ---

[PATCH V5 04/10] blk-mq: rename blk_mq_freeze_queue_wait as blk_freeze_queue_wait

2017-09-18 Thread Ming Lei
The only change on legacy is that blk_drain_queue() is run from blk_freeze_queue(), which is called in blk_cleanup_queue(). So this patch removes the explicit call of __blk_drain_queue() in blk_cleanup_queue(). Tested-by: Cathy Avery Tested-by: Oleksandr Natalenko

[PATCH V5 07/10] block: introduce preempt version of blk_[freeze|unfreeze]_queue

2017-09-18 Thread Ming Lei
The two APIs are required to allow request allocation of RQF_PREEMPT when queue is preempt frozen. We have to guarantee that normal freeze and preempt freeze are run exclusive. Because for normal freezing, once blk_freeze_queue_wait() is returned, no request can enter queue any more. Another

[PATCH V5 09/10] SCSI: transport_spi: resume a quiesced device

2017-09-18 Thread Ming Lei
We have to preempt freeze queue in scsi_device_quiesce(), and unfreeze in scsi_device_resume(), so call scsi_device_resume() for the device which is quiesced by scsi_device_quiesce(). Tested-by: Cathy Avery Tested-by: Oleksandr Natalenko

[PATCH V5 03/10] blk-mq: rename blk_mq_[freeze|unfreeze]_queue

2017-09-18 Thread Ming Lei
We will support to freeze queue on block legacy path too. No functional change. Tested-by: Cathy Avery Tested-by: Oleksandr Natalenko Signed-off-by: Ming Lei --- block/bfq-iosched.c | 2 +- block/blk-cgroup.c | 8

[PATCH V5 02/10] block: tracking request allocation with q_usage_counter

2017-09-18 Thread Ming Lei
This usage is basically same with blk-mq, so that we can support to freeze legacy queue easily. Also 'wake_up_all(>mq_freeze_wq)' has to be moved into blk_set_queue_dying() since both legacy and blk-mq may wait on the wait queue of .mq_freeze_wq. Tested-by: Cathy Avery

[PATCH V5 01/10] blk-mq: only run hw queues for blk-mq

2017-09-18 Thread Ming Lei
This patch just makes it explicitely. Tested-by: Cathy Avery Tested-by: Oleksandr Natalenko Reviewed-by: Johannes Thumshirn Signed-off-by: Ming Lei --- block/blk-mq.c | 3 ++- 1 file changed, 2

[PATCH V5 10/10] SCSI: preempt freeze block queue when SCSI device is put into quiesce

2017-09-18 Thread Ming Lei
Simply quiesing SCSI device and waiting for completeion of IO dispatched to SCSI queue isn't safe, it is easy to use up request pool because all allocated requests before can't be dispatched when device is put in QIUESCE. Then no request can be allocated for RQF_PREEMPT, and system may hang

[PATCH V5 08/10] block: allow to allocate req with RQF_PREEMPT when queue is preempt frozen

2017-09-18 Thread Ming Lei
REQF_PREEMPT is a bit special because the request is required to be dispatched to lld even when SCSI device is quiesced. So this patch introduces __blk_get_request() to allow block layer to allocate request when queue is preempt frozen, since we will preempt freeze queue before quiescing SCSI

Re: [PATCH V5 3/3] scsi: Align queue to ARCH_DMA_MINALIGN innon-coherent DMA mode

2017-09-18 Thread 陈华才
Hi, Christoph, I don't think dma_get_cache_alignment is the "absolute minimum alignment" in all cases. At least on MIPS/Loongson, if we use I/O coherent mode (Cached DMA mode), align block queue to 4Bytes is enough. If we align block queue to dma_get_cache_alignment in I/O coherent mode,

Re: [PATCH 1/5] block: don't call blk_mq_delay_run_hw_queue() in case of BLK_STS_RESOURCE

2017-09-18 Thread Ming Lei
On Mon, Sep 18, 2017 at 03:18:16PM +, Bart Van Assche wrote: > On Sun, 2017-09-17 at 20:40 +0800, Ming Lei wrote: > > "if no request has completed before the delay has expired" can't be a > > reason to rerun the queue, because the queue can still be busy. > > That statement of you shows that