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

2017-04-04 Thread kbuild test robot
Hi Hannes, [auto build test WARNING on scsi/for-next] [also build test WARNING on v4.11-rc5 next-20170404] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Hannes-Reinecke/scsi_error-count-medium

Re: [PATCH] sas: remove sas_domain_release_transport

2017-04-04 Thread Martin K. Petersen
Johannes Thumshirn writes: Johannes, > sas_domain_release_transport is unused since at least v3.13, remove > it. Applied to 4.12/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 2/2] qla2xxx: Fix typo in driver

2017-04-04 Thread Martin K. Petersen
Himanshu Madhani writes: > From: Milan P Gandhi > > Signed-off-by: Milan P Gandhi > Signed-off-by: Himanshu Madhani Applied to 4.12/scsi-queue. -- Martin K. Petersen Oracle Linux

Re: [PATCH 1/2] qla2xxx: Add fix to read correct register value for ISP82xx.

2017-04-04 Thread Martin K. Petersen
Himanshu Madhani writes: > Add fix to read correct register value for ISP82xx, during check for > register disconnect.ISP82xx has different base register. Applied to 4.11/scsi-fixes. -- Martin K. Petersen Oracle Linux Engineering

Re: problem with discard granularity in sd

2017-04-04 Thread Martin K. Petersen
David Buckley writes: David, > They result in discard granularity being forced to logical block size > if the disk reports LBPRZ is enabled (which the netapp luns do). Block zeroing and unmapping are currently sharing some plumbing and that has lead to some compromises.

Re: [PATCH] sd: close hole in > 2T device rejection when !CONFIG_LBDAF

2017-04-04 Thread Bart Van Assche
On Tue, 2017-04-04 at 19:35 -0400, Martin K. Petersen wrote: > diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c > index fb9b4d29af0b..6084c415c070 100644 > --- a/drivers/scsi/sd.c > +++ b/drivers/scsi/sd.c > @@ -2102,6 +2102,16 @@ static void read_capacity_error(struct scsi_disk > *sdkp, struct

Re: [PATCH] scsi: advansys: fix uninitialized data access

2017-04-04 Thread Martin K. Petersen
Arnd Bergmann writes: Arnd, > drivers/scsi/advansys.c: In function 'AscMsgOutSDTR': > drivers/scsi/advansys.c:3860:26: error: '*((void *)_buf+5)' may be used > uninitialized in this function [-Werror=maybe-uninitialized] > ((ushort)s_buffer[i + 1] << 8) | s_buffer[i]);

Re: [PATCH] qedf: Fix crash due to unsolicited FIP VLAN response.

2017-04-04 Thread Martin K. Petersen
"Dupuis, Chad" writes: Chad, > We need to initialize qedf->fipvlan_compl in __qedf_probe so that if > we receive an unsolicited FIP VLAN response, the system doesn't crash > due to trying to complete an uninitialized completion. > > Also add a check to see if there are

Re: [PATCH] sd: close hole in > 2T device rejection when !CONFIG_LBDAF

2017-04-04 Thread Martin K. Petersen
Bart Van Assche writes: Hi Bart, > Sorry but I still don't understand why the two checks are > different. How about the (untested) patch below? The approach below > avoids that the check is duplicated and - at least in my opinion - > results in code that is easier to

Re: [PATCH] scsi: ses: don't get power status of SES device slot on probe

2017-04-04 Thread Dan Williams
On Wed, Mar 29, 2017 at 6:02 PM, Mauricio Faria de Oliveira wrote: > The commit 08024885a2a3 ("ses: Add power_status to SES device slot") > introduced the 'power_status' attribute to enclosure components and > the associated callbacks. > > There are 2 callbacks

[lpfc 10/19] Remove hba lock from NVMET isssue WQE

2017-04-04 Thread Dick Kennedy
From: Dick Kennedy Unecessary lock is taken. ring lock should be sufficient Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_nvmet.c | 4 1 file changed, 4

[lpfc 14/19] Fix crash after issuing lip reset

2017-04-04 Thread Dick Kennedy
From: Dick Kennedy When RPI is not available, driver sends WQE with invalid RPI value and hence rej ected by HBA. lpfc :82:00.3: 1:3154 BLS ABORT RSP failed, data: x3/xa0320008 and lpfc :82:00.3: 1:(71):2753 PLOGI failure DID:FA

