Re: [PATCH] xen/scsifront: use offset_in_page() macro

2017-04-24 Thread Juergen Gross
On 25/04/17 00:15, Martin K. Petersen wrote: > > Juergen, > >> On 22/04/17 03:21, Geliang Tang wrote: >>> Use offset_in_page() macro instead of open-coding. >>> >>> Signed-off-by: Geliang Tang >> >> Reviewed-by: Juergen Gross > > Taking this through the

Re: [PATCH] nvme/scsi: Consider LBA format in IO splitting calculation

2017-04-24 Thread Damien Le Moal
Jens, On 4/25/17 13:32, Jens Axboe wrote: >> I just realized that this macro is defined in linux/device-mapper.h, >> which does not seem like to best place to have it. Why not blkdev.h ? >> Any particular reason ? This leads to some strange include dependencies, >> like many nfs/blocklayout/

Re: [PATCH] nvme/scsi: Consider LBA format in IO splitting calculation

2017-04-24 Thread Jens Axboe
On 04/24/2017 09:27 PM, Damien Le Moal wrote: > Jon, > > On 4/25/17 13:00, Jens Axboe wrote: >> On Mon, Apr 24 2017, Jon Derrick wrote: >>> The current command submission code uses a sector-based value when >>> considering the maximum number of blocks per command. With a >>> 4k-formatted

Re: [PATCH] nvme/scsi: Consider LBA format in IO splitting calculation

2017-04-24 Thread Damien Le Moal
Jon, On 4/25/17 13:00, Jens Axboe wrote: > On Mon, Apr 24 2017, Jon Derrick wrote: >> The current command submission code uses a sector-based value when >> considering the maximum number of blocks per command. With a >> 4k-formatted namespace and a command exceeding max hardware limits, this >>

Re: [PATCH] nvme/scsi: Consider LBA format in IO splitting calculation

2017-04-24 Thread Jens Axboe
On Mon, Apr 24 2017, Jon Derrick wrote: > The current command submission code uses a sector-based value when > considering the maximum number of blocks per command. With a > 4k-formatted namespace and a command exceeding max hardware limits, this > calculation doesn't split IOs which should be

[PATCH -next] [SCSI] mac_esp: fix to pass correct device identity to free_irq()

2017-04-24 Thread Wei Yongjun
From: Wei Yongjun free_irq() expects the same device identity that was passed to corresponding request_irq(), otherwise the IRQ is not freed. Signed-off-by: Wei Yongjun --- drivers/scsi/mac_esp.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH] scsi/mac_esp: Replace bogus memory barrier with spinlock

2017-04-24 Thread Michael Schmitz
Martin, looks good to me, so: Reviewed-By: Michael Schmitz Am 25.04.2017 um 10:29 schrieb Martin K. Petersen: > > Finn, > >> Commit da244654c66e ("[SCSI] mac_esp: fix for quadras with two esp chips") >> added mac_scsi_esp_intr() to handle the IRQ lines from a pair of

Re: [PATCH v2 3/7] sd: Cleanup sd_done sense data handling

2017-04-24 Thread Damien Le Moal
Martin, On 4/25/17 08:11, Martin K. Petersen wrote: > > Christoph, > >> Use a switch for the sense key, and remove two pointless variables >> that are only used once. > >> -if (unmap) > > The rationale behind the unmap variable was clarity and avoiding magic >

[PATCH] nvme/scsi: Consider LBA format in IO splitting calculation

2017-04-24 Thread Jon Derrick
The current command submission code uses a sector-based value when considering the maximum number of blocks per command. With a 4k-formatted namespace and a command exceeding max hardware limits, this calculation doesn't split IOs which should be split and fails in the nvme layer. This patch fixes

Re: [PATCH v4 10/10] scsi: Implement blk_mq_ops.show_rq()

