[PATCH] scsi: libsas: fix ata xfer length

2017-03-16 Thread John Garry
The total ata xfer length may not be calculated properly, in that we do not use the proper method to get an sg element dma length. According to the code comment, sg_dma_len() should be used after dma_map_sg() is called. This issue was found by turning on the SMMUv3 in front of the hisi_sas

Re: [PATCHv3 6/6] scsi: make asynchronous aborts mandatory

2017-03-16 Thread Hannes Reinecke
On 03/15/2017 06:55 PM, Benjamin Block wrote: > On Wed, Mar 15, 2017 at 02:54:09PM +0100, Hannes Reinecke wrote: >> On 03/14/2017 06:33 PM, Benjamin Block wrote: >>> Hello Hannes, >>> >>> On Wed, Mar 01, 2017 at 10:15:20AM +0100, Hannes Reinecke wrote: There hasn't been any reports for HBAs

Re: [PATCH v2] scsi_sysfs: fix hang when removing scsi device

2017-03-16 Thread Bart Van Assche
On Thu, 2017-03-16 at 11:02 +0200, Israel Rukshin wrote: > I tested your patches and the hang disappeared when fast_io_fail_tmo > expired. The warning from patch 1 still exist, so we need an additional > fix for that. Hello Israel, Thanks for the testing! I will leave out patch 1 for now since

Re: [patch] check length passed to SG_NEXT_CMD_LEN

2017-03-16 Thread Douglas Gilbert
On 2017-03-15 07:38 PM, Martin K. Petersen wrote: Peter Chang writes: now that i think i've got gmail not marking everything as spam... Doug? The extra sanity check can't hurt. Acked-by: Douglas Gilbert From

RE: [PATCH 08/29] drivers, md: convert mddev.active from atomic_t to refcount_t

2017-03-16 Thread Reshetova, Elena
> On Tue, 2017-03-14 at 12:29 +, Reshetova, Elena wrote: > > > Elena Reshetova writes: > > > > > > > refcount_t type and corresponding API should be > > > > used instead of atomic_t when the variable is used as > > > > a reference counter. This allows to avoid

Re: [PATCHv2 3/5] target/user: Fix possible overwrite of t_data_sg's last iov[]

2017-03-16 Thread Bryant G. Ly
On 3/8/17 2:45 AM, lixi...@cmss.chinamobile.com wrote: From: Xiubo Li If there has BIDI data, its first iov[] will overwrite the last iov[] for se_cmd->t_data_sg. To fix this, we can just increase the iov pointer, but this may introuduce a new memory leakage

Re: 4.10+ qla2xxx driver wont load for qla2xxx (ISP2532-based 8Gb) with BAR 3 error, work fine on 4.9

2017-03-16 Thread Laurence Oberman
- Original Message - > From: "Laurence Oberman" > To: "Himanshu Madhani" > Cc: "Chad Dupuis" , "Linux SCSI List" > > Sent: Tuesday, March 14, 2017 11:49:51 PM > Subject: Re: 4.10+

[Bug 194837] VM with virtio-scsi drive often crashes during boot with kernel 4.11rc1

2017-03-16 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=194837 --- Comment #14 from Thorsten Leemhuis (regressi...@leemhuis.info) --- Status update: Had a hunch and reverted the vhost/virtio changes (https://git.kernel.org/torvalds/c/54d7989f476ca57fc3c5cc71524c480ccb74c481 ) on top of master and now it's

[PATCH] sd: Ignore sync cache failures when not supported

2017-03-16 Thread Thierry Escande
From: Derek Basehore Some external hard drives don't support the sync command even though the hard drive has write cache enabled. In this case, upon suspend request, sync cache failures are ignored if the error code in the sense header is ILLEGAL_REQUEST. There's not much

Re: [PATCH v2] scsi_sysfs: fix hang when removing scsi device

2017-03-16 Thread Israel Rukshin
On 3/16/2017 5:42 PM, Bart Van Assche wrote: On Thu, 2017-03-16 at 11:02 +0200, Israel Rukshin wrote: I tested your patches and the hang disappeared when fast_io_fail_tmo expired. The warning from patch 1 still exist, so we need an additional fix for that. Hello Israel, Thanks for the

[PATCH] scsi: storvsc: remove return at end of void function

2017-03-16 Thread Miguel Bernal Marin
storvsc_on_channel_callback is a void function and the return statement at the end is not useful. Found with checkpatch. Signed-off-by: Miguel Bernal Marin --- drivers/scsi/storvsc_drv.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH] scsi: storvsc: Prefer kcalloc over kzalloc with multiply

2017-03-16 Thread Miguel Bernal Marin
Use kcalloc for allocating an array instead of kzalloc with multiply, kcalloc is the preferred API. Found with checkpatch. Signed-off-by: Miguel Bernal Marin --- drivers/scsi/storvsc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v2] scsi_sysfs: fix hang when removing scsi device