[lpfc 07/19] Fix driver usage of 128B WQEs when WQ_CREATE is V1.

2017-04-04 Thread Dick Kennedy
From: Dick Kennedy 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 and V0. Code inspection/instrumentation showed that the driver uses V0 in WQ_CREATE and if the caller

[lpfc 05/19] Fix driver unload/reload operation.

2017-04-04 Thread Dick Kennedy
From: Dick Kennedy Two issues: (1) driver could not be unloaded and reloaded without some Oops or Panic occurring. (2) The driver was panicking because of a corruption in the Memory Manager when the iocb list was getting allocated. Root cause for the memory

[lpfc 01/19] Fix advertised max_sgl_segment count for NVMET

2017-04-04 Thread Dick Kennedy
From: Dick Kennedy 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/lpfc/lpfc_nvmet.h | 4 +--- 3

[lpfc 17/19] Fix implicit logo and RSCN handling for NVMET

2017-04-04 Thread Dick Kennedy
From: Dick Kennedy Symptoms: 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).

[lpfc 13/19] Fix driver load issues when MRQ=8

2017-04-04 Thread Dick Kennedy
From: Dick Kennedy The symptom is that the driver will fail to login to the fabric. The reason is bacause it is out of iocb resources. This fix algins the number of MRQ resources with the total resources so that it can handle fabric events when needed.

[lpfc 09/19] Fix Kconfig defines.

2017-04-04 Thread Dick Kennedy
From: Dick Kennedy One of the idefs in the previous kconfig patch was not corrected. Also one alingment issue fixed. Signed-off-by: Dick Kennedy Signed-off-by: James Smart ---

[lpfc 06/19] Fix discovery error handling in NVME initiator

2017-04-04 Thread Dick Kennedy
From: Dick Kennedy performance lab running tests on upstream 4.10-rc5 POC and observing error during the NVME connect process. Here are the errors: Issue 1: The initiator is claiming the nvme_fc_unregister_remoteport upcall is not completing the unregister

[lpfc 18/19] Update ABORT processing for NVMET

2017-04-04 Thread Dick Kennedy
From: Dick Kennedy Missing code path, new NVME abort API The first lpfc driver with nvme had this routine stubbed. Signed-off-by: Dick Kennedy Signed-off-by: James Smart ---

[lpfc 02/19] Fixes after reviewing last set of patches. Minor fixes to previous patches

2017-04-04 Thread Dick Kennedy
From: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_attr.c| 6 +- drivers/scsi/lpfc/lpfc_debugfs.c | 14 --

[lpfc 03/19] Fix spelling in comments.

2017-04-04 Thread Dick Kennedy
From: Dick Kennedy 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

Re: [RFC 4/8] p2pmem: Add debugfs "stats" file

2017-04-04 Thread Logan Gunthorpe
On 04/04/17 04:46 AM, Sagi Grimberg wrote: > >> +p2pmem_debugfs_root = debugfs_create_dir("p2pmem", NULL); >> +if (!p2pmem_debugfs_root) >> +pr_info("could not create debugfs entry, continuing\n"); >> + > > Why continue? I think it'd be better to just fail it. Yup, agreed.

[lpfc 15/19] Fix max_sgl_segments settings for NVME / NVMET

2017-04-04 Thread Dick Kennedy
From: Dick Kennedy Cannot set these 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

[lpfc 16/19] Add Fabric assigned WWN support.

2017-04-04 Thread Dick Kennedy
From: Dick Kennedy 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 i n driver.

[lpfc 12/19] cannot establish connection with target that sends PRLI in PT2PT

2017-04-04 Thread Dick Kennedy
From: Dick Kennedy The driver does not accept PRLI from the target and this causes the target to reject the subsequent PRLI from the driver Fix: Accept the incoming PRLI so that the target can also accept the PRLI from the driver Signed-off-by: Dick

[lpfc 08/19] Fix nvme initiator handling when CONFIG_LPFC_NVME_INITIATOR is not enabled.

2017-04-04 Thread Dick Kennedy
From: Dick Kennedy With update nvme upstream driver sources, loading the driver with nvme enabled resulting in this Oops. Mar 6 10:09:55 NVME-init kernel: BUG: unable to handle kernel NULL pointer dere ference at 0018 Mar 6 10:09:55 NVME-init

[lpfc 19/19] lpfc revison 11.2.0.12

2017-04-04 Thread Dick Kennedy
From: Dick Kennedy 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

