Re: [PATCH 01/12] iommu-common: move to arch/sparc

2018-04-16 Thread Anshuman Khandual
On 04/16/2018 07:28 PM, David Miller wrote: > From: Anshuman Khandual > Date: Mon, 16 Apr 2018 14:26:07 +0530 > >> On 04/15/2018 08:29 PM, Christoph Hellwig wrote: >>> This code is only used by sparc, and all new iommu drivers should use the >>> drivers/iommu/

[PATCH 1/2] lightnvm: pblk: only try to recover lines with written smeta

2018-04-16 Thread Hans Holmberg
From: Hans Holmberg When switching between different lun configurations, there is no guarantee that all lines that contain closed/open chunks have some valid data to recover. Check that the smeta chunk has been written to instead. Also skip bad lines (that does not

[PATCH 2/2] lightnvm: pblk: kick writer on new flush points

2018-04-16 Thread Hans Holmberg
From: Hans Holmberg Unless we kick the writer directly when setting a new flush point, the user risks having to wait for up to one second (the default timeout for the write thread to be kicked) for the IO to complete. Signed-off-by: Hans Holmberg

[PATCH 0/2] pblk bugfixes

2018-04-16 Thread Hans Holmberg
From: Hans Holmberg This is a couple of bugfixes, nothing very urgent. Hans Holmberg (2): lightnvm: pblk: only try to recover lines with written smeta lightnvm: pblk: kick writer on new flush points drivers/lightnvm/pblk-cache.c| 10 ++

Re: [RESEND PATCH v1 1/2] trace: events: scsi: Add tag in SCSI trace events

2018-04-16 Thread Bart Van Assche
On Mon, 2018-04-16 at 09:41 -0700, Rajat Jain wrote: > On Mon, Apr 16, 2018 at 8:28 AM, Steven Rostedt wrote: > > On Mon, 16 Apr 2018 14:31:49 + > > "Bean Huo (beanhuo)" wrote: > > > > > Print the request tag along with other information > > > while

Re: [PATCH 2/2] tracing/events: block: dev_t via driver core for plug and unplug events

2018-04-16 Thread Steffen Maier
Hi Greg, On 04/15/2018 10:31 AM, Greg Kroah-Hartman wrote: On Fri, Apr 13, 2018 at 03:07:18PM +0200, Steffen Maier wrote: Complements v2.6.31 commit 55782138e47d ("tracing/events: convert block trace points to TRACE_EVENT()") to be equivalent to traditional blktrace output. Also this allows

Re: [RESEND PATCH v1 1/2] trace: events: scsi: Add tag in SCSI trace events

2018-04-16 Thread Bean Huo (beanhuo)
Hi, Bart >On Mon, 2018-04-16 at 09:41 -0700, Rajat Jain wrote: >> On Mon, Apr 16, 2018 at 8:28 AM, Steven Rostedt >wrote: >> > On Mon, 16 Apr 2018 14:31:49 + >> > "Bean Huo (beanhuo)" wrote: >> > >> > > Print the request tag along with other

Re: [RESEND PATCH v1 1/2] trace: events: scsi: Add tag in SCSI trace events

2018-04-16 Thread Rajat Jain
On Mon, Apr 16, 2018 at 8:28 AM, Steven Rostedt wrote: > On Mon, 16 Apr 2018 14:31:49 + > "Bean Huo (beanhuo)" wrote: > >> Print the request tag along with other information >> while tracing a command. >> >> Signed-off-by: Bean Huo

Re: [RESEND PATCH v1 1/2] trace: events: scsi: Add tag in SCSI trace events

2018-04-16 Thread Bart Van Assche
On 04/16/18 10:05, Bean Huo (beanhuo) wrote: On Mon, 2018-04-16 at 09:41 -0700, Rajat Jain wrote: On Mon, Apr 16, 2018 at 8:28 AM, Steven Rostedt wrote: On Mon, 16 Apr 2018 14:31:49 + "Bean Huo (beanhuo)" wrote: Print the request tag along with

[RESEND PATCH v1 1/2] trace: events: scsi: Add tag in SCSI trace events

2018-04-16 Thread Bean Huo (beanhuo)
Print the request tag along with other information while tracing a command. Signed-off-by: Bean Huo --- include/trace/events/scsi.h | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/include/trace/events/scsi.h

Re: [RESEND PATCH v1 1/2] trace: events: scsi: Add tag in SCSI trace events

2018-04-16 Thread Steven Rostedt
On Mon, 16 Apr 2018 14:31:49 + "Bean Huo (beanhuo)" wrote: > Print the request tag along with other information > while tracing a command. > > Signed-off-by: Bean Huo > --- I don't see any issue with the tracing part. Acked-by: Steven Rostedt

[RESEND PATCH v1 0/2] Print the request tag in Block/SCSI trace events

2018-04-16 Thread Bean Huo (beanhuo)
These patches are to add the printout of the request tag in Block/SCSI trace events when tracing one request or command, this is very useful for tracing the task running status in the storage device which supports multiple command queue. As for the first patch " Add tag in SCSI trace events",

Re: [RESEND PATCH v1 2/2] trace: events: block: Add tag in block trace events

2018-04-16 Thread Steven Rostedt
On Mon, 16 Apr 2018 14:33:29 + "Bean Huo (beanhuo)" wrote: > Print the request tag along with other information in block trace events > when tracing request , and unplug type (Sync / Async). > > Signed-off-by: Bean Huo I don't see any issue with the

Re: [PATCH 01/12] iommu-common: move to arch/sparc

2018-04-16 Thread David Miller
From: Anshuman Khandual Date: Mon, 16 Apr 2018 14:26:07 +0530 > On 04/15/2018 08:29 PM, Christoph Hellwig wrote: >> This code is only used by sparc, and all new iommu drivers should use the >> drivers/iommu/ framework. Also remove the unused exports. >> >>

Re: [PATCH V4 0/2] blk-mq: fix race between completion and BLK_EH_RESET_TIMER

2018-04-16 Thread Martin Steigerwald
Ming Lei - 16.04.18, 02:45: > On Sun, Apr 15, 2018 at 06:31:44PM +0200, Martin Steigerwald wrote: > > Hi Ming. > > > > Ming Lei - 15.04.18, 17:43: > > > Hi Jens, > > > > > > This two patches fixes the recently discussed race between > > > completion > > > and BLK_EH_RESET_TIMER. > > > > > >

Re: [PATCH 08/12] mmc: reduce use of block bounce buffers (fwd)

2018-04-16 Thread Julia Lawall
g, linux-s...@vger.kernel.org, net...@vger.kernel.org CC: linux-ker...@vger.kernel.org Hi Christoph, I love your patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.17-rc1 next-20180416] [if your patch is applied to the wrong git tree,

Re: usercopy whitelist woe in scsi_sense_cache

2018-04-16 Thread Kees Cook
On Thu, Apr 12, 2018 at 8:02 PM, Kees Cook wrote: > On Thu, Apr 12, 2018 at 3:47 PM, Kees Cook wrote: >> After fixing up some build issues in the middle of the 4.16 cycle, I >> get an unhelpful bisect result of commit 0a4b6e2f80aa ("Merge branch >>

Re: [RESEND PATCH v1 1/2] trace: events: scsi: Add tag in SCSI trace events

2018-04-16 Thread Bart Van Assche
On Mon, 2018-04-16 at 20:27 +, Bean Huo (beanhuo) wrote: > By the way, these patches are not to add new feature, they are just to > add print tag along with the other exist printed request parameters. Are you aware that there are two tag fields in struct request, namely "tag" and

Re: [RESEND PATCH v1 1/2] trace: events: scsi: Add tag in SCSI trace events

2018-04-16 Thread Bean Huo (beanhuo)
>>> This patch is not acceptable because it adds support for tag tracing >>> to the legacy block layer only. Any patch that adds a new feature to >>> the legacy block layer must also add it to blk-mq. >>> >> To be honest, I don't understand your point, can you give me more >explanation? > >The

Re: [PATCH] lightnvm: pblk: add CNEX Granby to the pblk device list

2018-04-16 Thread Matias Bjørling
On 4/16/18 11:19 AM, Wei Xu wrote: Add a new lightnvm quirk to identify CNEX’s Granby controller. Signed-off-by: Wei Xu --- drivers/nvme/host/pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index

[PATCH] blktests: regression test "block: do not use interruptible wait anywhere"

2018-04-16 Thread Alan Jenkins
> Without this fix, I get an IO error in this test: > > # dd if=/dev/sda of=/dev/null iflag=direct & \ > while killall -SIGUSR1 dd; do sleep 0.1; done & \ > echo mem > /sys/power/state ; \ > sleep 5; killall dd # stop after 5 seconds linux-block insisted they wanted this, based on my

[PATCH] blktests: regression test "block: do not use interruptible wait anywhere"

2018-04-16 Thread Alan Jenkins
> Without this fix, I get an IO error in this test: > > # dd if=/dev/sda of=/dev/null iflag=direct & \ > while killall -SIGUSR1 dd; do sleep 0.1; done & \ > echo mem > /sys/power/state ; \ > sleep 5; killall dd # stop after 5 seconds linux-block insisted they wanted this, based on my

Re: [RESEND PATCH v1 1/2] trace: events: scsi: Add tag in SCSI trace events

2018-04-16 Thread Steven Rostedt
On Mon, 16 Apr 2018 21:30:54 + Bart Van Assche wrote: > Hello Steve, > > The tool I'm most concerned about is blktrace. I'm not sure though how this > tool receives event data from the block layer core. Yeah, blktrace is "special", it looks like it registers its

Re: [RESEND PATCH v1 1/2] trace: events: scsi: Add tag in SCSI trace events

2018-04-16 Thread Bart Van Assche
On Mon, 2018-04-16 at 14:31 +, Bean Huo (beanhuo) wrote: > TP_printk("host_no=%u channel=%u id=%u lun=%u data_sgl=%u prot_sgl=%u" \ > - " prot_op=%s cmnd=(%s %s raw=%s)", > + " prot_op=%s tag=%d cmnd=(%s %s raw=%s)", > > [ ... ] > TP_printk("host_no=%u

Re: [RESEND PATCH v1 2/2] trace: events: block: Add tag in block trace events

2018-04-16 Thread Bart Van Assche
On Mon, 2018-04-16 at 14:33 +, Bean Huo (beanhuo) wrote: > [ ... ] > - TP_printk("%d,%d %s (%s) %llu + %u [%d]", > + TP_printk("%d,%d %s (%s) %llu + %u tag=%d [%d]", > [ ... ] > - TP_printk("%d,%d %s (%s) %llu + %u [%d]", > + TP_printk("%d,%d %s (%s) %llu + %u tag=%d [%d]", > [

Re: [RESEND PATCH v1 1/2] trace: events: scsi: Add tag in SCSI trace events

2018-04-16 Thread Bean Huo (beanhuo)
Hi, Bart >mi...@redhad.com; linux-block@vger.kernel.org; raja...@google.com >Subject: [EXT] Re: [RESEND PATCH v1 1/2] trace: events: scsi: Add tag in SCSI >trace events > >On Mon, 2018-04-16 at 14:31 +, Bean Huo (beanhuo) wrote: >> TP_printk("host_no=%u channel=%u id=%u lun=%u

Re: [RESEND PATCH v1 1/2] trace: events: scsi: Add tag in SCSI trace events

2018-04-16 Thread Bart Van Assche
On Mon, 2018-04-16 at 21:10 +, Bean Huo (beanhuo) wrote: > Hi, Bart > > > mi...@redhad.com; linux-block@vger.kernel.org; raja...@google.com > > Subject: [EXT] Re: [RESEND PATCH v1 1/2] trace: events: scsi: Add tag in > > SCSI > > trace events > > > > On Mon, 2018-04-16 at 14:31 +, Bean

Re: [RESEND PATCH v1 1/2] trace: events: scsi: Add tag in SCSI trace events

2018-04-16 Thread Steven Rostedt
On Mon, 16 Apr 2018 20:49:12 + Bart Van Assche wrote: > Which tools process these strings? Has it been verified whether or not > the tools that process these strings still work fine with this patch > applied? Ideally, tools shouldn't process trace event strings, but

Re: [RESEND PATCH v1 1/2] trace: events: scsi: Add tag in SCSI trace events

2018-04-16 Thread Bart Van Assche
On Mon, 2018-04-16 at 17:24 -0400, Steven Rostedt wrote: > On Mon, 16 Apr 2018 20:49:12 + > Bart Van Assche wrote: > > > Which tools process these strings? Has it been verified whether or not > > the tools that process these strings still work fine with this patch > >

[PATCH v2 4/4] bcache: fix I/O significant decline while backend devices registering

2018-04-16 Thread tang . junhui
From: Tang Junhui I attached several backend devices in the same cache set, and produced lots of dirty data by running small rand I/O writes in a long time, then I continue run I/O in the others cached devices, and stopped a cached device, after a mean while, I register

[PATCH v2 0/4] bcache: incremental GC and dirty data init

2018-04-16 Thread tang . junhui
Hi maintainers and folks, Some patches of this patch set have been sent before, they are not merged yet, and I add two new patches to solve some issues I found while testing. since They are interdependent, so I make a patch set and resend them. [PATCH 1/4] bcache: finish incremental GC [PATCH

[PATCH v2 3/4] bcache: notify allocator to prepare for GC

2018-04-16 Thread tang . junhui
From: Tang Junhui Since no new bucket can be allocated during GC, and front side I/Os would run out of all the buckets, so notify allocator to pack the free_inc queue full of buckets before GC, then we could have enough buckets for front side I/Os during GC period. The

[PATCH v2 2/4] bcache: calculate the number of incremental GC nodes according to the total of btree nodes

2018-04-16 Thread tang . junhui
From: Tang Junhui This patch base on "[PATCH] bcache: finish incremental GC". Since incremental GC would stop 100ms when front side I/O comes, so when there are many btree nodes, if GC only processes constant (100) nodes each time, GC would last a long time, and the

[PATCH v2 1/4] bcache: finish incremental GC

2018-04-16 Thread tang . junhui
From: Tang Junhui In GC thread, we record the latest GC key in gc_done, which is expected to be used for incremental GC, but in currently code, we didn't realize it. When GC runs, front side IO would be blocked until the GC over, it would be a long time if there is a lot

Re: [PATCH v2] block: ratelimite pr_err on IO path

2018-04-16 Thread Jinpu Wang
On Fri, Apr 13, 2018 at 6:59 PM, Martin K. Petersen wrote: > > Jinpu, > > [CC:ed the mpt3sas maintainers] > > The ratelimit patch is just an attempt to treat the symptom, not the > cause. Agree. If we can fix the root cause, it will be great. > >> Thanks for asking, we

Re: [PATCH] blk-mq: mark hctx RESTART when get budget fails

2018-04-16 Thread Ming Lei
On Mon, Apr 16, 2018 at 03:55:36PM +0800, Jianchao Wang wrote: > When get budget fails, blk_mq_sched_dispatch_requests does not do > anything to ensure the hctx to be restarted. We can survive from > this, because only the scsi implements .get_budget and it always > runs the hctx queues when

Re: [PATCH v2 1/4] bcache: finish incremental GC

2018-04-16 Thread Coly Li
On 2018/4/16 2:33 PM, tang.jun...@zte.com.cn wrote: > From: Tang Junhui > > In GC thread, we record the latest GC key in gc_done, which is expected > to be used for incremental GC, but in currently code, we didn't realize > it. When GC runs, front side IO would be blocked

[PATCH] blk-mq: mark hctx RESTART when get budget fails

2018-04-16 Thread Jianchao Wang
When get budget fails, blk_mq_sched_dispatch_requests does not do anything to ensure the hctx to be restarted. We can survive from this, because only the scsi implements .get_budget and it always runs the hctx queues when request is completed. Signed-off-by: Jianchao Wang

Re: [PATCH] blk-mq: mark hctx RESTART when get budget fails

2018-04-16 Thread jianchao.wang
Hi Ming Thanks for your kindly response. On 04/16/2018 04:15 PM, Ming Lei wrote: >> -if (!blk_mq_get_dispatch_budget(hctx)) >> +if (!blk_mq_get_dispatch_budget(hctx)) { >> +blk_mq_sched_mark_restart_hctx(hctx); > The RESTART flag still may not take

[PATCH] blk-mq: start request gstate with gen 1

2018-04-16 Thread Jianchao Wang
rq->gstate and rq->aborted_gstate both are zero before rqs are allocated. If we have a small timeout, when the timer fires, there could be rqs that are never allocated, and also there could be rq that has been allocated but not initialized and started. At the moment, the rq->gstate and

Re: [PATCH V4 0/2] blk-mq: fix race between completion and BLK_EH_RESET_TIMER

2018-04-16 Thread jianchao.wang
Hi bart Thanks for your kindly response. I have sent out the patch. Please refer to https://marc.info/?l=linux-block=152393666517449=2 Thanks Jianchao On 04/17/2018 08:15 AM, Bart Van Assche wrote: > On Tue, 2018-04-17 at 00:04 +0800, jianchao.wang wrote: >> diff --git a/block/blk-mq.c

Re: [PATCH v2 00/10] SWIM driver fixes

2018-04-16 Thread Jens Axboe
On Tue, Apr 17 2018, Finn Thain wrote: > On Wed, 11 Apr 2018, I wrote: > > > This patch series has fixes for bugs in the SWIM floppy disk controller > > driver, including an oops and a soft lockup. > > > > Apparently no-one is authorized to push this series intact. > > Geert, would you please

Re: [PATCH] blk-mq: start request gstate with gen 1

2018-04-16 Thread Jens Axboe
On 4/16/18 9:46 PM, Jianchao Wang wrote: > rq->gstate and rq->aborted_gstate both are zero before rqs are > allocated. If we have a small timeout, when the timer fires, > there could be rqs that are never allocated, and also there could > be rq that has been allocated but not initialized and

Re: [PATCH] blk-mq: start request gstate with gen 1

2018-04-16 Thread Ming Lei
On Tue, Apr 17, 2018 at 11:46:20AM +0800, Jianchao Wang wrote: > rq->gstate and rq->aborted_gstate both are zero before rqs are > allocated. If we have a small timeout, when the timer fires, > there could be rqs that are never allocated, and also there could > be rq that has been allocated but not

Re: [PATCH v2 00/10] SWIM driver fixes

2018-04-16 Thread Finn Thain
On Wed, 11 Apr 2018, I wrote: > This patch series has fixes for bugs in the SWIM floppy disk controller > driver, including an oops and a soft lockup. > Apparently no-one is authorized to push this series intact. Geert, would you please take just the first two patches? Jens, would you please

Re: [PATCH V4 0/2] blk-mq: fix race between completion and BLK_EH_RESET_TIMER

2018-04-16 Thread Bart Van Assche
On Tue, 2018-04-17 at 00:04 +0800, jianchao.wang wrote: > diff --git a/block/blk-mq.c b/block/blk-mq.c > index 16e83e6..be9b435 100644 > --- a/block/blk-mq.c > +++ b/block/blk-mq.c > @@ -2077,6 +2077,7 @@ static int blk_mq_init_request(struct blk_mq_tag_set > *set, struct request *rq, > >

[PATCH] block: Avoid executing a report or reset zones while a queue is frozen

2018-04-16 Thread Bart Van Assche
This patch on itself does not change the behavior of either ioctl. However, this patch is necessary to avoid that these ioctls fail with -EIO if sd_revalidate_disk() is called while these ioctls are in progress because the current zoned block command code temporarily clears data that is needed by

Re: [PATCH 08/12] mmc: reduce use of block bounce buffers

2018-04-16 Thread Robin Murphy
On 16/04/18 09:50, Christoph Hellwig wrote: We can rely on the dma-mapping code to handle any DMA limits that is bigger than the ISA DMA mask for us (either using an iommu or swiotlb), so remove setting the block layer bounce limit for anything but bouncing for highmem pages. Signed-off-by:

[PATCH 09/12] ide: kill ide_toggle_bounce

2018-04-16 Thread Christoph Hellwig
ide_toggle_bounce did select various strange block bounce limits, including not bouncing at all as soon as an iommu is present in the system. Given that the dma_map routines now handle any required bounce buffering except for ISA DMA, and the ide code already must handle either ISA DMA or highmem

[PATCH 10/12] ide: remove the PCI_DMA_BUS_IS_PHYS check

2018-04-16 Thread Christoph Hellwig
We now have ways to deal with drainage in the block layer, and libata has been using it for ages. We also want to get rid of PCI_DMA_BUS_IS_PHYS now, so just reduce the PCI transfer size for ide - anyone who cares for performance on PCI controllers should have switched to libata long ago.

[PATCH 12/12] PCI: remove PCI_DMA_BUS_IS_PHYS

2018-04-16 Thread Christoph Hellwig
This was used by the ide, scsi and networking code in the past to determine if they should bounce payloads. Now that the dma mapping always have to support dma to all physical memory (thanks to swiotlb for non-iommu systems) there is no need to this crude hack any more. Signed-off-by: Christoph

[PATCH 11/12] net: remove the PCI_DMA_BUS_IS_PHYS check in illegal_highdma

2018-04-16 Thread Christoph Hellwig
These days the dma mapping routines must be able to handle any address supported by the device, be that using an iommu, or swiotlb if none is supported. With that the PCI_DMA_BUS_IS_PHYS check in illegal_highdma is not needed and can be removed. Signed-off-by: Christoph Hellwig ---

remove PCI_DMA_BUS_IS_PHYS

2018-04-16 Thread Christoph Hellwig
Hi all, this series tries to get rid of the global and PCI_DMA_BUS_IS_PHYS flag, which causes the block layer and networking code to bounce buffer memory above the dma mask in some cases. It is a leftover from i386 + highmem days and is obsolete now that we have swiotlb or iommus so that the dma

[PATCH 02/12] storsvc: don't set a bounce limit

2018-04-16 Thread Christoph Hellwig
The default already is to never bounce, so the call is a no-op. Signed-off-by: Christoph Hellwig --- drivers/scsi/storvsc_drv.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 8c51d628b52e..5f2d177c3bd9 100644 ---

Re: [PATCH] bcache: not access dc->bdev when backing device is offline

2018-04-16 Thread tang . junhui
Hi Coly, >When backing device is offline, memory object pointed by dc->bdev might be >released in some condititions. I have bug report that bdevname() triggers >a NULL pointer deference panic inside bch_cached_dev_error(), where >dc->bdev is NULL. > >This patch adds char

Re: [PATCH 01/12] iommu-common: move to arch/sparc

2018-04-16 Thread Anshuman Khandual
On 04/15/2018 08:29 PM, Christoph Hellwig wrote: > This code is only used by sparc, and all new iommu drivers should use the > drivers/iommu/ framework. Also remove the unused exports. > > Signed-off-by: Christoph Hellwig Right, these functions are used only from SPARC

Re: [PATCH] bcache: not access dc->bdev when backing device is offline

2018-04-16 Thread Coly Li
On 2018/4/16 4:56 PM, tang.jun...@zte.com.cn wrote: > Hi Coly, > >> When backing device is offline, memory object pointed by dc->bdev might be >> released in some condititions. I have bug report that bdevname() triggers >> a NULL pointer deference panic inside bch_cached_dev_error(), where >>

Re: [PATCH 04/12] iommu-helper: move the IOMMU_HELPER config symbol to lib/

2018-04-16 Thread Anshuman Khandual
On 04/15/2018 08:29 PM, Christoph Hellwig wrote: > This way we have one central definition of it, and user can select it as > needed. > > Signed-off-by: Christoph Hellwig Reviewed-by: Anshuman Khandual

Re: [PATCH 05/12] scatterlist: move the NEED_SG_DMA_LENGTH config symbol to lib/Kconfig

2018-04-16 Thread Anshuman Khandual
On 04/15/2018 08:29 PM, Christoph Hellwig wrote: > This way we have one central definition of it, and user can select it as > needed. > > Signed-off-by: Christoph Hellwig Reviewed-by: Anshuman Khandual

[PATCH 06/12] memstick: don't call blk_queue_bounce_limit

2018-04-16 Thread Christoph Hellwig
All in-tree host drivers set up a proper dma mask and use the dma-mapping helpers. This means they will be able to deal with any address that we are throwing at them. Signed-off-by: Christoph Hellwig --- drivers/memstick/core/ms_block.c| 5 -

[PATCH 07/12] scsi: reduce use of block bounce buffers

2018-04-16 Thread Christoph Hellwig
We can rely on the dma-mapping code to handle any DMA limits that is bigger than the ISA DMA mask for us (either using an iommu or swiotlb), so remove setting the block layer bounce limit for anything but the unchecked_isa_dma case, or the bouncing for highmem pages. Signed-off-by: Christoph

[PATCH 04/12] DAC960: don't use block layer bounce buffers

2018-04-16 Thread Christoph Hellwig
DAC960 just sets the block bounce limit to the dma mask, which means that the iommu or swiotlb already take care of the bounce buffering, and the block bouncing can be removed. Signed-off-by: Christoph Hellwig --- drivers/block/DAC960.c | 9 ++--- drivers/block/DAC960.h | 1 -

[PATCH 03/12] mtip32xx: don't use block layer bounce buffers

2018-04-16 Thread Christoph Hellwig
mtip32xx just sets the block bounce limit to the dma mask, which means that the iommu or swiotlb already take care of the bounce buffering, and the block bouncing can be removed. Signed-off-by: Christoph Hellwig --- drivers/block/mtip32xx/mtip32xx.c | 1 - 1 file changed, 1

[PATCH 08/12] mmc: reduce use of block bounce buffers

2018-04-16 Thread Christoph Hellwig
We can rely on the dma-mapping code to handle any DMA limits that is bigger than the ISA DMA mask for us (either using an iommu or swiotlb), so remove setting the block layer bounce limit for anything but bouncing for highmem pages. Signed-off-by: Christoph Hellwig ---

[PATCH 05/12] sata_nv: don't use block layer bounce buffers

2018-04-16 Thread Christoph Hellwig
sata_nv sets the block bounce limit to the reduce dma mask for ATAPI devices, which means that the iommu or swiotlb already take care of the bounce buffering, and the block bouncing can be removed. Signed-off-by: Christoph Hellwig --- drivers/ata/sata_nv.c | 62

[PATCH 01/12] iscsi_tcp: don't set a bounce limit

2018-04-16 Thread Christoph Hellwig
The default already is to never bounce, so the call is a no-op. Signed-off-by: Christoph Hellwig --- drivers/scsi/iscsi_tcp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index 2ba4b68fdb73..b025a0b74341 100644 ---

Re: v4.16-rc1 + dm-mpath + BFQ

2018-04-16 Thread Paolo Valente
> Il giorno 01 apr 2018, alle ore 10:56, Paolo Valente > ha scritto: > > > >> Il giorno 30 mar 2018, alle ore 18:57, Bart Van Assche >> ha scritto: >> >> On Fri, 2018-03-30 at 10:23 +0200, Paolo Valente wrote: >>> Still 4.16-rc1, being

Re: [PATCH v2] block: ratelimite pr_err on IO path

2018-04-16 Thread Sreekanth Reddy
On Mon, Apr 16, 2018 at 1:46 PM, Jinpu Wang wrote: > On Fri, Apr 13, 2018 at 6:59 PM, Martin K. Petersen > wrote: >> >> Jinpu, >> >> [CC:ed the mpt3sas maintainers] >> >> The ratelimit patch is just an attempt to treat the symptom, not the

Re: [PATCH 02/12] iommu-helper: unexport iommu_area_alloc

2018-04-16 Thread Anshuman Khandual
On 04/15/2018 08:29 PM, Christoph Hellwig wrote: > This function is only used by built-in code. > > Reviewed-by: Christoph Hellwig Reviewed-by: Anshuman Khandual

[PATCH] lightnvm: pblk: add CNEX Granby to the pblk device list

2018-04-16 Thread Wei Xu
Add a new lightnvm quirk to identify CNEX’s Granby controller. Signed-off-by: Wei Xu --- drivers/nvme/host/pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index cb73bc8..9419e88 100644 --- a/drivers/nvme/host/pci.c

Re: [PATCH] bcache: not access dc->bdev when backing device is offline

2018-04-16 Thread tang . junhui
Hi Coly, >On 2018/4/16 4:56 PM, tang.jun...@zte.com.cn wrote: >> Hi Coly, >> >>> When backing device is offline, memory object pointed by dc->bdev might be >>> released in some condititions. I have bug report that bdevname() triggers >>> a NULL pointer deference panic inside

[PATCH] target: fix crash with iscsi target and dvd

2018-04-16 Thread Ming Lei
When the current page can't be added to bio, one new bio should be created for adding this page again, instead of ignoring this page. This patch fixes kernel crash with iscsi target and dvd, as reported by Wakko. Cc: Wakko Warner Cc: Bart Van Assche

[PATCH] nvme: lightnvm: add granby support

2018-04-16 Thread Wei Xu
Add a new lightnvm quirk to identify CNEX’s Granby controller. Signed-off-by: Wei Xu --- drivers/nvme/host/pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index cb73bc8..9419e88 100644 --- a/drivers/nvme/host/pci.c

Re: usercopy whitelist woe in scsi_sense_cache

2018-04-16 Thread Kees Cook
On Mon, Apr 16, 2018 at 1:44 PM, Kees Cook wrote: > On Thu, Apr 12, 2018 at 8:02 PM, Kees Cook wrote: >> On Thu, Apr 12, 2018 at 3:47 PM, Kees Cook wrote: >>> After fixing up some build issues in the middle of the 4.16 cycle,

[PATCH] blk-mq: start request gstate with gen 1

2018-04-16 Thread Jianchao Wang
rq->gstate and rq->aborted_gstate both are zero before rqs are allocated. If we have a small timeout, when the timer fires, there could be rqs that are never allocated, and also there could be rq that has been allocated but not initialized and started. At the moment, the rq->gstate and

Re: [PATCH 06/12] dma-mapping: move the NEED_DMA_MAP_STATE config symbol to lib/Kconfig

2018-04-16 Thread Anshuman Khandual
On 04/15/2018 08:29 PM, Christoph Hellwig wrote: > This way we have one central definition of it, and user can select it as > needed. Note that we now also always select it when CONFIG_DMA_API_DEBUG > is select, which fixes some incorrect checks in a few network drivers. > > Signed-off-by:

[PATCH] lightnvm: pblk: take bitmap alloc. out of critical section

2018-04-16 Thread Javier González
Allocate line bitmaps outside of the line lock on line preparation. Signed-off-by: Javier González --- drivers/lightnvm/pblk-core.c | 96 +--- 1 file changed, 55 insertions(+), 41 deletions(-) diff --git

[PATCH] lightnvm: pblk: remove unnecessary bio_get/put

2018-04-16 Thread Javier González
In the read path, pblk gets a reference to the incoming bio and puts it after ending the bio. Though this behavior is correct, it is unnecessary since pblk is the one putting the bio, therefore, it cannot disappear underneath it. Removing this reference, allows to clean up rqd->bio and avoid

Change device block count from userspace?

2018-04-16 Thread Manuel Lauss
Hello, I have a SATA SSD which suddenly reports its size as 2.2TB, 0x block count: [ 30.620086] sd 10:0:0:0: [sdc] 4294967295 512-byte logical blocks: (2.20 TB/2.00 TiB) [ 30.620327] sd 10:0:0:0: [sdc] Write Protect is off [ 30.620329] sd 10:0:0:0: [sdc] Mode Sense: 43 00 00 00 [

[PATCH 08/11] lightnvm: pblk: remove unnecessary argument

2018-04-16 Thread Javier González
Remove unnecessary argument on pblk_line_free() Signed-off-by: Javier González --- drivers/lightnvm/pblk-core.c | 6 +++--- drivers/lightnvm/pblk-init.c | 2 +- drivers/lightnvm/pblk.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH 06/11] lightnvm: pblk: return NVM_ error on failed submission

2018-04-16 Thread Javier González
Return a meaningful error when the sanity vector I/O check fails. Signed-off-by: Javier González --- drivers/lightnvm/pblk-core.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/drivers/lightnvm/pblk-core.c

[PATCH 07/11] lightnvm: pblk: remove unnecessary indirection

2018-04-16 Thread Javier González
Remove unnecessary indirection on the read path. Signed-off-by: Javier González --- drivers/lightnvm/pblk-read.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/lightnvm/pblk-read.c b/drivers/lightnvm/pblk-read.c index

[PATCH 10/11] lightnvn: pass flag on graceful teardown to targets

2018-04-16 Thread Javier González
If the namespace is unregistered before the LightNVM target is removed (e.g., on hot unplug) it is too late for the target to store any metadata on the device - any attempt to write to the device will fail. In this case, pass on a "gracefull teardown" flag to the target to let it know when this

[PATCH 09/11] lightnvm: pblk: check for chunk size before allocating it

2018-04-16 Thread Javier González
Do the check for the chunk state after making sure that the chunk type is supported. Fixes: 32ef9412c114 ("lightnvm: pblk: implement get log report chunk") Signed-off-by: Javier González --- drivers/lightnvm/pblk-init.c | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH 05/11] lightnvm: pblk: warn in case of corrupted write buffer

2018-04-16 Thread Javier González
When cleaning up buffer entries as we wrap up, their state should be "completed". If any of the entries is in "submitted" state, it means that something bad has happened. Trigger a warning immediately instead of waiting for the state flag to eventually be updated, thus hiding the issue.

[PATCH 02/11] lightnvm: pblk: recheck for bad lines at runtime

2018-04-16 Thread Javier González
Bad blocks can grow at runtime. Check that the number of valid blocks in a line are within the sanity threshold before allocating the line for new writes. Signed-off-by: Javier González --- drivers/lightnvm/pblk-core.c | 38 --

[PATCH 03/11] lightnvm: pblk: check read lba on gc path

2018-04-16 Thread Javier González
Check that the lba stored in the LBA metadata is correct in the GC path too. This requires a new helper function to check random reads in the vector read. Signed-off-by: Javier González --- drivers/lightnvm/pblk-read.c | 39 +-- 1 file

[PATCH 04/11] lightnvn: pblk: improve error msg on corrupted LBAs

2018-04-16 Thread Javier González
In the event of a mismatch between the read LBA and the metadata pointer reported by the device, improve the error message to be able to detect the offending physical address (PPA) mapped to the corrupted LBA. Signed-off-by: Javier González --- drivers/lightnvm/pblk-read.c

[PATCH 00/11] lightnvm: pblk: small fixes

2018-04-16 Thread Javier González
A bunch of small fixes and extra checks for pblk. Non is critical, though ("lightnvm: pblk: check for chunk size before allocating it") might be nice to get into 4.17 as it is a fix for the 2.0 pblk patches. Javier Javier González (11): lightnvm: pblk: fail gracefully on line alloc. failure