2017-03-16 Thread Israel Rukshin
Hi Bart, I tested your patches and the hang disappeared when fast_io_fail_tmo expired. The warning from patch 1 still exist, so we need an additional fix for that. Regards, Israel On 3/16/2017 1:27 AM, Bart Van Assche wrote: On Tue, 2017-03-14 at 16:23 +0200, Israel Rukshin wrote: Patch

[Bug 194837] VM with virtio-scsi drive often crashes during boot with kernel 4.11rc1

2017-03-16 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=194837 --- Comment #13 from Thorsten Leemhuis (li...@leemhuis.info) --- (In reply to Omar Sandoval from comment #11) > > If you are still seeing crashes on -rc2, could you please report it to > linux-bl...@vger.kernel.org? FWIW, these are the crashes I

Re: [PATCHv3 4/6] scsi_error: do not escalate failed EH command

2017-03-16 Thread Hannes Reinecke
On 03/16/2017 12:01 PM, Benjamin Block wrote: > On Wed, Mar 15, 2017 at 02:54:16PM +0100, Hannes Reinecke wrote: >> On 03/14/2017 06:56 PM, Benjamin Block wrote: >>> Hello Hannes, >>> >>> On Wed, Mar 01, 2017 at 10:15:18AM +0100, Hannes Reinecke wrote: When a command is sent as part of the

Re: [PATCH] enclosure: fix sysfs symlinks creation when using multipath

2017-03-16 Thread James Bottomley
On Wed, 2017-03-15 at 19:39 -0400, Martin K. Petersen wrote: > Maurizio Lombardi writes: > > > With multipath, it may happen that the same device is passed to > > enclosure_add_device() multiple times and that the > > enclosure_add_links() function fails to create the

Re: [PATCH v2] scsi_sysfs: fix hang when removing scsi device

2017-03-16 Thread Bart Van Assche
On Mon, 2017-03-13 at 14:55 -0700, James Bottomley wrote: > On Mon, 2017-03-13 at 20:33 +, Bart Van Assche wrote: > > On Mon, 2017-03-13 at 12:23 -0700, James Bottomley wrote: > > > On Mon, 2017-03-13 at 18:49 +, Bart Van Assche wrote: > > > > diff --git a/drivers/scsi/scsi.c

Re: [PATCH] [SCSI] esas2r: remove redundant NULL check on buffer

2017-03-16 Thread Bradley Grove
On 03/15/2017 12:46 PM, Colin King wrote: From: Colin Ian King buffer is a pointer to the static char array event_buffer and therefore can never be null, so the check is redundant. Remove it. Detected by CoverityScan, CID#1077556 ("Logically Dead Code")

Re: [PATCH 0/3] Unblock SCSI devices even if the LLD is being unloaded

2017-03-16 Thread James Bottomley
On Thu, 2017-03-16 at 13:56 -0700, Bart Van Assche wrote: > scsi_target_unblock() must unblock SCSI devices even if this function > is called after unloading of the LLD that created these devices has > started. This is necessary to prevent that __scsi_remove_device() > hangs on the SYNCHRONIZE

[RFC 1/2] scsi: Provide mechanism for SCSI layer to poll for LLDD.

2017-03-16 Thread Himanshu Madhani
From: Darren Trapp Signed-off-by: Darren Trapp Signed-off-by: Himanshu Madhani --- drivers/scsi/scsi_lib.c | 39 +++ include/scsi/scsi_host.h | 12 2 files changed,

[RFC 2/2] qla2xxx: Driver changes to use new poll_queue() callback

2017-03-16 Thread Himanshu Madhani
From: Darren Trapp The blk_mq layer allows polling a transport for a specific completion if the HIPRI request flag is set. This can be accomplished by using "libengine=pvsync2 –hipri" option in FIO tool. This flag then allows polling into LLDD to service specific

[RFC 0/2] scsi: Add poll_queue mechanism

2017-03-16 Thread Himanshu Madhani
Hi James/Martin, This is RFC to get comment about propose poll_queue interface in scsi layer. The blk_mq layer allows polling a transport for a specific completion if the HIPRI request flag is set. This can be accomplished by using "libengine=pvsync2 –hipri" option in FIO tool. This flag then

Re: [RFC 1/2] scsi: Provide mechanism for SCSI layer to poll for LLDD.

2017-03-16 Thread Bart Van Assche
On Thu, 2017-03-16 at 14:40 -0700, Himanshu Madhani wrote: > +static int > +scsi_poll(struct blk_mq_hw_ctx *hctx, unsigned int tag) > + > +{ > +struct Scsi_Host *shost = hctx->driver_data; > +struct request *req; > +struct scsi_cmnd *cmd; > + > +req =

Re: [RFC 1/2] scsi: Provide mechanism for SCSI layer to poll for LLDD.

2017-03-16 Thread Madhani, Himanshu
> On Mar 16, 2017, at 3:27 PM, Bart Van Assche > wrote: > > On Thu, 2017-03-16 at 14:40 -0700, Himanshu Madhani wrote: >> +static int >> +scsi_poll(struct blk_mq_hw_ctx *hctx, unsigned int tag) >> + >> +{ >> +struct Scsi_Host *shost = hctx->driver_data; >> +

[PATCH 1/3] __scsi_iterate_devices(): Make the get and put functions arguments

2017-03-16 Thread Bart Van Assche
This patch does not change any functionality. Signed-off-by: Bart Van Assche Tested-by: Israel Rukshin Cc: Max Gurtovoy Cc: Hannes Reinecke Cc: --- drivers/scsi/scsi.c| 8

[PATCH 3/3] Ensure that scsi_target_unblock() examines all devices

2017-03-16 Thread Bart Van Assche
Since scsi_target_unblock() uses starget_for_each_device(), since starget_for_each_device() uses scsi_device_get(), since scsi_device_get() fails after unloading of the LLD kernel module has been started scsi_target_unblock() may skip devices that were affected by scsi_target_block(). Ensure that

[PATCH 2/3] Introduce starget_for_all_devices() and shost_for_all_devices()

2017-03-16 Thread Bart Van Assche
This patch does not change any functionality. Signed-off-by: Bart Van Assche Tested-by: Israel Rukshin Cc: Max Gurtovoy Cc: Hannes Reinecke Cc: --- drivers/scsi/scsi.c| 52

[PATCH 0/3] Unblock SCSI devices even if the LLD is being unloaded

2017-03-16 Thread Bart Van Assche
scsi_target_unblock() must unblock SCSI devices even if this function is called after unloading of the LLD that created these devices has started. This is necessary to prevent that __scsi_remove_device() hangs on the SYNCHRONIZE CACHE command issued by the sd driver during shutdown. Bart Van

Re: [patch] check length passed to SG_NEXT_CMD_LEN

2017-03-16 Thread Martin K. Petersen
Peter Chang writes: Applied to 4.11/scsi-fixes. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [ANNOUNCE]: Broadcom (Emulex) FC Target driver - efct

2017-03-16 Thread Bart Van Assche
On Mon, 2017-02-27 at 15:28 -0800, James Smart wrote: > I'd like to announce the availability of the Broadcom (Emulex) FC Target > driver - efct. Hello James, Sorry but I have not yet had the time to do a full review. But I would like to already share the following feedback: *

Dear Friend,

2017-03-16 Thread Mr.Ghazi Ahmed
I have a business proposal in the tune of $10.2m USD for you to handle with me. I have opportunity to transfer this abandon fund to your bank account in your country which belongs to our client. I am inviting you in this transaction where this money can be shared between us at ratio of

Re: [PATCHv3 4/6] scsi_error: do not escalate failed EH command

2017-03-16 Thread Benjamin Block
On Wed, Mar 15, 2017 at 02:54:16PM +0100, Hannes Reinecke wrote: > On 03/14/2017 06:56 PM, Benjamin Block wrote: > > Hello Hannes, > > > > On Wed, Mar 01, 2017 at 10:15:18AM +0100, Hannes Reinecke wrote: > >> When a command is sent as part of the error handling there > >> is not point whatsoever

Re: [PATCHv2 5/5] target/user: Clean up tcmu_queue_cmd_ring

2017-03-16 Thread Bryant G. Ly
From: Xiubo Li Add two helpers to simplify the code, and move some code out of the cmdr spin lock to reduce the size of critical region. Signed-off-by: Xiubo Li --- drivers/target/target_core_user.c | 54

Re: [PATCH 0/3] Unblock SCSI devices even if the LLD is being unloaded

2017-03-16 Thread Bart Van Assche
On Thu, 2017-03-16 at 15:53 -0700, James Bottomley wrote: > On Thu, 2017-03-16 at 13:56 -0700, Bart Van Assche wrote: > > scsi_target_unblock() must unblock SCSI devices even if this function > > is called after unloading of the LLD that created these devices has > > started. This is necessary to

Re: [PATCH] [SCSI] esas2r: remove redundant NULL check on buffer

2017-03-16 Thread Martin K. Petersen
Colin King writes: > buffer is a pointer to the static char array event_buffer and > therefore can never be null, so the check is redundant. Remove it. Applied to 4.12/scsi-queue. Thank you! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCHv2 4/5] target/user: Fix wrongly calculating of the base_command_size

2017-03-16 Thread Xiubo Li
On 2017年03月08日 16:45, lixi...@cmss.chinamobile.com wrote: From: Xiubo Li The t_data_nents and t_bidi_data_nents are all the numbers of the segments, and we couldn't be sure the size of the data area block will equal to size of the segment. Use the actually block