2017-04-24 Thread Bart Van Assche
On Mon, 2017-04-24 at 19:33 -0400, Martin K. Petersen wrote: > > The debugfs infrastructure is already there, and it already supports > > showing requests. Bart is just exposing the SCSI information. > > That's fine. > > I was merely objecting to the fact that we already have umpteen existing >

Re: [PATCH v4 10/10] scsi: Implement blk_mq_ops.show_rq()

2017-04-24 Thread Martin K. Petersen
Omar, > The debugfs infrastructure is already there, and it already supports > showing requests. Bart is just exposing the SCSI information. That's fine. I was merely objecting to the fact that we already have umpteen existing interfaces for displaying SCSI command information. -- Martin K.

Re: [PATCH] scsi/mac_esp: Replace bogus memory barrier with spinlock

2017-04-24 Thread Martin K. Petersen
Michael, > I must have missed that one - where was it posted to? Usual bat channel: https://patchwork.kernel.org/patch/9658369/ -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi/mac_esp: Replace bogus memory barrier with spinlock

2017-04-24 Thread Michael Schmitz
Hi Martin, I must have missed that one - where was it posted to? Cheers, Michael Am 25.04.2017 um 10:29 schrieb Martin K. Petersen: > > Finn, > >> Commit da244654c66e ("[SCSI] mac_esp: fix for quadras with two esp chips") >> added mac_scsi_esp_intr() to handle the IRQ lines from a

Re: [PATCH v4 10/10] scsi: Implement blk_mq_ops.show_rq()

2017-04-24 Thread Omar Sandoval
On Mon, Apr 24, 2017 at 07:19:50PM -0400, Martin K. Petersen wrote: > > Bart, > > > SCSI tracing has to be enabled before a test is started, produces a > > huge amount of data, and deriving state information from a huge trace > > is far from easy. The information in debugfs provides an easy to

Re: [PATCH v4 10/10] scsi: Implement blk_mq_ops.show_rq()

2017-04-24 Thread Martin K. Petersen
Bart, > SCSI tracing has to be enabled before a test is started, produces a > huge amount of data, and deriving state information from a huge trace > is far from easy. The information in debugfs provides an easy to read > overview of the current state without having to analyze megabytes of >

Re: [PATCH v2 3/7] sd: Cleanup sd_done sense data handling

2017-04-24 Thread Martin K. Petersen
Christoph, > Use a switch for the sense key, and remove two pointless variables > that are only used once. > - if (unmap) The rationale behind the unmap variable was clarity and avoiding magic values. I'm OK with this, however: > + if

Re: [PATCH 1/2] scsi: ufs: use MASK_EE_STATUS

2017-04-24 Thread Martin K. Petersen
> From: Tomohiro Kusumi > > MASK_EE_STATUS added by 66ec6d59 was unused, but it seems to have been > defined to do this. > > Signed-off-by: Tomohiro Kusumi Subhash: Please review these two. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH V2] scsi: mpt3sas: remove redundant wmb

2017-04-24 Thread Martin K. Petersen
Sinan, > Due to relaxed ordering requirements on multiple architectures, > drivers are required to use wmb/rmb/mb combinations when they need to > guarantee observability between the memory and the HW. Applied to 4.12/scsi-queue, thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH v2 1/1] aacraid: pci_alloc_consistent() failures on ARM64

2017-04-24 Thread Martin K. Petersen
> There were pci_alloc_consistent() failures on ARM64 platform. > Use dma_alloc_coherent() with GFP_KERNEL flag DMA memory allocations. Somebody please review! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi/mac_esp: Replace bogus memory barrier with spinlock

2017-04-24 Thread Martin K. Petersen
Finn, > Commit da244654c66e ("[SCSI] mac_esp: fix for quadras with two esp chips") > added mac_scsi_esp_intr() to handle the IRQ lines from a pair of on-board > ESP chips (a normal shared IRQ did not work). > > Proper mutual exclusion was missing from that patch. This patch fixes > race

Re: [PATCH] mpt: Move scsi_remove_host() out of mptscsih_remove_host()

