RE: [PATCH] storvsc: Avoid excessive host scan on controller change

2017-11-06 Thread Long Li
> From: Martin K. Petersen [mailto:martin.peter...@oracle.com] > Sent: Monday, November 6, 2017 7:40 PM > To: Long Li > Cc: KY Srinivasan ; Haiyang Zhang > ; Stephen Hemminger > ; James E . J . Bottomley > ; Martin K . Petersen > ; de...@linuxdriverproject.org; linux- > s...@vger.kernel.org; linux

Re: [ata_scsi_offline_dev] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:238

2017-11-06 Thread Hannes Reinecke
On 11/07/2017 12:12 AM, Linus Torvalds wrote: > On Mon, Nov 6, 2017 at 2:53 PM, Fengguang Wu wrote: >> >> The same dmesg happen to contain another libata related bug. Attached again. >> It's rare and in the error handling path, so unlikely a new regression. >> >> [ 49.608280] BUG: sleeping funct

Re: [PATCH 0/4] scsi: qla2xxx: Convert timers to use timer_setup()

2017-11-06 Thread Bart Van Assche
On Mon, 2017-11-06 at 19:58 +, Madhani, Himanshu wrote: > On Nov 5, 2017, at 4:18 PM, Bart Van Assche wrote: > > The qla2xxx driver does not crash if apply these four patches on kernel > > v4.14-rc8 and load the qla2xxx driver on my test setup. Point-to-point > > mode seems broken again but I

Re: [PATCH] qla2xxx: Suppress a kernel complaint in qla_init_base_qpair()

2017-11-06 Thread Martin K. Petersen
Bart, > Avoid that the following is reported while loading the qla2xxx > kernel module: Applied to 4.15/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] mpt3sas: fix dma_addr_t casts

2017-11-06 Thread Martin K. Petersen
Arnd, > After taking a closer look, I found that the problem is that the new > code mixes up pointers and dma_addr_t values unnecessarily. > > This changes it to use the correct types consistently, which lets us > get rid of a lot of type casts in the process. I'm also renaming some > variables t

Re: [PATCH v2] scsi: be2iscsi: Use kasprintf

2017-11-06 Thread Martin K. Petersen
Jitendra, >> Use kasprintf instead of combination of kmalloc and sprintf. >> Also, remove BEISCSI_MSI_NAME macro used to specify size of string as >> kasprintf handles size computations. >> >> Signed-off-by: Himanshu Jha > Reviewed-by: Jitendra Bhivare Applied to 4.15/scsi-queue. -- Martin

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-06 Thread Martin K. Petersen
Ming, >> Since this is a SCSI patch the SCSI maintainer, Martin Petersen, >> should have been Cc-ed for this patch. Additionally, I think that >> this patch should not have been queued by Jens before Martin had >> approved this patch. > > This patch has been CCed to SCSI list. I don't need a per

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

2017-11-06 Thread Martin K. Petersen
Bart, > Use the sgl_alloc_order() and sgl_free_order() functions instead of > open coding these functions. I'll merge patches 6-8 once the plumbing goes in. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] storvsc: Avoid excessive host scan on controller change

2017-11-06 Thread Martin K. Petersen
Long, > When there are multiple disks attached to the same SCSI controller, > the host may send several VSTOR_OPERATION_REMOVE_DEVICE or > VSTOR_OPERATION_ENUMERATE_BUS messages in a row, to indicate there is > a change on the SCSI controller. In response, storvsc rescans the SCSI > host. Applie

Re: [ata_scsi_offline_dev] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:238

2017-11-06 Thread Martin K. Petersen
Linus, > But it does seem to be a new regression in 4.14, caused by commit > 8a97712e5314 ("scsi: make 'state' device attribute pollable"), because > that's what added the sysfs_notify() call to scsi_device_set_state(), > which made that spinlock be a problem. > > That commit came in through the

Re: [PATCH] blk-mq: Revert multiple recent patches

2017-11-06 Thread Ming Lei
On Mon, Nov 06, 2017 at 05:07:31PM -0800, Bart Van Assche wrote: > Since we are close to the merge window and since it is too late for > reworking patches and algorithms that have turned out to be flawed, > revert multiple recent patches. Revert patch "blk-mq: don't handle > TAG_SHARED in restart"

Re: [PATCH] blk-mq: Revert multiple recent patches

2017-11-06 Thread Ming Lei
On Tue, Nov 07, 2017 at 10:29:38AM +0800, Ming Lei wrote: > On Mon, Nov 06, 2017 at 05:07:31PM -0800, Bart Van Assche wrote: > > Since we are close to the merge window and since it is too late for > > reworking patches and algorithms that have turned out to be flawed, > > revert multiple recent pat

Re: [PATCH] blk-mq: Revert multiple recent patches