[lpfc 11/19] Add NVMET changes to interface with 4.11 kernel

2017-04-04 Thread Dick Kennedy
From: Dick Kennedy --- drivers/scsi/lpfc/lpfc_nvmet.c | 127 - drivers/scsi/lpfc/lpfc_nvmet.h | 7 ++- 2 files changed, 105 insertions(+), 29 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c

[lpfc 00/19] lpfc updates.

2017-04-04 Thread Dick Kennedy
This patch set includes patches to fix driver load/unload that have been partiallty submitted by other users. This patch set is supplying the abort handline for nvme that was missing. Dick Kennedy (19): Fix advertised max_sgl_segment count for NVMET Fixes after reviewing last set of

[lpfc 04/19] Fix PRLI ACC rsp for NVME

2017-04-04 Thread Dick Kennedy
From: Dick Kennedy PRLI ACC from target is FCP oriented Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_els.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [RFC 6/8] nvmet: Be careful about using iomem accesses when dealing with p2pmem

2017-04-04 Thread Logan Gunthorpe
On 04/04/17 04:59 AM, Sagi Grimberg wrote: > We can never ever get here from an IO command, and that is a good thing > because it would have been broken if we did, regardless of what copy > method we use... Yes, I changed this mostly for admin commands. I did notice connect commands do end up

Re: [RFC PATCH 0/2] block,scsi: support host-wide tagset

2017-04-04 Thread Hannes Reinecke
On 04/04/2017 05:59 PM, Ming Lei wrote: On Tue, Apr 4, 2017 at 8:07 PM, Hannes Reinecke wrote: Hi all, as discussed recently most existing HBAs have a host-wide tagset which does not map easily onto the per-queue tagset model of block mq. This patchset implements a flag

Re: [RFC PATCH 0/2] block,scsi: support host-wide tagset

2017-04-04 Thread Hannes Reinecke
On 04/04/2017 05:32 PM, Omar Sandoval wrote: On Tue, Apr 04, 2017 at 02:07:43PM +0200, Hannes Reinecke wrote: Hi all, as discussed recently most existing HBAs have a host-wide tagset which does not map easily onto the per-queue tagset model of block mq. This patchset implements a flag

Re: [RFC PATCH 0/2] block,scsi: support host-wide tagset

2017-04-04 Thread Bart Van Assche
On 04/04/2017 09:00 AM, Ming Lei wrote: > Just be curious, why is multi hard queue used for this case? Are there > some real cases in SCSI? Hello Ming, Yes, there is a real need for this. Background information is available in the following e-mail thread: Arun Easi, "scsi-mq - tag# and

Re: [RFC 3/8] nvmet: Use p2pmem in nvme target

2017-04-04 Thread Logan Gunthorpe
On 04/04/17 04:40 AM, Sagi Grimberg wrote: > Hey Logan, > >> We create a configfs attribute in each nvme-fabrics target port to >> enable p2p memory use. When enabled, the port will only then use the >> p2p memory if a p2p memory device can be found which is behind the >> same switch as the

Re: [RFC PATCH 0/2] block,scsi: support host-wide tagset

2017-04-04 Thread Ming Lei
On Tue, Apr 4, 2017 at 8:07 PM, Hannes Reinecke wrote: > Hi all, > > as discussed recently most existing HBAs have a host-wide tagset which > does not map easily onto the per-queue tagset model of block mq. > This patchset implements a flag BLK_MQ_F_GLOBAL_TAGS for block-mq, which >

Re: [RFC 2/8] cxgb4: setup pcie memory window 4 and create p2pmem region

2017-04-04 Thread Logan Gunthorpe
On 04/04/17 04:42 AM, Sagi Grimberg wrote: > This is weird, why even call this if !use_p2pmem? I personally find it cleaner than: if (use_p2pmem) setup_memwin_p2pmem(...) I'm not sure why that's so weird. Logan

Re: [RFC 6/8] nvmet: Be careful about using iomem accesses when dealing with p2pmem

2017-04-04 Thread Jason Gunthorpe
On Tue, Apr 04, 2017 at 01:59:26PM +0300, Sagi Grimberg wrote: > Note that the nvme completion queues are still on the host memory, so > this means we have lost the ordering between data and completions as > they go to different pcie targets. Hmm, in this simple up/down case with a switch, I

Re: [RFC PATCH 0/2] block,scsi: support host-wide tagset