2017-04-24 Thread Martin K. Petersen
Hannes, > Commit c5ce0ab ("scsi: sas: move scsi_remove_host call...") > moved the call to scsi_remove_host() into sas_remove_host(), > but forgot to modify the mpt drivers. Applied to 4.12/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] sg: reset 'res_in_use' after unlinking reserved array

2017-04-24 Thread Martin K. Petersen
Hannes, > Once the reserved page array is unused we can reset the 'res_in_use' > state; here we can do a lazy update without holding the mutex as we > only need to check against concurrent access, not concurrent release. Applied to 4.12/scsi-queue. -- Martin K. Petersen Oracle Linux

Re: [PATCH] scsi: mvumi: remove code handling zero scsi_sg_count(scmd) case

2017-04-24 Thread Martin K. Petersen
Alexey, > As Christoph Hellwig noted, SCSI commands that transfer data > always have a SG entry. The patch removes dead code in > mvumi_make_sgl(), mvumi_complete_cmd() and mvumi_timed_out() > that handle zero scsi_sg_count(scmd) case. > > Also the patch adds pci_unmap_sg() on failure path in

Re: [PATCH] xen/scsifront: use offset_in_page() macro

2017-04-24 Thread Martin K. Petersen
Juergen, > On 22/04/17 03:21, Geliang Tang wrote: >> Use offset_in_page() macro instead of open-coding. >> >> Signed-off-by: Geliang Tang > > Reviewed-by: Juergen Gross Taking this through the Xen tree or should I queue it? -- Martin K. Petersen

Re: [PATCH] scsi: pmcraid: use normal copy_from_user

2017-04-24 Thread Martin K. Petersen
Arnd, > As pointed out by Al Viro for my previous series, the driver has no need > to call access_ok() and __copy_from_user()/__copy_to_user(). Changing > it to regular copy_from_user()/copy_to_user() simplifies the code without > any real downsides, making it less error-prone at best. > > This

Re: [PATCH 2/4] scsi: pmcraid: fix lock imbalance in pmcraid_reset_reload()

2017-04-24 Thread Martin K. Petersen
Christoph, > sparse found a bug that has always been present since the driver was > merged: > > drivers/scsi/pmcraid.c:2353:12: warning: context imbalance in > 'pmcraid_reset_reload' - different lock contexts for basic block > > Fix this by using a common unlock goto label, and also reduce the

Re: [PATCH v4 10/10] scsi: Implement blk_mq_ops.show_rq()

2017-04-24 Thread Bart Van Assche
On Mon, 2017-04-24 at 17:35 -0400, Martin K. Petersen wrote: > > Show the SCSI CDB, .eh_eflags and .result for pending SCSI commands > > in /sys/kernel/debug/block/*/mq/*/dispatch and */rq_list. > > Why not use SCSI tracing if you are interested in these? Hello Martin, SCSI tracing has to be

Re: [PATCH v3 3/4] sd: Make synchronize cache upon shutdown asynchronous

2017-04-24 Thread Bart Van Assche
On Sun, 2017-04-23 at 12:28 -0500, James Bottomley wrote: > --- a/drivers/scsi/scsi_lib.c > +++ b/drivers/scsi/scsi_lib.c > @@ -1250,6 +1250,12 @@ scsi_prep_state_check(struct scsi_device *sdev, struct > request *req) > break; > case SDEV_BLOCK: >

Re: [PATCH v4 10/10] scsi: Implement blk_mq_ops.show_rq()

2017-04-24 Thread Martin K. Petersen
Bart, > Show the SCSI CDB, .eh_eflags and .result for pending SCSI commands > in /sys/kernel/debug/block/*/mq/*/dispatch and */rq_list. Why not use SCSI tracing if you are interested in these? -- Martin K. Petersen Oracle Linux Engineering

EXTREMELY IMPORTANT