2017-11-06 Thread Ming Lei
On Mon, Nov 06, 2017 at 05:07:31PM -0800, Bart Van Assche wrote: > Since we are close to the merge window and since it is too late for > reworking patches and algorithms that have turned out to be flawed, > revert multiple recent patches. Revert patch "blk-mq: don't handle > TAG_SHARED in restart"

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-06 Thread Ming Lei
On Mon, Nov 06, 2017 at 06:04:42PM +, Bart Van Assche wrote: > On Sat, 2017-11-04 at 09:55 +0800, Ming Lei wrote: > > It is very expensive to atomic_inc/atomic_dec the host wide counter of > > host->busy_count, and it should have been avoided via blk-mq's mechanism > > of getting driver tag, wh

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-06 Thread Ming Lei
On Mon, Nov 06, 2017 at 07:45:23PM +, Bart Van Assche wrote: > On Sat, 2017-11-04 at 08:19 -0600, Jens Axboe wrote: > > On 11/03/2017 07:55 PM, Ming Lei wrote: > > > It is very expensive to atomic_inc/atomic_dec the host wide counter of > > > host->busy_count, and it should have been avoided vi

[PATCH] blk-mq: Revert multiple recent patches

2017-11-06 Thread Bart Van Assche
Since we are close to the merge window and since it is too late for reworking patches and algorithms that have turned out to be flawed, revert multiple recent patches. Revert patch "blk-mq: don't handle TAG_SHARED in restart" and all patches that conflict with the revert of that patch because that

Re: [ata_scsi_offline_dev] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:238

2017-11-06 Thread Tejun Heo
Hello, On Mon, Nov 06, 2017 at 03:12:31PM -0800, Linus Torvalds wrote: > But it does seem to be a new regression in 4.14, caused by commit > 8a97712e5314 ("scsi: make 'state' device attribute pollable"), because > that's what added the sysfs_notify() call to scsi_device_set_state(), > which made t

Re: [ata_scsi_offline_dev] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:238

2017-11-06 Thread Linus Torvalds
On Mon, Nov 6, 2017 at 2:53 PM, Fengguang Wu wrote: > > The same dmesg happen to contain another libata related bug. Attached again. > It's rare and in the error handling path, so unlikely a new regression. > > [ 49.608280] BUG: sleeping function called from invalid context at > kernel/locking/

Re: iSCSI-target: Use common error handling code in iscsi_decode_text_input()

2017-11-06 Thread SF Markus Elfring
>> Add a jump target so that a bit of exception handling can be better reused >> at the end of this function. > > Why not look at what the C compiler generates before making the code > less readable ? * Does the adjusted source code layout fit to information from the section “7) Centralized exi

Re: [PATCH] qla2xxx: Suppress a kernel complaint in qla_init_base_qpair()

2017-11-06 Thread Madhani, Himanshu
> On Nov 6, 2017, at 11:59 AM, Bart Van Assche wrote: > > Avoid that the following is reported while loading the qla2xxx > kernel module: > > BUG: using smp_processor_id() in preemptible [] code: modprobe/783 > caller is debug_smp_processor_id+0x17/0x20 > CPU: 7 PID: 783 Comm: modprobe

[PATCH] qla2xxx: Suppress a kernel complaint in qla_init_base_qpair()

2017-11-06 Thread Bart Van Assche
Avoid that the following is reported while loading the qla2xxx kernel module: BUG: using smp_processor_id() in preemptible [] code: modprobe/783 caller is debug_smp_processor_id+0x17/0x20 CPU: 7 PID: 783 Comm: modprobe Not tainted 4.14.0-rc8-dbg+ #2 Hardware name: Bochs Bochs, BIOS Bochs 0

Re: [PATCH 0/4] scsi: qla2xxx: Convert timers to use timer_setup()

2017-11-06 Thread Madhani, Himanshu
Hi Bart, > On Nov 5, 2017, at 4:18 PM, Bart Van Assche wrote: > > On Wed, 2017-11-01 at 19:18 +, Madhani, Himanshu wrote: >> Hi Kees, >> >>> On Nov 1, 2017, at 11:46 AM, Kees Cook wrote: >>> >>> On Tue, Oct 31, 2017 at 12:13 PM, Kees Cook wrote: This breaks out the logical steps t

[PATCH 4/4] qla2xxx_nvmet: Add FC-NVMe Target handling

2017-11-06 Thread Himanshu Madhani
From: Anil Gurumurthy This patch Adds following code in the driver to support FC-NVMe Target - Updated ql2xenablenvme to allow FC-NVMe Target operation - Added LS Request handling for NVMe Target - Added passthr IOCB for LS4 request - Added CTIO for sending response to FW - Added FC4 Registratio

[PATCH 3/4] qla2xxx_nvmet: Add FC-NVMe Target LS request handling

2017-11-06 Thread Himanshu Madhani
From: Anil Gurumurthy Signed-off-by: Anil Gurumurthy Signed-off-by: Giridhar Malavali Signed-off-by: Darren Trapp Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_dbg.c | 1 + drivers/scsi/qla2xxx/qla_dbg.h | 2 ++ drivers/scsi/qla2xxx/qla_iocb.c | 42

