(From: Mr. James Tan (Urgent & Confidential)

2017-04-19 Thread James Tan
-- (From: Mr.James Tan (Urgent & Confidential) Good Day, Please Read. My name is Mr.James Tan , I am the Bill and Exchange manager here in Bank of Africa (BOA) Lome-Togo.West-Africa. I have a business proposal in the tune of $9.7m, (Nine Million Seven Hundred Thousand Dollars Only) after the su

Re: [PATCH 2/2] block: Improve error handling verbosity

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

Re: [PATCH 1/2] scsi: convert unrecovered read error to -EILSEQ

2017-04-19 Thread Christoph Hellwig
Looks like I won't get the major error status changes into 4.12, so let's go with these patches for now: Reviewed-by: Christoph Hellwig

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

2017-04-19 Thread Christoph Hellwig
On Wed, Apr 19, 2017 at 09:43:00PM -0400, Martin K. Petersen wrote: > Really wish we could just obliterate drivers/ide. Same here. It's been _the_ major pain point for doing block layer heavy lifting for the last 1 or two years.

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

2017-04-19 Thread h...@lst.de
On Wed, Apr 19, 2017 at 09:07:45PM +, Bart Van Assche wrote: > > + blk_execute_rq(or->request->q, NULL, or->request, 0); > > + error = or->request ? -EIO : 0; > > Hello Christoph, > > Did you perhaps intend or->request->errors instead of or->request? Yes, thanks.

[PATCH-v1 22/22] lpfc revison 11.2.0.12

2017-04-19 Thread jsmart2021
From: James Smart Update lpfc version to reflect this set of changes. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_version.h b/drivers/scsi/lpfc/lpfc_versi

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

2017-04-19 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 size created for the expr

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

2017-04-19 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 Signed-off-by: James Smart --- drivers/

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

2017-04-19 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 --- drivers/scsi/lpfc/lpfc_debugfs.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/l

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

2017-04-19 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 not active the DID should

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

2017-04-19 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 --- drivers/scsi/lpfc/lpfc_nvme.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_nvme.h

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

2017-04-19 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 array out of bounds. Fi

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

2017-04-19 Thread jsmart2021
From: James Smart Comment should have said Repost. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_sli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 1c9fa45..7087c55 100

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

2017-04-19 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 --- drivers/scsi/lpfc/lpfc_nvme.h | 4 +--- drivers/scsi/lpfc/lpfc_nvmet.c | 2 +- drivers/scsi/lp

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

2017-04-19 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 8 pages in WQ CREATE a

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

2017-04-19 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 API/ template routines f

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

2017-04-19 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 in the driver for that p

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

2017-04-19 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 for the number of MRQs

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

2017-04-19 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 IP: lpfc_nvme_update_l

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

2017-04-19 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 the queue free and doe

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

2017-04-19 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 Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_init.c

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

2017-04-19 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 --- drivers/scsi/lpfc/lpfc_debugfs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drive

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

2017-04-19 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 the vport->fc_portname in

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

2017-04-19 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 RSCN including allocatin

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

2017-04-19 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 20 00 00 00 00 10 FF FF

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

2017-04-19 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 time allotted. [ 2186.151

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

2017-04-19 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 the ndlp is disconnect

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

2017-04-19 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, for-4.12/block branch, and are inten

Re: [PATCH] ibmvscsis: Do not send aborted task response

2017-04-19 Thread Martin K. Petersen
"Bryant G. Ly" writes: > The driver is sending a response to the aborted task response along > with LIO sending the tmr response. ibmvscsis_tgt does not send the > response to the client until release_cmd time. The reason for this was > because if we did it at queue_status time, then the client

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

2017-04-19 Thread Martin K. Petersen
Sinan Kaya writes: > 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. > > The mpt3sas driver is already using wmb() for this purpose. However, > it issu

Re: commit 1b6ac5e3f "fnic: Using rport->dd_data to check rport online instead of rport_lookup."

2017-04-19 Thread Martin K. Petersen
Joe Jin writes: > My customer hit below error when issue LIP to fnic controller: > > [94702.898408] sd 2:0:4:1: [sdx] tag#1 FAILED Result: > hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK > [94702.898416] sd 2:0:4:1: [sdx] tag#1 CDB: Write(10) 2a 00 04 56 c0 08 00 00 > 08 00 > [94702.898420] blk_u

Re: [PATCH] [SCSI] aic7xxx: fix order of arguments in function prototype

2017-04-19 Thread Martin K. Petersen
Colin King writes: > The vendor/device and subvendor/subdevice arguments to the function > prototype ahc_9005_subdevinfo_valid are in the wrong order and need to > be swapped to fix this. Detected with PVS-Studio studio. Applied to 4.12/scsi-queue. -- Martin K. Petersen Oracle Linux Engi

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

2017-04-19 Thread Martin K. Petersen
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 workqueue for >> running command aborts. >> >> [ ... ] >> @@ -271,10 +266,14 @@ enum blk_e

Re: [PATCH] bfa: remove bfa_module_s madness

2017-04-19 Thread Martin K. Petersen
Christoph Hellwig writes: > Just call the functions directly and remove a giant pile of > boilerplate code. Applied to 4.12/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: qedi,qedf: Use designated initializers

2017-04-19 Thread Martin K. Petersen
Kees, > Prepare to mark sensitive kernel structures for randomization by > making sure they're using designated initializers. These were > identified during allyesconfig builds of x86, arm, and arm64, with > most initializer fixes extracted from grsecurity. > > For these cases, terminate the list

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

2017-04-19 Thread Martin K. Petersen
Christoph Hellwig writes: > 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. Reviewed-by: Martin K. Petersen > Note that the old IDE code abuses the errors field in

Re: [PATCH 26/27] scsi: sd: Separate zeroout and discard command choices

2017-04-19 Thread Martin K. Petersen
Paolo, > Should this be conditional on lbprz, lbpws, lbpws10 and max_ws_blocks? It is intentional that things can be overridden from userland for devices that report the "wrong" thing. We do the same for discard so people can set up udev rules. -- Martin K. Petersen Oracle Linux Engineeri

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

2017-04-19 Thread Dan Williams
On Wed, Apr 19, 2017 at 3:55 PM, Logan Gunthorpe wrote: > > > On 19/04/17 02:48 PM, Jason Gunthorpe wrote: >> On Wed, Apr 19, 2017 at 01:41:49PM -0600, Logan Gunthorpe wrote: >> But.. it could point to a GPU and the GPU struct device could have a proxy dma_ops like Dan pointed out. >>> >

Re: [PATCH v3 8/8] scsi: Implement blk_mq_ops.show_rq()

2017-04-19 Thread Bart Van Assche
On Wed, 2017-04-19 at 19:25 -0400, Martin K. Petersen wrote: > Bart Van Assche writes: > > Show the SCSI CDB, .eh_eflags and .result for pending SCSI commands > > in /sys/kernel/debug/block/*/mq/*/dispatch and */rq_list. > > SCSI_EH_CANCEL_CMD is no more (as of a06586325f37). Thanks Martin. I wi

Re: [PATCH] scsi: osd_uld: fix mismerge

2017-04-19 Thread Stephen Rothwell
Hi Bart, On Wed, 19 Apr 2017 17:46:43 + Bart Van Assche wrote: > > On Wed, 2017-04-19 at 19:44 +0200, Arnd Bergmann wrote: > > Fixes: c02465fa13b6 ("scsi: osd_uld: Check scsi_device_get() return value") > > Fixes: ac1ddc584e98 ("scsi: utilize new cdev_device_add helper function") > > Both

Re: [PATCH] scsi: osd_uld: fix mismerge

2017-04-19 Thread Stephen Rothwell
Hi Arnd, On Wed, 19 Apr 2017 19:44:01 +0200 Arnd Bergmann wrote: > > A mismerge between two branches in linux-next reintroduced a warning that was > previously resolved: > > drivers/scsi/osd/osd_uld.c: In function 'osd_probe': > drivers/scsi/osd/osd_uld.c:457:2: error: ignoring return value of

Re: [PATCH v3 8/8] scsi: Implement blk_mq_ops.show_rq()

2017-04-19 Thread Martin K. Petersen
Bart Van Assche writes: Bart, > Show the SCSI CDB, .eh_eflags and .result for pending SCSI commands > in /sys/kernel/debug/block/*/mq/*/dispatch and */rq_list. SCSI_EH_CANCEL_CMD is no more (as of a06586325f37). -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH v3 0/2] scsi: storvsc: Add support for FC rport

2017-04-19 Thread Martin K. Petersen
Cathy, > The updated patch set provides a way for drivers ( specifically > storvsc in this case ) that expose virturalized fc devices > but that do not expose rports to be manually scanned. This is > done via creating a pseudo rport in storvsc and a > corresponding dummy initiator rport role in t

Re: [PATCH] virtio_scsi: Always try to read VPD pages

2017-04-19 Thread Martin K. Petersen
David, > Passed through SCSI targets may have transfer limits which come from > the host SCSI controller something on the host side other than the > target itself. > > To make this work properly, the hypervisor can adjust the target's VPD > information to advertise these limits. But for that to

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

2017-04-19 Thread Logan Gunthorpe
On 19/04/17 02:48 PM, Jason Gunthorpe wrote: > On Wed, Apr 19, 2017 at 01:41:49PM -0600, Logan Gunthorpe wrote: > >>> But.. it could point to a GPU and the GPU struct device could have a >>> proxy dma_ops like Dan pointed out. >> >> Seems a bit awkward to me that in order for the intended use ca

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

2017-04-19 Thread Bart Van Assche
On Wed, 2017-04-19 at 21:27 +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > Acked-by: Roger Pau Monné > Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Bart Van Assche

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

2017-04-19 Thread Bart Van Assche
On Wed, 2017-04-19 at 21:26 +0200, Christoph Hellwig wrote: > --- a/drivers/scsi/osd/osd_initiator.c > +++ b/drivers/scsi/osd/osd_initiator.c > @@ -489,7 +489,10 @@ static void _set_error_resid(struct osd_request *or, > struct request *req, > > int osd_execute_request(struct osd_request *or) >

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

2017-04-19 Thread Bart Van Assche
On Wed, 2017-04-19 at 21:26 +0200, Christoph Hellwig wrote: > The driver never sets req->errors, so blk_execute_rq will always return 0. Reviewed-by: Bart Van Assche

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

2017-04-19 Thread Jason Gunthorpe
On Wed, Apr 19, 2017 at 01:41:49PM -0600, Logan Gunthorpe wrote: > > But.. it could point to a GPU and the GPU struct device could have a > > proxy dma_ops like Dan pointed out. > > Seems a bit awkward to me that in order for the intended use case, you > have to proxy the dma_ops. I'd probably st

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

2017-04-19 Thread Logan Gunthorpe
On 19/04/17 01:31 PM, Jason Gunthorpe wrote: > Try it with VT-D turned on. It shouldn't work or there is a notable > security hole in your platform.. Ah, ok. >>> const struct dma_map_ops *comp_ops = get_dma_ops(completer); >>> const struct dma_map_ops *init_ops = get_dma_ops(initiator

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

2017-04-19 Thread Jason Gunthorpe
On Wed, Apr 19, 2017 at 01:02:49PM -0600, Logan Gunthorpe wrote: > > > On 19/04/17 12:32 PM, Jason Gunthorpe wrote: > > On Wed, Apr 19, 2017 at 12:01:39PM -0600, Logan Gunthorpe wrote: > > Not entirely, it would have to call through the whole process > > including the arch_p2p_cross_segment().. >

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

2017-04-19 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Acked-by: Roger Pau Monné Reviewed-by: Konrad Rzeszutek Wilk --- block/blk-core.c | 14 +- block/blk-exec.c | 3 +-- block/blk-mq.c | 10 +++--- block/blk-timeout.c | 1 - include/linux/blkdev.h

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

2017-04-19 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 +343,8 @@ stat

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

2017-04-19 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 +++ b/drivers/block/ataflop.c @@ -6

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

2017-04-19 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. Signed-off-b

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

2017-04-19 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 0c19df66f5a0..1f98db082da3 100644

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

2017-04-19 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 @@ -2805,8 +2805,

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

2017-04-19 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 ab55955ed704..2950b145443d 1006

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

2017-04-19 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 +++ drivers/b

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

2017-04-19 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 Hellwi

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

2017-04-19 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 b/include/trace/events/block.h index a88e

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

2017-04-19 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 f93906ff31e8..24ca85a70fd8 100644 --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c @@ -281,7 +28

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

2017-04-19 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 a/drivers/block/mtip32xx/mtip32xx.c b/drivers/b

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

2017-04-19 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 --- drivers/block/virtio_blk.c | 10 +++--- 1 file changed,

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

2017-04-19 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 6e592c2ba8fd..09a74a66beb1 100

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

2017-04-19 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 e60f1b6845be..1173be21f6f6

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

2017-04-19 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. I

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

2017-04-19 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 ++ drivers/block/loop.h | 1 + 2 f

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

2017-04-19 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 b/drivers/block/virtio_blk.c index eaf99022bdc6..dbc4e80680b1 100644

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

2017-04-19 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: Chris

[PATCH 05/23] nvme: make nvme_error_status private

2017-04-19 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 04/23] nvme: split nvme status from block req->errors

2017-04-19 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 b

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

2017-04-19 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 --- block/blk-exec.c

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

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

kill req->errors V3

2017-04-19 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 overwr

kill req->errors V3

2017-04-19 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 overwr

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

2017-04-19 Thread Logan Gunthorpe
On 19/04/17 12:32 PM, Jason Gunthorpe wrote: > On Wed, Apr 19, 2017 at 12:01:39PM -0600, Logan Gunthorpe wrote: > Not entirely, it would have to call through the whole process > including the arch_p2p_cross_segment().. Hmm, yes. Though it's still not clear what, if anything, arch_p2p_cross_segme

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

2017-04-19 Thread Dan Williams
On Wed, Apr 19, 2017 at 11:41 AM, Logan Gunthorpe wrote: > > > On 19/04/17 12:30 PM, Dan Williams wrote: >> Letting others users do the container_of() arrangement means that >> struct page_map needs to become public and move into struct >> dev_pagemap directly. > > Ah, yes, I got a bit turned arou

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

2017-04-19 Thread Bart Van Assche
On Tue, 2017-04-18 at 16:56 -0700, James Bottomley wrote: > This means the combined 1/3 3/3 patch looks like this: > [ ... ] Hello James, The two attached patches pass my tests. How would you like to proceed with patch 1/2? Would you like to submit it yourself or is it OK for you if I mention you

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

2017-04-19 Thread Logan Gunthorpe
On 19/04/17 12:30 PM, Dan Williams wrote: > Letting others users do the container_of() arrangement means that > struct page_map needs to become public and move into struct > dev_pagemap directly. Ah, yes, I got a bit turned around by that and failed to notice that page_map and dev_pagemap are di

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

2017-04-19 Thread Jason Gunthorpe
On Wed, Apr 19, 2017 at 12:01:39PM -0600, Logan Gunthorpe wrote: > I'm just spit balling here but if HMM wanted to use unaddressable memory > as a DMA target, it could set that function to create a window ine gpu > memory, then call the pci_p2p_same_segment and return the result as the > dma addre

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

2017-04-19 Thread Dan Williams
On Wed, Apr 19, 2017 at 11:19 AM, Logan Gunthorpe wrote: > > > On 19/04/17 12:11 PM, Logan Gunthorpe wrote: >> >> >> On 19/04/17 11:41 AM, Dan Williams wrote: >>> No, not quite ;-). I still don't think we should require the non-HMM >>> to pass NULL for all the HMM arguments. What I like about Loga

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

2017-04-19 Thread Logan Gunthorpe
On 19/04/17 12:11 PM, Logan Gunthorpe wrote: > > > On 19/04/17 11:41 AM, Dan Williams wrote: >> No, not quite ;-). I still don't think we should require the non-HMM >> to pass NULL for all the HMM arguments. What I like about Logan's >> proposal is to have a separate create and register steps d

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

