["PATCH-v2" 02/22] Fix nvme unregister port timeout.

2017-04-20 Thread jsmart2021
From: James Smart During some link event testing it was observed that the wait_for_completion_timeout in the lpfc_nvme_unregister_port was timing out all the time. The initiator is claiming the nvme_fc_unregister_remoteport upcall is not completing the unregister in the

["PATCH-v2" 01/22] Standardize nvme SGL segment count

2017-04-20 Thread jsmart2021
From: James Smart Standardize default SGL segment count for nvme target and initiator The driver needs to make them the same for clarity. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes

Re: [REEEEPOST] bnx2i + bnx2fc: convert to generic workqueue (#3)

2017-04-20 Thread Sebastian Andrzej Siewior
On 2017-04-10 14:20:41 [-0400], Chad Dupuis wrote: > Sebastian, will take a look. This [0] commit in tip's smp/hotplug branch is staged for the next merge window. It will trigger a lockdep warning on the recursive get_online_cpus() invocation in the two drivers. It is fixed/avoided by the

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

2017-04-20 Thread Stephen Bates
> Yes, this makes sense I think we really just want to distinguish host > memory or not in terms of the dev_pagemap type. I would like to see mutually exclusive flags for host memory (or not) and persistence (or not). Stephen

Re: [PATCH 3/4] nfs: remove the objlayout driver

2017-04-20 Thread Trond Myklebust
On Wed, 2017-04-12 at 18:01 +0200, Christoph Hellwig wrote: > The objlayout code has been in the tree, but it's been unmaintained > and > no server product for it actually ever shipped. > > Signed-off-by: Christoph Hellwig > --- >  Documentation/admin-guide/kernel-parameters.txt |   

["PATCH-v2" 18/22] Add Fabric assigned WWN support.

2017-04-20 Thread jsmart2021
From: James Smart Adding support for Fabric assigned WWPN and WWNN. Firmware sends first FLOGI to fabric with vendor version changes. On link up driver gets updated service parameter with FAWWN assigned port name. Driver sends 2nd FLOGI with updated fawwpn and modifies

["PATCH-v2" 05/22] Add debug messages for nvme/fcp resource allocation.

2017-04-20 Thread jsmart2021
From: James Smart The xri resources are split into pools for NVME and FCP IO when NVME is enabled. There was not message in the log that identified this allocation. Added debug message to log XRI split. Signed-off-by: Dick Kennedy

["PATCH-v2" 14/22] Remove hba lock from NVMET issue WQE.

2017-04-20 Thread jsmart2021
From: James Smart Unnecessary lock is taken. ring lock should be sufficient to protect the work queue submission. This was noticed when doing performance testing. The hbalock is not needed to issue io to the nvme work queue. Signed-off-by: Dick Kennedy

["PATCH-v2" 20/22] Update ABORT processing for NVMET.

2017-04-20 Thread jsmart2021
From: James Smart The driver with nvme had this routine stubbed. Right now XRI_ABORTED_CQE is not handled and the FC NVMET Transport has a new API for the driver. Missing code path, new NVME abort API Update ABORT processing for NVMET There are 3 new FC NVMET Transport

["PATCH-v2" 12/22] Fix driver usage of 128B WQEs when WQ_CREATE is V1.

2017-04-20 Thread jsmart2021
From: James Smart There are two versions of a structure for queue creation and setup that the driver shares with FW. The driver was only treating as version 0. Verify WQ_CREATE with 128B WQEs in V0 and V1. Code review of another bug showed the driver passing 128B WQEs and

["PATCH-v2" 22/22] lpfc revison 11.2.0.12

2017-04-20 Thread jsmart2021
From: James Smart Update lpfc version to reflect this set of changes. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_version.h |

["PATCH-v2" 17/22] Fix max_sgl_segments settings for NVME / NVMET

2017-04-20 Thread jsmart2021
From: James Smart Cannot set NVME segment counts to a large number The existing module parameter lpfc_sg_seg_cnt is used for both SCSI and NVME. Limit the module parameter lpfc_sg_seg_cnt to 128 with the default being 64 for both NVME and NVMET, assuming NVME is enabled

["PATCH-v2" 11/22] Fix driver unload/reload operation.

2017-04-20 Thread jsmart2021
From: James Smart There are couple of different load/unload issues fixed with this patch. One of the issues was reported by Junichi Nomura, a patch was submitted by Johannes Thumsrhirn which did fix one of the problems but the fix in this patch separates the pring free from

["PATCH-v2" 16/22] Fix crash after issuing lip reset

2017-04-20 Thread jsmart2021
From: James Smart When RPI is not available, driver sends WQE with invalid RPI value and rejected by HBA. lpfc :82:00.3: 1:3154 BLS ABORT RSP failed, data: x3/xa0320008 and lpfc :2753 PLOGI failure DID:FA Status:x3/xa0240008 In this case, driver accesses rpi_ids

["PATCH-v2" 03/22] Fix rejected nvme LS Req.

2017-04-20 Thread jsmart2021
From: James Smart In this case, the NVME initiator is sending an LS REQ command on an NDLP that is not MAPPED. The FW rejects it. The lpfc_nvme_ls_req routine checks for a NULL ndlp pointer but does not check the NDLP state. This allows the routine to send an LS IO when

["PATCH-v2" 09/22] Fix extra line print in rqpair debug print.

2017-04-20 Thread jsmart2021
From: James Smart An extra blank line was being added the the rqpair printing. Remove the extra line feed. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn

["PATCH-v2" 15/22] Fix driver load issues when MRQ=8

2017-04-20 Thread jsmart2021
From: James Smart The symptom is that the driver will fail to login to the fabric. The reason is because it is out of iocb resources. There is a one to one relationship between MRQs (receive buffers for NVMET-FC) and iocbs and the default number of IOCBs was not accounting

["PATCH-v2" 19/22] Fix implicit logo and RSCN handling for NVMET

2017-04-20 Thread jsmart2021
From: James Smart NVMET didn't have any RSCN handling at all and would not execute implicit LOGO when receiving a PLOGI from an rport that NVMET had in state UNMAPPED. Clean up the logic in lpfc_nlp_state_cleanup for initiators (FCP and NVME). NVMET should not respond to

["PATCH-v2" 00/22] lpfc updates for 11.2.0.12

2017-04-20 Thread jsmart2021
From: James Smart This patch set provides a number of bug fixes, code cleanups, and error handling, mostly in the nvme area of lpfc. There is one new feature in the series to add Fabric Assigned WWN support. The patches were cut against the linux-block tree,

["PATCH-v2" 06/22] Fix spelling in comments.

2017-04-20 Thread jsmart2021
From: James Smart Comment should have said Repost. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_sli.c | 2 +- 1 file changed, 1

["PATCH-v2" 21/22] Fix Express lane queue creation.

2017-04-20 Thread jsmart2021
From: James Smart The older sli4 adapters only supported the 64 byte WQE entry size. The new adapter (fw) support both 64 and 128 byte WQE entry sizies. The Express lane WQ was not being created with the 128 byte WQE sizes when it was supported. Not having the right WQE

["PATCH-v2" 08/22] Remove NULL ptr check before kfree.

2017-04-20 Thread jsmart2021
From: James Smart The check for NULL ptr is not necessary, kfree will check it. Removing NULL ptr check. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn ---

["PATCH-v2" 13/22] Fix nvme initiator handling when not enabled.

2017-04-20 Thread jsmart2021
From: James Smart Fix nvme initiator handline when CONFIG_LPFC_NVME_INITIATOR is not enabled. With update nvme upstream driver sources, loading the driver with nvme enabled resulting in this Oops. BUG: unable to handle kernel NULL pointer dereference at 0018

["PATCH-v2" 04/22] Fix log message in completion path.

2017-04-20 Thread jsmart2021
From: James Smart In the lpfc_nvme_io_cmd_wqe_cmpl routine the driver was printing two pointers and the DID for the rport whenever an IO completed on a now that had transitioned to a non active state. There is no need to print the node pointer address for a node that is

["PATCH-v2" 10/22] Fix PRLI ACC rsp for NVME

2017-04-20 Thread jsmart2021
From: James Smart PRLI ACC from target is FCP oriented. Word 0 was wrong. This was noticed by another nvmet-fc vendor that was testing the lpfc nvme-fc initiator with their target. Verified results with analyzer. PRLI BC B5 56 56 22 61 04 00 00 61 00 00 01 29 00 00

["PATCH-v2" 07/22] Remove unused defines for NVME PostBuf.

2017-04-20 Thread jsmart2021
From: James Smart These defines for the posting of buffers for nvmet target were not used. Removing the unused defines. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn

[PATCH v3] scsi/bfa: use designated initializers

2017-04-20 Thread Kees Cook
Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. This also initializes the array members using the enum used to look up __port_action entries. Signed-off-by: Kees Cook --- v3: - drop bfa_module_s changes,

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

2017-04-20 Thread Bart Van Assche
On Tue, 2017-04-18 at 16:56 -0700, James Bottomley wrote: > diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c > index e5a2d590a104..31171204cfd1 100644 > --- a/drivers/scsi/scsi_lib.c > +++ b/drivers/scsi/scsi_lib.c > @@ -2611,7 +2611,6 @@ scsi_device_set_state(struct scsi_device

BUG: KASAN: use-after-free in scsi_exit_rq

2017-04-20 Thread Scott Bauer
Hi all, While running xfs test testing some other features scheduled for 4.12 I came across this KASAN dump: [ 638.913813] XFS (nvme0n1): Mounting V5 Filesystem [ 638.917934] XFS (nvme0n1): Ending clean mount [ 639.035070] blk_update_request: I/O error, dev nvme1n1, sector 0 [ 639.071764]

Re: [PATCH 1/4] scsi: pmcraid: use __iomem pointers for ioctl argument

2017-04-20 Thread Al Viro
On Thu, Apr 20, 2017 at 07:54:45PM +0200, Arnd Bergmann wrote: > kernelci.org reports a new compile warning for old code in the pmcraid > driver: > > arch/mips/include/asm/uaccess.h:138:21: warning: passing argument 1 of > '__access_ok' makes pointer from integer without a cast

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

2017-04-20 Thread Dan Williams
On Thu, Apr 20, 2017 at 1:43 PM, Stephen Bates wrote: > >> Yes, this makes sense I think we really just want to distinguish host >> memory or not in terms of the dev_pagemap type. > > I would like to see mutually exclusive flags for host memory (or not) and > persistence

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

2017-04-20 Thread Stephen Bates
>> Yes, this makes sense I think we really just want to distinguish host >> memory or not in terms of the dev_pagemap type. > >> I would like to see mutually exclusive flags for host memory (or not) and >> persistence (or not). >> > > Why persistence? It has zero meaning to the mm. I like the

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

2017-04-20 Thread Bart Van Assche
On Thu, 2017-04-20 at 15:13 -0700, James Bottomley wrote: > On Thu, 2017-04-20 at 21:59 +, Bart Van Assche wrote: > > This approach cannot work. A scsi_target_block() call by the > > transport layer can happen concurrently with the > > __scsi_remove_device() call and hence can occur at any

Re: ["PATCH-v2" 00/22] lpfc updates for 11.2.0.12

2017-04-20 Thread Sagi Grimberg
The patches are dependent on the FC nvme/nvmet patches from the following 2 series: http://lists.infradead.org/pipermail/linux-nvme/2017-April/009250.html http://lists.infradead.org/pipermail/linux-nvme/2017-April/009256.html Hmm, So it seems that we have conflicts here A local merge

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

2017-04-20 Thread James Bottomley
On Thu, 2017-04-20 at 21:59 +, Bart Van Assche wrote: > On Tue, 2017-04-18 at 16:56 -0700, James Bottomley wrote: > > diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c > > index e5a2d590a104..31171204cfd1 100644 > > --- a/drivers/scsi/scsi_lib.c > > +++ b/drivers/scsi/scsi_lib.c >

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

2017-04-20 Thread Bart Van Assche
On Thu, 2017-04-20 at 15:13 -0700, James Bottomley wrote: > How is that possible? Once the device goes into the CANCEL state, it > no longer can be found by starget_for_each_device() because > scsi_device_get() returns NULL ... scsi_target_block() is not serialized against

Re: [PATCH v3] scsi/bfa: use designated initializers

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

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

2017-04-20 Thread Dan Williams
On Thu, Apr 20, 2017 at 4:07 PM, Stephen Bates wrote: >>> Yes, this makes sense I think we really just want to distinguish host >>> memory or not in terms of the dev_pagemap type. >> >>> I would like to see mutually exclusive flags for host memory (or not) and >>>

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

2017-04-20 Thread Jens Axboe
On Wed, Apr 19 2017, jsmart2...@gmail.com wrote: > From: James Smart > > This patch set provides a number of bug fixes, code cleanups, and error > handling, mostly in the nvme area of lpfc. > > There is one new feature in the series to add Fabric Assigned WWN support. > >

Re: [PATCH 0/5] v2: block subsystem refcounter conversions

2017-04-20 Thread Eric Biggers
Hi Elena, On Thu, Apr 20, 2017 at 04:10:16PM +, Reshetova, Elena wrote: > > > All the objections from DaveM on the amount of cycles spent on the > > new refcount_t apply to the block layer fast path operations as well. > > Ok, could you please indicate the correct way to measure the impact

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

2017-04-20 Thread James Smart
On 4/20/2017 11:30 AM, Jens Axboe wrote: On Wed, Apr 19 2017, jsmart2...@gmail.com wrote: From: James Smart This patch set provides a number of bug fixes, code cleanups, and error handling, mostly in the nvme area of lpfc. There is one new feature in the series to add

[PATCH 1/5] block: convert bio.__bi_cnt from atomic_t to refcount_t

2017-04-20 Thread Elena Reshetova
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 accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

[PATCH 2/2] scsi: ufs: make ufshcd_get_lists_status() register operation obvious

2017-04-20 Thread kusumi . tomohiro
From: Tomohiro Kusumi It could be just cmp 0xe instead of >>1 and cmp 0x7, with readable code. Signed-off-by: Tomohiro Kusumi --- drivers/scsi/ufs/ufshcd.c | 11 +-- drivers/scsi/ufs/ufshci.h | 4 2 files changed, 5 insertions(+), 10

[PATCH 4/5] block: convert io_context.active_ref from atomic_t to refcount_t

2017-04-20 Thread Elena Reshetova
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 accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

Re: [PATCH-v1 19/22] Fix implicit logo and RSCN handling for NVMET

2017-04-20 Thread Johannes Thumshirn
On Wed, Apr 19, 2017 at 09:46:38PM -0700, jsmart2...@gmail.com wrote: > From: James Smart > > NVMET didn't have any RSCN handling at all and > would not execute implicit LOGO when receiving a PLOGI > from an rport that NVMET had in state UNMAPPED. > > Clean up the logic in

[PATCH 5/5] block: convert bsg_device.ref_count from atomic_t to refcount_t

2017-04-20 Thread Elena Reshetova
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 accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

[PATCH 0/5] v2: block subsystem refcounter conversions

2017-04-20 Thread Elena Reshetova
changes in v2: Not needed WARNs are removed since refcount_t warns by itself. BUG_ONs are left as it is, since refcount_t doesn't bug by default. This series, for block subsystem, replaces atomic_t reference counters with the new refcount_t type and API (see include/linux/refcount.h). By doing

[PATCH 3/5] block: convert blkcg_gq.refcnt from atomic_t to refcount_t

2017-04-20 Thread Elena Reshetova
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 accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

[PATCH 2/5] block: convert blk_queue_tag.refcnt from atomic_t to refcount_t

2017-04-20 Thread Elena Reshetova
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 accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by:

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

2017-04-20 Thread kusumi . tomohiro
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 --- drivers/scsi/ufs/ufshcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH-v1 21/22] Fix Express lane queue creation.

2017-04-20 Thread Johannes Thumshirn
On Wed, Apr 19, 2017 at 09:46:40PM -0700, jsmart2...@gmail.com wrote: > From: James Smart > > The older sli4 adapters only supported the 64 byte WQE entry size. > The new adapter (fw) support both 64 and 128 byte WQE entry sizies. > The Express lane WQ was not being created

Re: [PATCH-v1 22/22] lpfc revison 11.2.0.12

2017-04-20 Thread Johannes Thumshirn
On Wed, Apr 19, 2017 at 09:46:41PM -0700, jsmart2...@gmail.com wrote: > From: James Smart > > Update lpfc version to reflect this set of changes. > > Signed-off-by: Dick Kennedy > Signed-off-by: James Smart > ---

Re: [PATCH-v1 11/22] Fix driver unload/reload operation.

2017-04-20 Thread Junichi Nomura
On 04/20/17 16:37, Johannes Thumshirn wrote: > On Wed, Apr 19, 2017 at 09:46:30PM -0700, jsmart2...@gmail.com wrote: >> From: James Smart >> >> There are couple of different load/unload issues fixed with this patch. >> One of the issues was reported by Junichi Nomura, a

Re: [PATCH 12/23] dm mpath: don't check for req->errors

2017-04-20 Thread Johannes Thumshirn
On Thu, Apr 20, 2017 at 04:03:05PM +0200, Christoph Hellwig wrote: > We'll get all proper errors reported through ->end_io and ->errors will > go away soon. > > Signed-off-by: Christoph Hellwig > --- Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn

Re: [PATCH 16/23] blk-mq: remove the error argument to blk_mq_complete_request

2017-04-20 Thread Johannes Thumshirn
On Thu, Apr 20, 2017 at 04:03:09PM +0200, Christoph Hellwig wrote: > Now that all drivers that call blk_mq_complete_requests have a > ->complete callback we can remove the direct call to blk_mq_end_request, > as well as the error argument to blk_mq_complete_request. > > Signed-off-by: Christoph

Re: [PATCH 21/23] swim3: remove (commented out) printing of req->errors

2017-04-20 Thread Johannes Thumshirn
On Thu, Apr 20, 2017 at 04:03:14PM +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > --- Easy enough, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de

Re: [PATCH 02/23] block: remove the blk_execute_rq return value

2017-04-20 Thread Bart Van Assche
On Thu, 2017-04-20 at 16:02 +0200, Christoph Hellwig wrote: > The function only returns -EIO if rq->errors is non-zero, which is not > very useful and lets a large number of callers ignore the return value. > > Just let the callers figure out their error themselves. Reviewed-by: Bart Van Assche

Re: [PATCH 22/23] blktrace: remove the unused block_rq_abort tracepoint

2017-04-20 Thread Johannes Thumshirn
On Thu, Apr 20, 2017 at 04:03:15PM +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > --- Just to be sure nothings forgotten, does this change need an update for blktrace as well? -- Johannes Thumshirn Storage

Re: [PATCH 23/23] block: remove the errors field from struct request

2017-04-20 Thread Johannes Thumshirn
On Thu, Apr 20, 2017 at 04:03:16PM +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > Reviewed-by: Bart Van Assche > Acked-by: Roger Pau Monné > Reviewed-by: Konrad Rzeszutek Wilk > ---

Re: [PATCH 08/23] scsi: introduce a result field in struct scsi_request

2017-04-20 Thread Bart Van Assche
On Thu, 2017-04-20 at 16:03 +0200, Christoph Hellwig wrote: > This passes on the scsi_cmnd result field to users of passthrough > requests. Currently we abuse req->errors for this purpose, but that > field will go away in its current form. > > Note that the old IDE code abuses the errors field

Re: [PATCH 16/23] blk-mq: remove the error argument to blk_mq_complete_request

2017-04-20 Thread Bart Van Assche
On Thu, 2017-04-20 at 16:03 +0200, Christoph Hellwig wrote: > Now that all drivers that call blk_mq_complete_requests have a > ->complete callback we can remove the direct call to blk_mq_end_request, > as well as the error argument to blk_mq_complete_request. Reviewed-by: Bart Van Assche

Re: [PATCH 01/23] pd: don't check blk_execute_rq return value.

2017-04-20 Thread Johannes Thumshirn
On Thu, Apr 20, 2017 at 04:02:54PM +0200, Christoph Hellwig wrote: > The driver never sets req->errors, so blk_execute_rq will always return 0. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Bart Van Assche > --- Reviewed-by: Johannes Thumshirn

Re: [PATCH 10/23] null_blk: don't pass always-0 req->errors to blk_mq_complete_request

2017-04-20 Thread Johannes Thumshirn
On Thu, Apr 20, 2017 at 04:03:03PM +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > --- Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de

Re: [PATCH 11/23] dm rq: don't pass irrelevant error code to blk_mq_complete_request

2017-04-20 Thread Johannes Thumshirn
On Thu, Apr 20, 2017 at 04:03:04PM +0200, Christoph Hellwig wrote: > dm never uses rq->errors, so there is no need to pass an error argument > to blk_mq_complete_request. > > Signed-off-by: Christoph Hellwig > --- Reviewed-by: Johannes Thumshirn -- Johannes

Re: [PATCH 14/23] mtip32xx: add a status field to struct mtip_cmd

2017-04-20 Thread Johannes Thumshirn
On Thu, Apr 20, 2017 at 04:03:07PM +0200, Christoph Hellwig wrote: > Instead of using req->errors, which will go away. > > Signed-off-by: Christoph Hellwig > --- Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn

Re: [PATCH 22/23] blktrace: remove the unused block_rq_abort tracepoint

2017-04-20 Thread Johannes Thumshirn
On Thu, Apr 20, 2017 at 05:25:58PM +0200, Christoph Hellwig wrote: > On Thu, Apr 20, 2017 at 05:20:56PM +0200, Johannes Thumshirn wrote: > > On Thu, Apr 20, 2017 at 04:03:15PM +0200, Christoph Hellwig wrote: > > > Signed-off-by: Christoph Hellwig > > > --- > > > > Just to be sure

Re: [PATCH 12/23] dm mpath: don't check for req->errors

2017-04-20 Thread Bart Van Assche
On Thu, 2017-04-20 at 16:03 +0200, Christoph Hellwig wrote: > We'll get all proper errors reported through ->end_io and ->errors will > go away soon. Reviewed-by: Bart Van Assche

Re: [PATCH 22/23] blktrace: remove the unused block_rq_abort tracepoint

2017-04-20 Thread Christoph Hellwig
On Thu, Apr 20, 2017 at 05:20:56PM +0200, Johannes Thumshirn wrote: > On Thu, Apr 20, 2017 at 04:03:15PM +0200, Christoph Hellwig wrote: > > Signed-off-by: Christoph Hellwig > > --- > > Just to be sure nothings forgotten, does this change need an update for > blktrace as well? I

Re: [PATCH 11/23] dm rq: don't pass irrelevant error code to blk_mq_complete_request

2017-04-20 Thread Bart Van Assche
On Thu, 2017-04-20 at 16:03 +0200, Christoph Hellwig wrote: > dm never uses rq->errors, so there is no need to pass an error argument > to blk_mq_complete_request. Reviewed-by: Bart Van Assche

Re: [PATCH 0/5] v2: block subsystem refcounter conversions

2017-04-20 Thread Christoph Hellwig
All the objections from DaveM on the amount of cycles spent on the new refcount_t apply to the block layer fast path operations as well. Please don't send any more conversions until those have been resolved.

[PATCH 04/23] nvme: split nvme status from block req->errors

2017-04-20 Thread Christoph Hellwig
We want our own clearly defined error field for NVMe passthrough commands, and the request errors field is going away in its current form. Just store the status and result field in the nvme_request field from hardirq completion context (using a new helper) and then generate a Linux errno for the

[PATCH 08/23] scsi: introduce a result field in struct scsi_request

2017-04-20 Thread Christoph Hellwig
This passes on the scsi_cmnd result field to users of passthrough requests. Currently we abuse req->errors for this purpose, but that field will go away in its current form. Note that the old IDE code abuses the errors field in very creative ways and stores all kinds of different values in it.

[PATCH 05/23] nvme: make nvme_error_status private

2017-04-20 Thread Christoph Hellwig
Currently it's used by the lighnvm passthrough ioctl, but we'd like to make it private in preparation of block layer specific error code. Lighnvm already returns the real NVMe status anyway, so I think we can just limit it to returning -EIO for any status set. This will need a careful audit from

[PATCH 02/23] block: remove the blk_execute_rq return value

2017-04-20 Thread Christoph Hellwig
The function only returns -EIO if rq->errors is non-zero, which is not very useful and lets a large number of callers ignore the return value. Just let the callers figure out their error themselves. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn

[PATCH 03/23] nvme-fc: fix status code handling in nvme_fc_fcpio_done

2017-04-20 Thread Christoph Hellwig
nvme_complete_async_event expects the little endian status code including the phase bit, and a new completion handler I plan to introduce will do so as well. Change the status variable into the little endian format with the phase bit used in the NVMe CQE to fix / enable this. Signed-off-by:

[PATCH 06/23] virtio: fix spelling of virtblk_scsi_request_done

2017-04-20 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche --- drivers/block/virtio_blk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/block/virtio_blk.c

[PATCH 07/23] virtio_blk: don't use req->errors

2017-04-20 Thread Christoph Hellwig
Remove passing req->errors (which at that point is always 0) to blk_mq_complete_request, and rely on the virtio status code for the serial number passthrough request. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn ---

kill req->errors V4

2017-04-20 Thread Christoph Hellwig
Currently the request structure has an errors field that is used in various different ways. The oldest drivers use it as an error count, blk-mq and the generic timeout code assume that it holds a Linux errno for block completions, and various drivers use it for internal status values, often

[PATCH 23/23] block: remove the errors field from struct request

2017-04-20 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Acked-by: Roger Pau Monné Reviewed-by: Konrad Rzeszutek Wilk --- block/blk-core.c | 14 +- block/blk-exec.c

Re: linux-next: manual merge of the scsi-mkp tree with the char-misc tree

2017-04-20 Thread Boaz Harrosh
On 04/07/2017 10:50 PM, Bart Van Assche wrote: > On Fri, 2017-04-07 at 13:29 -0600, Logan Gunthorpe wrote: >> On 07/04/17 09:49 AM, Bart Van Assche wrote: >>> Sorry that I had not yet noticed Logan's patch series. Should my two >>> patches that conflict with Logan's patch series be dropped and

[PATCH 22/23] blktrace: remove the unused block_rq_abort tracepoint

2017-04-20 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- include/trace/events/block.h | 44 ++-- kernel/trace/blktrace.c | 9 - 2 files changed, 10 insertions(+), 43 deletions(-) diff --git a/include/trace/events/block.h

[PATCH 13/23] nbd: don't use req->errors

2017-04-20 Thread Christoph Hellwig
Add a nbd-specific field instead. Signed-off-by: Christoph Hellwig Reviewed-by: Josef Bacik --- drivers/block/nbd.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index

[PATCH 14/23] mtip32xx: add a status field to struct mtip_cmd

2017-04-20 Thread Christoph Hellwig
Instead of using req->errors, which will go away. Signed-off-by: Christoph Hellwig --- drivers/block/mtip32xx/mtip32xx.c | 16 +--- drivers/block/mtip32xx/mtip32xx.h | 1 + 2 files changed, 10 insertions(+), 7 deletions(-) diff --git

[PATCH 21/23] swim3: remove (commented out) printing of req->errors

2017-04-20 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/block/swim3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c index 61b3ffa4f458..ba4809c9bdba 100644 --- a/drivers/block/swim3.c +++ b/drivers/block/swim3.c @@ -343,8

[PATCH 19/23] floppy: switch from req->errors to req->error_count

2017-04-20 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/block/floppy.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index ce102ec47ef2..60d4c7653178 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@

[PATCH 16/23] blk-mq: remove the error argument to blk_mq_complete_request

2017-04-20 Thread Christoph Hellwig
Now that all drivers that call blk_mq_complete_requests have a ->complete callback we can remove the direct call to blk_mq_end_request, as well as the error argument to blk_mq_complete_request. Signed-off-by: Christoph Hellwig --- block/blk-mq.c| 15

[PATCH 17/23] blk-mq: simplify __blk_mq_complete_request

2017-04-20 Thread Christoph Hellwig
Merge blk_mq_ipi_complete_request and blk_mq_stat_add into their only caller. Signed-off-by: Christoph Hellwig --- block/blk-mq.c | 25 - 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index

[PATCH 18/23] block: add a error_count field to struct request

2017-04-20 Thread Christoph Hellwig
This is for the legacy floppy and ataflop drivers that currently abuse ->errors for this purpose. It's stashed away in a union to not grow the struct size, the other fields are either used by modern drivers for different purposes or the I/O scheduler before queing the I/O to drivers.

[PATCH 11/23] dm rq: don't pass irrelevant error code to blk_mq_complete_request

2017-04-20 Thread Christoph Hellwig
dm never uses rq->errors, so there is no need to pass an error argument to blk_mq_complete_request. Signed-off-by: Christoph Hellwig --- drivers/md/dm-rq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c index

[PATCH 12/23] dm mpath: don't check for req->errors

2017-04-20 Thread Christoph Hellwig
We'll get all proper errors reported through ->end_io and ->errors will go away soon. Signed-off-by: Christoph Hellwig --- drivers/md/dm-mpath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index

[PATCH 15/23] xen-blkfront: don't use req->errors

2017-04-20 Thread Christoph Hellwig
xen-blkfron is the last users using rq->errros for passing back error to blk-mq, and I'd like to get rid of that. In the longer run the driver should be moving more of the completion processing into .complete, but this is the minimal change to move forward for now. Signed-off-by: Christoph

[PATCH 10/23] null_blk: don't pass always-0 req->errors to blk_mq_complete_request

2017-04-20 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/block/null_blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index e79e3d24e229..0ca4aa34edb9 100644 --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c

[PATCH 01/23] pd: don't check blk_execute_rq return value.

2017-04-20 Thread Christoph Hellwig
The driver never sets req->errors, so blk_execute_rq will always return 0. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche --- drivers/block/paride/pd.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git

[PATCH 09/23] loop: zero-fill bio on the submitting cpu

2017-04-20 Thread Christoph Hellwig
In thruth I've just audited which blk-mq drivers don't currently have a complete callback, but I think this change is at least borderline useful. Signed-off-by: Christoph Hellwig Reviewed-by: Ming Lei --- drivers/block/loop.c | 30

[PATCH 20/23] ataflop: switch from req->errors to req->error_count

2017-04-20 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/block/ataflop.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c index 2104b1b4ccda..fa69ecd52cb5 100644 --- a/drivers/block/ataflop.c +++

RE: [PATCH 0/5] v2: block subsystem refcounter conversions

2017-04-20 Thread Reshetova, Elena
> All the objections from DaveM on the amount of cycles spent on the > new refcount_t apply to the block layer fast path operations as well. Ok, could you please indicate the correct way to measure the impact for the block layer? We can do the measurements. Best Regards, Elena. > > Please

Re: [PATCH-v1 20/22] Update ABORT processing for NVMET.

2017-04-20 Thread Johannes Thumshirn
On Wed, Apr 19, 2017 at 09:46:39PM -0700, jsmart2...@gmail.com wrote: > From: James Smart > > The driver with nvme had this routine stubbed. > > Right now XRI_ABORTED_CQE is not handled and the FC NVMET > Transport has a new API for the driver. > > Missing code path, new

[PATCH 1/4] scsi: pmcraid: use __iomem pointers for ioctl argument

2017-04-20 Thread Arnd Bergmann
kernelci.org reports a new compile warning for old code in the pmcraid driver: arch/mips/include/asm/uaccess.h:138:21: warning: passing argument 1 of '__access_ok' makes pointer from integer without a cast [-Wint-conversion] The warning got introduced by a cleanup to the access_ok() helper that

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

2017-04-20 Thread Arnd Bergmann
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 This adds the missing unlock at the end of the function. I could not figure out if this

[PATCH 3/4] scsi: pmcraid: fix endianess sparse annotations

2017-04-20 Thread Arnd Bergmann
The use of le32_to_cpu() etc in this driver looks completely arbitrary. It may have made sense at some point, but it is not applied consistently, so this driver presumably won't work on big-endian kernel builds. Unfortunately it's unclear whether the type names or the calls to le32_to_cpu() are

  1   2   >