2017-04-24 Thread Ms. Katherine
Dear Beloved, Sorry for the inconvenience, I am getting in touch with you regarding an extremely important and urgent matter, Please I need your urgent assistance and idea to finish up a project (Orphanage Home) Due to my health condition, Everything is available to finish up the project, All I

[PATCH] scsi: fcoe: make fcoe_e_d_tov and fcoe_r_a_tov static

2017-04-24 Thread Colin King
From: Colin Ian King These module parameter variables don't need global scope, make them static Signed-off-by: Colin Ian King --- drivers/scsi/fcoe/fcoe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [RFC 0/8] Copy Offload with Peer-to-Peer PCI Memory

2017-04-24 Thread Logan Gunthorpe
On 24/04/17 01:36 AM, Knut Omang wrote: > My first reflex when reading this thread was to think that this whole domain > lends it self excellently to testing via Qemu. Could it be that doing this in > the opposite direction might be a safer approach in the long run even though > (significant)

Re: [PATCH] lpfc: Fix panic on BFS configuration.

2017-04-24 Thread James Smart
Please disregard this patch. there is an issue in the fix -- james On 4/21/2017 5:24 PM, jsmart2...@gmail.com wrote: From: James Smart To select the appropriate shost template, the driver is issuing a mailbox command to retrieve the wwn. Turns out the sending of the

Re: [PATCH v2 7/7] sd_zbc: Do not write lock zones for reset

2017-04-24 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [PATCH v2 5/7] sd_zbc: Rename sd_zbc_setup_write_cmnd

2017-04-24 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [PATCH v2 6/7] sd_zbc: Remove superfluous assignments

2017-04-24 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [PATCH v2 4/7] scsi: Improve scsi_get_sense_info_fld

2017-04-24 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [PATCH v2 3/7] sd: Cleanup sd_done sense data handling

2017-04-24 Thread Christoph Hellwig
I would just use a switch and kill the op and unmap variables entirely, e.g. something like the patch below: --- From: Christoph Hellwig Subject: sd: Cleanup sd_done sense data handling Use a switch for the sense key, and remove two pointless variables that are only used once.

Re: [PATCH v2 2/7] sd: Improve sd_completed_bytes

2017-04-24 Thread Christoph Hellwig
On Mon, Apr 24, 2017 at 04:51:10PM +0900, damien.lem...@wdc.com wrote: > From: Damien Le Moal > > Re-shuffle the code to be more efficient by not initializing > variables upfront (i.e. do it only when necessary). > Also replace the do_div calls with calls to

Re: [PATCH v2 1/7] sd: Fix functions description

2017-04-24 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH] sg: reset 'res_in_use' after unlinking reserved array

2017-04-24 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [PATCH] mpt: Move scsi_remove_host() out of mptscsih_remove_host()

2017-04-24 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [RFC] scsi: reduce protection of scan_mutex in scsi_remove_device

2017-04-24 Thread Christoph Hellwig
On Fri, Apr 21, 2017 at 02:13:02PM -0700, Song Liu wrote: > When a device is deleted through sysfs handle "delete", the code > locks shost->scan_mutex. If multiple devices are deleted at the > same time, these deletes will be handled in series. > > On the other hand, some devices do long latency

[GIT PULL] SCSI fixes for 4.11-rc8

2017-04-24 Thread James Bottomley
Our final fix before the 4.12 release (hopefully). It's an error leg again: the fix to not bug on empty DMA transfers is returning the wrong code and confusing the block layer. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short

Re: [PATCH] scsi: sas: move scsi_remove_host call into sas_remove_host

2017-04-24 Thread Johannes Thumshirn
On Mon, Apr 24, 2017 at 02:38:40PM +0100, John Garry wrote: > On 24/04/2017 11:09, John Garry wrote: > >On 21/04/2017 13:11, Johannes Thumshirn wrote: > >>Move scsi_remove_host call into sas_remove_host and remove it from SAS > >>HBA > >>drivers, so we don't mess up the ordering. This solves an