[PATCH 2/4] qla2xxx_nvmet: Added Makefile and Kconfig changes

2017-11-06 Thread Himanshu Madhani
From: Anil Gurumurthy Signed-off-by: Anil Gurumurthy Signed-off-by: Giridhar Malavali Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/Kconfig | 1 + drivers/scsi/qla2xxx/Makefile | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/Kconfig b/dr

[PATCH 1/4] qla2xxx_nvmet: Add files for FC-NVMe Target support

2017-11-06 Thread Himanshu Madhani
From: Anil Gurumurthy Signed-off-by: Anil Gurumurthy Signed-off-by: Giridhar Malavali Signed-off-by: Darren Trapp Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_nvmet.c | 783 +++ drivers/scsi/qla2xxx/qla_nvmet.h | 130 +++ 2 files change

[PATCH 0/4] qla2xxx: Add FC-NVMe Target support

2017-11-06 Thread Himanshu Madhani
Hi Martin, This series adds support for FC-NVMe Target. Patch #1 addes new qla_nvmet files for FC-NVMe Target support. Patch #2 adds Kconfig and Makefile changes to prepare code compile. Patch #3 and #4 has bulk of changes to handle FC-NVMe Target LS4 processing via Purex pass through path. No

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-06 Thread Bart Van Assche
On Sat, 2017-11-04 at 08:19 -0600, Jens Axboe wrote: > On 11/03/2017 07:55 PM, Ming Lei wrote: > > It is very expensive to atomic_inc/atomic_dec the host wide counter of > > host->busy_count, and it should have been avoided via blk-mq's mechanism > > of getting driver tag, which uses the more effic

Re: [PATCH V9 2/4] MIPS: Implement dma_map_ops::get_cache_alignment()

2017-11-06 Thread Christoph Hellwig
This doesn't apply to the current dma mapping tree: http://git.infradead.org/users/hch/dma-mapping.git/shortlog/refs/heads/for-next so even if I were to get the proper ACKs it would need a resend.

Re: [PATCH V9 1/4] dma-mapping: Rework dma_get_cache_alignment()

2017-11-06 Thread Christoph Hellwig
Looks like there hasn't been much interest in reworking this to make stable backporting easier. I can apply patch 1 to the dma-mapping tree if that's still the plan, but for the other patches I'd need ACKs from the other maintainers.

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-06 Thread Bart Van Assche
On Sat, 2017-11-04 at 09:55 +0800, Ming Lei wrote: > It is very expensive to atomic_inc/atomic_dec the host wide counter of > host->busy_count, and it should have been avoided via blk-mq's mechanism > of getting driver tag, which uses the more efficient way of sbitmap queue. Did you perhaps mean t

Re: [PATCH] storvsc: Avoid excessive host scan on controller change

2017-11-06 Thread Cathy Avery
On 10/31/2017 05:58 PM, Long Li wrote: From: Long Li When there are multiple disks attached to the same SCSI controller, the host may send several VSTOR_OPERATION_REMOVE_DEVICE or VSTOR_OPERATION_ENUMERATE_BUS messages in a row, to indicate there is a change on the SCSI controller. In response,

RE: [PATCH] mpt3sas: fix dma_addr_t casts

2017-11-06 Thread Sathya Prakash Veerichetty
Acked-by: Sathya Prakash Veerichetty -Original Message- From: Arnd Bergmann [mailto:a...@arndb.de] Sent: Monday, November 6, 2017 6:35 AM To: Sathya Prakash; Chaitra P B; Suganath Prabu Subramani; James E.J. Bottomley; Martin K. Petersen Cc: Arnd Bergmann; Tomas Henzl; Sreekanth Reddy; Ha

Re: [PATCH] iSCSI-target: Use common error handling code in iscsi_decode_text_input()

2017-11-06 Thread Alan Cox
On Fri, 3 Nov 2017 22:33:08 +0100 SF Markus Elfring wrote: > From: Markus Elfring > Date: Fri, 3 Nov 2017 22:20:38 +0100 > > Add a jump target so that a bit of exception handling can be better reused > at the end of this function. Why not look at what the C compiler generates before making the

[PATCH] scsi: Remove null check before kfree

2017-11-06 Thread Himanshu Jha
Kfree on NULL pointer is a no-op and therefore checking is redundant. Done using Coccinelle. Semantic patch used : @@ expression E; @@ - if (E != NULL) { kfree(E); } + kfree(E); @@ expression E; @@ - if (E != NULL) { kfree(E); E = NULL; } + kfree(E); + E = NULL; Signed-off-by: Himanshu Jha ---

[PATCH] mpt3sas: fix dma_addr_t casts

2017-11-06 Thread Arnd Bergmann
The newly added base_make_prp_nvme function triggers a build warning on some 32-bit configurations: drivers/scsi/mpt3sas/mpt3sas_base.c: In function 'base_make_prp_nvme': drivers/scsi/mpt3sas/mpt3sas_base.c:1664:13: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cas