2017-04-04 Thread Bart Van Assche
On Tue, 2017-04-04 at 08:32 -0700, Omar Sandoval wrote: > blk-mq already supports a shared tagset, and scsi-mq already uses that. > When we initialize a request queue, we add it to a tagset with > blk_mq_add_queue_set(), where we automatically mark the tagset as shared > if there is more than one

Re: [RFC PATCH 0/2] block,scsi: support host-wide tagset

2017-04-04 Thread Omar Sandoval
On Tue, Apr 04, 2017 at 02:07:43PM +0200, Hannes Reinecke wrote: > Hi all, > > as discussed recently most existing HBAs have a host-wide tagset which > does not map easily onto the per-queue tagset model of block mq. > This patchset implements a flag BLK_MQ_F_GLOBAL_TAGS for block-mq, which >

[PATCHv5 5/8] scsi: make eh_eflags persistent

2017-04-04 Thread Hannes Reinecke
If a failed command is retried and fails again we need to enter SCSI EH, otherwise we will never be able to recover the command. To detect this situation we must not clear scmd->eh_eflags when EH finishes but rather make it persistent throughout the lifetime of the command. Reviewed-by: Benjamin

[PATCHv5 2/8] sd: Return SUCCESS in sd_eh_action() after device offline

2017-04-04 Thread Hannes Reinecke
If sd_eh_action() decides to take the device offline there is no point in returning FAILED, as taking the device offline is the ultimate step in SCSI EH anyway. So further escalation via SCSI EH is not likely to make a difference and we can as well return SUCCESS. Cc: Benjamin Block

[PATCHv5 1/8] scsi_error: count medium access timeout only once per EH run

2017-04-04 Thread Hannes Reinecke
The current medium access timeout counter will be increased for each command, so if there are enough failed commands we'll hit the medium access timeout for even a single device failure and the following kernel message is displayed: sd H:C:T:L: [sdXY] Medium access timeout failure. Offlining

[PATCHv5 6/8] scsi: make scsi_eh_scmd_add() always succeed

2017-04-04 Thread Hannes Reinecke
scsi_eh_scmd_add() currently only will fail if no error handler thread is started (which will never be the case) or if the state machine encounters an illegal transition. But if we're encountering an invalid state transition chances is we cannot fixup things with the error handler. So better add

[PATCHv5 8/8] scsi: inline command aborts

2017-04-04 Thread Hannes Reinecke
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. Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi.c | 2 -- drivers/scsi/scsi_error.c | 80

[PATCHv5 4/8] libsas: allow async aborts

2017-04-04 Thread Hannes Reinecke
From: Christoph Hellwig We now first try to call ->eh_abort_handler from a work queue, but libsas was always failing that for no good reason. Allow async aborts. Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Christoph

[PATCHv5 7/8] scsi: make asynchronous aborts mandatory

2017-04-04 Thread Hannes Reinecke
There hasn't been any reports for HBAs where asynchronous abort would not work, so we should make it mandatory and remove the fallback. Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche ---

[PATCHv5 0/8] SCSI EH cleanup

2017-04-04 Thread Hannes Reinecke
Hi all, this is a resend of a small patchset for cleaning up SCSI EH. Primary goal is to make asynchronous aborts mandatory; there hasn't been a single report so far where asynchronous abort won't work, so the 'no_async_abort' flag has never been used and will be removed with this patchset.

[PATCHv5 3/8] scsi: always send command aborts

2017-04-04 Thread Hannes Reinecke
When a command has timed out we always should be sending an abort; with the previous code a failed abort might signal SCSI EH to start, and all other timed out commands will never be aborted, even though they might belong to a different ITL nexus. Cc: Benjamin Block

Re: [PATCHv4 1/8] scsi_error: count medium access timeout only once per EH run

2017-04-04 Thread Christoph Hellwig
NAK - don't overload ->eh_action for two entirely different purposes.

[PATCHv4 6/8] scsi: make scsi_eh_scmd_add() always succeed

2017-04-04 Thread Hannes Reinecke
scsi_eh_scmd_add() currently only will fail if no error handler thread is started (which will never be the case) or if the state machine encounters an illegal transition. But if we're encountering an invalid state transition chances is we cannot fixup things with the error handler. So better add

[PATCHv4 8/8] scsi: inline command aborts