Re: [PATCH] scsi: sas: move scsi_remove_host call into sas_remove_host

2017-04-24 Thread John Garry
On 24/04/2017 11:09, John Garry wrote: On 21/04/2017 13:11, Johannes Thumshirn wrote: Move scsi_remove_host call into sas_remove_host and remove it from SAS HBA drivers, so we don't mess up the ordering. This solves an issue with double deleting sysfs entries that was introduced by the change

Re: [PATCHv6 8/8] scsi: inline command aborts

2017-04-24 Thread Hannes Reinecke
On 04/20/2017 04:14 AM, Martin K. Petersen wrote: > Bart Van Assche writes: > >> On Thu, 2017-04-06 at 15:36 +0200, Hannes Reinecke wrote: >>> The block layer always calls the timeout function from a workqueue >>> context, so there is no need to have yet another

Re: [PATCH] scsi: sas: move scsi_remove_host call into sas_remove_host

2017-04-24 Thread John Garry
On 21/04/2017 13:11, Johannes Thumshirn wrote: Move scsi_remove_host call into sas_remove_host and remove it from SAS HBA drivers, so we don't mess up the ordering. This solves an issue with double deleting sysfs entries that was introduced by the change of sysfs behaviour from commit bcdde7e

[PATCH] mpt: Move scsi_remove_host() out of mptscsih_remove_host()

2017-04-24 Thread Hannes Reinecke
Commit c5ce0ab ("scsi: sas: move scsi_remove_host call...") moved the call to scsi_remove_host() into sas_remove_host(), but forgot to modify the mpt drivers. Fixes: c5ce0ab ("scsi: sas: move scsi_remove_host call into sas_remove_host") Signed-off-by: Hannes Reinecke ---

Re: [PATCH] scsi: sas: move scsi_remove_host call into sas_remove_host

2017-04-24 Thread Hannes Reinecke
On 04/21/2017 02:11 PM, Johannes Thumshirn wrote: > Move scsi_remove_host call into sas_remove_host and remove it from SAS HBA > drivers, so we don't mess up the ordering. This solves an issue with double > deleting sysfs entries that was introduced by the change of sysfs behaviour > from commit

Re: [PATCH] sg: reset 'res_in_use' after unlinking reserved array

2017-04-24 Thread Johannes Thumshirn
On Mon, Apr 24, 2017 at 10:26:36AM +0200, Hannes Reinecke wrote: > Once the reserved page array is unused we can reset the > 'res_in_use' state; here we can do a lazy update without > holding the mutex as we only need to check against > concurrent access, not concurrent release. > > Fixes:

[PATCH] sg: reset 'res_in_use' after unlinking reserved array

2017-04-24 Thread Hannes Reinecke
Once the reserved page array is unused we can reset the 'res_in_use' state; here we can do a lazy update without holding the mutex as we only need to check against concurrent access, not concurrent release. Fixes: 1bc0eb0 ("scsi: sg: protect accesses to 'reserved' page array") Signed-off-by:

[PATCH v2 6/7] sd_zbc: Remove superfluous assignments

2017-04-24 Thread damien . lemoal
From: Bart Van Assche A value is assigned to the variable 'capacity' in sd_zbc_read_zones() but that value is never used. Hence remove the variable 'capacity'. [Damien: There is no need to initialize to 0 the variable 'ret' in sd_zbc_read_zones()] Signed-off-by:

[PATCH v2 7/7] sd_zbc: Do not write lock zones for reset

2017-04-24 Thread damien . lemoal
From: Damien Le Moal Resetting a zone write pointer is equivalent to discarding sectors: after a reset, the zone sectors will contain zeros (or the format pattern). So there is no need for mutual exclusion between a zone reset and write. Similarly to discard, make it the

[PATCH v2 5/7] sd_zbc: Rename sd_zbc_setup_write_cmnd