2017-04-19 Thread Logan Gunthorpe
On 19/04/17 11:41 AM, Dan Williams wrote: > No, not quite ;-). I still don't think we should require the non-HMM > to pass NULL for all the HMM arguments. What I like about Logan's > proposal is to have a separate create and register steps dev_pagemap. > That way call paths that don't care about

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

2017-04-19 Thread Logan Gunthorpe
On 19/04/17 11:14 AM, Jason Gunthorpe wrote: > I don't see a use for the dma_map function pointer at this point.. Yes, it is kind of like designing for the future. I just find it a little odd calling the pci functions in the iommu. > It doesn't make alot of sense for the completor of the DMA t

Re: blk-mq: remove the error argument to blk_mq_complete_request

2017-04-19 Thread h...@lst.de
On Tue, Apr 18, 2017 at 10:50:18PM +, Bart Van Assche wrote: > On Tue, 2017-04-18 at 08:52 -0700, Christoph Hellwig wrote: > > Now that we always 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. >

Re: [PATCH] scsi: osd_uld: fix mismerge

2017-04-19 Thread Bart Van Assche
On Wed, 2017-04-19 at 19:44 +0200, Arnd Bergmann wrote: > Fixes: c02465fa13b6 ("scsi: osd_uld: Check scsi_device_get() return value") > Fixes: ac1ddc584e98 ("scsi: utilize new cdev_device_add helper function") Hello Arnd, Both these patches are fine as far as I can tell. Shouldn't the "Fixes" tag