2017-04-04 Thread Hannes Reinecke
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. Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi.c | 2 -- drivers/scsi/scsi_error.c | 80

[PATCHv4 4/8] libsas: allow async aborts

2017-04-04 Thread Hannes Reinecke
From: Christoph Hellwig We now first try to call ->eh_abort_handler from a work queue, but libsas was always failing that for no good reason. Allow async aborts. Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Christoph

[PATCHv4 5/8] scsi: make eh_eflags persistent

2017-04-04 Thread Hannes Reinecke
If a failed command is retried and fails again we need to enter SCSI EH, otherwise we will never be able to recover the command. To detect this situation we must not clear scmd->eh_eflags when EH finishes but rather make it persistent throughout the lifetime of the command. Reviewed-by: Benjamin

[PATCHv4 0/8]

2017-04-04 Thread Hannes Reinecke
Hi all, this is a resend of a small patchset for cleaning up SCSI EH. Primary goal is to make asynchronous aborts mandatory; there hasn't been a single report so far where asynchronous abort won't work, so the 'no_async_abort' flag has never been used and will be removed with this patchset.

[PATCHv4 2/8] sd: Return SUCCESS in sd_eh_action() after device offline

2017-04-04 Thread Hannes Reinecke
If sd_eh_action() decides to take the device offline there is no point in returning FAILED, as taking the device offline is the ultimate step in SCSI EH anyway. So further escalation via SCSI EH is not likely to make a difference and we can as well return SUCCESS. Cc: Benjamin Block

[PATCHv4 1/8] scsi_error: count medium access timeout only once per EH run

2017-04-04 Thread Hannes Reinecke
The current medium access timeout counter will be increased for each command, so if there are enough failed commands we'll hit the medium access timeout for even a single device failure and the following kernel message is displayed: sd H:C:T:L: [sdXY] Medium access timeout failure. Offlining

[PATCHv4 3/8] scsi: always send command aborts

2017-04-04 Thread Hannes Reinecke
When a command has timed out we always should be sending an abort; with the previous code a failed abort might signal SCSI EH to start, and all other timed out commands will never be aborted, even though they might belong to a different ITL nexus. Cc: Benjamin Block

[PATCHv4 7/8] scsi: make asynchronous aborts mandatory

2017-04-04 Thread Hannes Reinecke
There hasn't been any reports for HBAs where asynchronous abort would not work, so we should make it mandatory and remove the fallback. Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche ---

[PATCH 1/2] block: Implement global tagset

2017-04-04 Thread Hannes Reinecke
Most legacy HBAs have a tagset per HBA, not per queue. To map these devices onto block-mq this patch implements a new tagset flag BLK_MQ_F_GLOBAL_TAGS, which will cause the tag allocator to use just one tagset for all hardware queues. Signed-off-by: Hannes Reinecke ---

[RFC PATCH 0/2] block,scsi: support host-wide tagset

2017-04-04 Thread Hannes Reinecke
Hi all, as discussed recently most existing HBAs have a host-wide tagset which does not map easily onto the per-queue tagset model of block mq. This patchset implements a flag BLK_MQ_F_GLOBAL_TAGS for block-mq, which enables the use of a shared tagset for all hardware queues. The second patch

[PATCH 2/2] scsi: Add template flag 'host_tagset'

2017-04-04 Thread Hannes Reinecke
Add a host template flag 'host_tagset' to enable the use of a global tagmap for block-mq. Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_lib.c | 2 ++ include/scsi/scsi_host.h | 5 + 2 files changed, 7 insertions(+) diff --git a/drivers/scsi/scsi_lib.c

Re: [REGRESSION] v4.11-rc3: lpfc: panic during module removal / shutdown

2017-04-04 Thread Mauricio Faria de Oliveira
Hi Martin and Junichi, On 04/03/2017 11:10 PM, Junichi Nomura wrote: On 04/04/17 06:53, Mauricio Faria de Oliveira wrote: On 03/28/2017 11:29 PM, Junichi Nomura wrote: Since commit 895427bd012c ("scsi: lpfc: NVME Initiator: Base modifications"), "rmmod lpfc" starting to cause panic or

Re: [PATCH] sas: remove sas_domain_release_transport

2017-04-04 Thread Hannes Reinecke
On 04/03/2017 04:32 PM, Johannes Thumshirn wrote: > sas_domain_release_transport is unused since at least v3.13, remove it. > > Signed-off-by: Johannes Thumshirn > --- > drivers/scsi/libsas/sas_init.c | 7 --- > include/scsi/libsas.h | 1 - > 2 files changed, 8