2017-04-24 Thread damien . lemoal
From: Damien Le Moal Rename sd_zbc_setup_write_cmnd() to sd_zbc_write_lock_zone() to be clear about what the function actually does. To be consistent, also rename sd_zbc_cancel_write_cmnd() to sd_zbc_write_unlock_zone(). No functional change is introduced by this patch.

[PATCH v2 3/7] sd: Cleanup sd_done sense data handling

2017-04-24 Thread damien . lemoal
From: Damien Le Moal In sd_done(), for the ILLEGAL REQUEST sense key case, add an 'else if' after the first 'if (sshdr.asc == 0x10)' test to avoid the second test (the values tested are different). Still for the same ILLEGAL REQUEST case, move the declarations of the

[PATCH v2 2/7] sd: Improve sd_completed_bytes

2017-04-24 Thread damien . lemoal
From: Damien Le Moal Re-shuffle the code to be more efficient by not initializing variables upfront (i.e. do it only when necessary). Also replace the do_div calls with calls to sectors_to_logical(). No functional change is introduced by this patch. Signed-off-by: Damien

[PATCH v2 1/7] sd: Fix functions description

2017-04-24 Thread damien . lemoal
From: Damien Le Moal Fix argument names and description of functions documentation comments. No functional change is introduced by this patch. Signed-off-by: Damien Le Moal --- drivers/scsi/sd.c | 29 ++--- 1 file changed,

[PATCH v2 0/7] scsi: sd/sd_zbc cleanup and improvements

2017-04-24 Thread damien . lemoal
From: Damien Le Moal This series of small patches cleanup code mainly in sd.c and sd_zbc.c, with another small improvement in scsi_error.c. Only the last patch of this series introduces a functional change. All other patches do not change any functionality. Changes from

[PATCH v2 4/7] scsi: Improve scsi_get_sense_info_fld

2017-04-24 Thread damien . lemoal
From: Damien Le Moal Use get_unaligned_be32 and get_unaligned_be64 to obtain values from the sense buffer instead of open coding the operations. Also change the function return value to a bool and fix the function signature declaration to remove spaces triggering

Re: [RFC 0/8] Copy Offload with Peer-to-Peer PCI Memory

2017-04-24 Thread Knut Omang
On Mon, 2017-04-17 at 08:31 +1000, Benjamin Herrenschmidt wrote: > On Sun, 2017-04-16 at 10:34 -0600, Logan Gunthorpe wrote: > >  > > On 16/04/17 09:53 AM, Dan Williams wrote: > > > ZONE_DEVICE allows you to redirect via get_dev_pagemap() to retrieve > > > context about the physical address in

Re: [PATCH v4 10/10] scsi: Implement blk_mq_ops.show_rq()

2017-04-24 Thread Hannes Reinecke
On 04/22/2017 01:40 AM, Bart Van Assche wrote: > Show the SCSI CDB, .eh_eflags and .result for pending SCSI commands > in /sys/kernel/debug/block/*/mq/*/dispatch and */rq_list. > > Signed-off-by: Bart Van Assche > Cc: Martin K. Petersen >

Re: [PATCH v3 00/22] lpfc updates for 11.2.0.12

2017-04-24 Thread Christoph Hellwig
Applie to the nvme-4.12 branch. Any praying we're not going to see any conflicts with the SCSI tree.

[lkp-robot] [sd] ab1218235c: INFO:possible_recursive_locking_detected

2017-04-24 Thread kernel test robot
FYI, we noticed the following commit: commit: ab1218235c09d0fabdea31cbd4f099e7cabccb27 ("sd: Make synchronize cache upon shutdown asynchronous") url: https://github.com/0day-ci/linux/commits/Bart-Van-Assche/Avoid-that-__scsi_remove_device-hangs/20170418-013958 base:

Re: [PATCH] scsi: mvumi: remove code handling zero scsi_sg_count(scmd) case

2017-04-24 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig Note that there is plenty opportunity for cleanup even in the moved code section, but let's get this issue sorted out only for now.