[PATCH] scsi: osd_uld: fix mismerge

2017-04-19 Thread Arnd Bergmann
A mismerge between two branches in linux-next reintroduced a warning that was previously resolved: drivers/scsi/osd/osd_uld.c: In function 'osd_probe': drivers/scsi/osd/osd_uld.c:457:2: error: ignoring return value of 'scsi_device_get', declared with attribute warn_unused_result [-Werror=unused-

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

2017-04-19 Thread Dan Williams
On Wed, Apr 19, 2017 at 10:32 AM, Jerome Glisse wrote: > On Wed, Apr 19, 2017 at 10:01:23AM -0700, Dan Williams wrote: >> On Wed, Apr 19, 2017 at 9:48 AM, Logan Gunthorpe wrote: >> > >> > >> > On 19/04/17 09:55 AM, Jason Gunthorpe wrote: >> >> I was thinking only this one would be supported with

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

2017-04-19 Thread Jerome Glisse
On Wed, Apr 19, 2017 at 10:01:23AM -0700, Dan Williams wrote: > On Wed, Apr 19, 2017 at 9:48 AM, Logan Gunthorpe wrote: > > > > > > On 19/04/17 09:55 AM, Jason Gunthorpe wrote: > >> I was thinking only this one would be supported with a core code > >> helper.. > > > > Pivoting slightly: I was look

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

2017-04-19 Thread Jason Gunthorpe
On Wed, Apr 19, 2017 at 10:48:51AM -0600, Logan Gunthorpe wrote: > The pci_enable_p2p_bar function would then just need to call > devm_memremap_pages with the dma_map callback set to a function that > does the segment check and the offset calculation. I don't see a use for the dma_map function poi

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

2017-04-19 Thread Dan Williams
On Wed, Apr 19, 2017 at 9:48 AM, Logan Gunthorpe wrote: > > > On 19/04/17 09:55 AM, Jason Gunthorpe wrote: >> I was thinking only this one would be supported with a core code >> helper.. > > Pivoting slightly: I was looking at how HMM uses ZONE_DEVICE. They add a > type flag to the dev_pagemap str

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

2017-04-19 Thread Logan Gunthorpe
On 19/04/17 09:55 AM, Jason Gunthorpe wrote: > I was thinking only this one would be supported with a core code > helper.. Pivoting slightly: I was looking at how HMM uses ZONE_DEVICE. They add a type flag to the dev_pagemap structure which would be very useful to us. We could add another MEMORY

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

2017-04-19 Thread Jason Gunthorpe
On Wed, Apr 19, 2017 at 11:20:06AM +1000, Benjamin Herrenschmidt wrote: > That helper wouldn't perform the actual iommu mapping. It would simply > return something along the lines of: > > - "use that alternate bus address and don't map in the iommu" I was thinking only this one would be support

Re: RFC: drop the T10 OSD code and its users

2017-04-19 Thread Jens Axboe
On Wed, Apr 12 2017, Christoph Hellwig wrote: > The only real user of the T10 OSD protocol, the pNFS object layout > driver never went to the point of having shipping products, and the > other two users (osdblk and exofs) were simple example of it's usage. > > The code has been mostly unmaintained

Re: [PATCH] virtio_scsi: Always try to read VPD pages

2017-04-19 Thread Paolo Bonzini
On 13/04/2017 15:39, Stefan Hajnoczi wrote: > On Thu, Apr 13, 2017 at 12:13:00PM +1000, David Gibson wrote: >> @@ -705,6 +706,28 @@ static int virtscsi_device_reset(struct scsi_cmnd *sc) >> return virtscsi_tmf(vscsi, cmd); >> } >> >> +static int virtscsi_device_alloc(struct scsi_device *s

Re: [PATCH 26/27] scsi: sd: Separate zeroout and discard command choices

2017-04-19 Thread Paolo Bonzini
On 05/04/2017 19:21, Christoph Hellwig wrote: > +static ssize_t > +zeroing_mode_store(struct device *dev, struct device_attribute *attr, > +const char *buf, size_t count) > +{ > + struct scsi_disk *sdkp = to_scsi_disk(dev); > + > + if (!capable(CAP_SYS_ADMIN)) > +

Re: [PATCH 1/4] block: remove the osdblk driver

2017-04-19 Thread Boaz Harrosh
On 04/12/2017 07:01 PM, Christoph Hellwig wrote: > This was just a proof of concept user for the SCSI OSD library, and > never had any real users. > > Signed-off-by: Christoph Hellwig Yes please remove this driver ACK-by Boaz Harrosh > --- > drivers/block/Kconfig | 16 -- > drivers/block/M