Re: [RFC 6/8] nvmet: Be careful about using iomem accesses when dealing with p2pmem

2017-04-04 Thread Sagi Grimberg
u16 nvmet_copy_to_sgl(struct nvmet_req *req, off_t off, const void *buf, size_t len) { - if (sg_pcopy_from_buffer(req->sg, req->sg_cnt, buf, len, off) != len) + bool iomem = req->p2pmem; + size_t ret; + + ret = sg_copy_buffer(req->sg, req->sg_cnt, (void

Re: [RFC 4/8] p2pmem: Add debugfs "stats" file

2017-04-04 Thread Sagi Grimberg
+ p2pmem_debugfs_root = debugfs_create_dir("p2pmem", NULL); + if (!p2pmem_debugfs_root) + pr_info("could not create debugfs entry, continuing\n"); + Why continue? I think it'd be better to just fail it. Besides, this can be safely squashed into patch 1.

Re: [RFC 2/8] cxgb4: setup pcie memory window 4 and create p2pmem region

2017-04-04 Thread Sagi Grimberg
+static void setup_memwin_p2pmem(struct adapter *adap) +{ + unsigned int mem_base = t4_read_reg(adap, CIM_EXTMEM2_BASE_ADDR_A); + unsigned int mem_size = t4_read_reg(adap, CIM_EXTMEM2_ADDR_SIZE_A); + + if (!use_p2pmem) + return; This is weird, why even call

Re: [RFC 3/8] nvmet: Use p2pmem in nvme target

2017-04-04 Thread Sagi Grimberg
Hey Logan, We create a configfs attribute in each nvme-fabrics target port to enable p2p memory use. When enabled, the port will only then use the p2p memory if a p2p memory device can be found which is behind the same switch as the RDMA port and all the block devices in use. If the user

Re: [PATCH] csiostor: switch to pci_alloc_irq_vectors

2017-04-04 Thread Varun Prakash
On Tue, Apr 04, 2017 at 08:46:14AM +0200, Christoph Hellwig wrote: > Does this one work better? > csiostor driver is triggering following warning during module unload. WARNING: CPU: 8 PID: 20636 at kernel/irq/manage.c:1480 __free_irq+0xa6/0x2b0 Trying to free already-free IRQ 53 CPU: 8 PID:

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

2017-04-04 Thread Christoph Hellwig
I'm planning to introduce new block-layer specific status code ASAP, so I'd prefer not to add new errno special cases. I'll port your patches to the new code and will send them out with my series in a few days, though.

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

2017-04-04 Thread Christoph Hellwig
On Tue, Apr 04, 2017 at 12:23:19PM +0530, Mahesh Rajashekhara wrote: > +#if defined(CONFIG_ARM64) > +static inline void * > +aac_pci_alloc_consistent(struct pci_dev *hwdev, size_t size, > + dma_addr_t *dma_handle) { > + return dma_alloc_coherent(hwdev == NULL ? NULL : >dev, >

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

2017-04-04 Thread Mahesh Rajashekhara
There were pci_alloc_consistent() failures on ARM64 platform. Use dma_alloc_coherent() with GFP_KERNEL flag DMA memory allocations. Signed-off-by: Mahesh Rajashekhara --- drivers/scsi/aacraid/aachba.c | 13 + drivers/scsi/aacraid/aacraid.h | 22

Re: [PATCH v2] scsi: storvsc: Add support for FC rport.

2017-04-04 Thread Christoph Hellwig
On Mon, Apr 03, 2017 at 09:14:02AM -0400, Cathy Avery wrote: > On 04/03/2017 08:17 AM, Christoph Hellwig wrote: > > > if (host->transportt == fc_transport_template) { > > > + struct fc_rport_identifiers ids = { > > > + .roles = FC_PORT_ROLE_FCP_TARGET, > > > +

Re: [PATCH] csiostor: switch to pci_alloc_irq_vectors

2017-04-04 Thread Christoph Hellwig
Does this one work better? --- >From e5a4178cb810be581b6d9b8f48f13b12e88eae74 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Thu, 12 Jan 2017 11:17:29 +0100 Subject: csiostor: switch to pci_alloc_irq_vectors And get automatic MSI-X affinity for free. Signed-off-by: