Re: [PATCH 16/34] iomap: add initial support for writes without buffer heads

2018-05-22 Thread Christoph Hellwig
On Wed, May 23, 2018 at 08:38:06AM +1000, Dave Chinner wrote: > Ok, I missed that detail as it's in a different patch. It looks like > if (pos > EOF) it will zeroed. But in this case I think that pos == > EOF and so it was reading instead. That smells like off-by-one bug > to me. This has been

Re: [RFC PATCH 3/3] blk-mq: Remove generation seqeunce

2018-05-22 Thread Hannes Reinecke
On 05/22/2018 06:17 PM, Christoph Hellwig wrote: Hi Keith, I like this series a lot. One comment that is probably close to the big discussion in the thread: switch (ret) { case BLK_EH_HANDLED: /* +* If the request is still in flight, the driver

Re: [PATCH] bcache: do not check return value of debugfs_create_dir()

2018-05-22 Thread Coly Li
On 2018/5/23 3:56 AM, Kai Krakow wrote: > Hello Coly! > > 2018-05-22 9:10 GMT+02:00 Coly Li : >> Greg KH suggests that normal code should not care about debugfs. Therefore >> no matter successful or failed of debugfs_create_dir() execution, it is >> unncessary to check its return

Re: [PATCH V2] blk-mq: avoid to starve tag allocation after allocation process migrates

2018-05-22 Thread Jens Axboe
On 5/19/18 1:44 AM, Ming Lei wrote: > When the allocation process is scheduled back and the mapped hw queue is > changed, do one extra wake up on orignal queue for compensating wake up > miss, so other allocations on the orignal queue won't be starved. > > This patch fixes one request allocation

Re: [PATCH V2] blk-mq: avoid to starve tag allocation after allocation process migrates

2018-05-22 Thread Jens Axboe
On 5/22/18 6:22 PM, Ming Lei wrote: > On Tue, May 22, 2018 at 02:20:37PM -0600, Jens Axboe wrote: >> On 5/19/18 1:44 AM, Ming Lei wrote: >>> When the allocation process is scheduled back and the mapped hw queue is >>> changed, do one extra wake up on orignal queue for compensating wake up >>>

Re: [PATCH v13] blk-mq: Rework blk-mq timeout handling again

2018-05-22 Thread Ming Lei
On Tue, May 22, 2018 at 02:38:37PM -0600, Jens Axboe wrote: > On 5/22/18 2:33 PM, Bart Van Assche wrote: > > On Tue, 2018-05-22 at 13:38 -0600, Jens Axboe wrote: > >> On 5/22/18 1:03 PM, Jens Axboe wrote: > >>> On 5/22/18 12:47 PM, Jens Axboe wrote: > Ran into this, running block/014 from

Re: [PATCH] Revert "block: Add warning for bi_next not NULL in bio_endio()"

2018-05-22 Thread Kent Overstreet
On Wed, May 23, 2018 at 01:36:02AM +, Bart Van Assche wrote: > On Tue, 2018-05-22 at 21:30 -0400, Kent Overstreet wrote: > > On Tue, May 22, 2018 at 04:55:05PM -0700, Bart Van Assche wrote: > > > This patch avoids that KASAN reports the following complaint when > > > running the srp-test

Re: [PATCH] block: kyber: make kyber more friendly with merging

2018-05-22 Thread jianchao.wang
Hi Jens and Holger Thank for your kindly response. That's really appreciated. I will post next version based on Jens' patch. Thanks Jianchao On 05/23/2018 02:32 AM, Holger Hoffstätte wrote: This looks great but prevents kyber from being built as module, which is AFAIK supposed to

Re: [PATCH] block: kyber: make kyber more friendly with merging

2018-05-22 Thread jianchao.wang
Hi Omar Thanks for your kindly response. On 05/23/2018 04:02 AM, Omar Sandoval wrote: > On Tue, May 22, 2018 at 10:48:29PM +0800, Jianchao Wang wrote: >> Currently, kyber is very unfriendly with merging. kyber depends >> on ctx rq_list to do merging, however, most of time, it will not >> leave

Re: [PATCH] Revert "block: Add warning for bi_next not NULL in bio_endio()"

2018-05-22 Thread Bart Van Assche
On Tue, 2018-05-22 at 21:30 -0400, Kent Overstreet wrote: > On Tue, May 22, 2018 at 04:55:05PM -0700, Bart Van Assche wrote: > > This patch avoids that KASAN reports the following complaint when > > running the srp-test software: > > I made a real attempt to get your test suite working. Please

Re: [PATCH] Revert "block: Add warning for bi_next not NULL in bio_endio()"

2018-05-22 Thread Kent Overstreet
On Tue, May 22, 2018 at 04:55:05PM -0700, Bart Van Assche wrote: > This patch avoids that KASAN reports the following complaint when > running the srp-test software: I made a real attempt to get your test suite working. It would be nice if you could make an attempt at tracking it down instead of

Re: [PATCH blktests] block/020: test IO req allocation

2018-05-22 Thread Ming Lei
On Tue, May 22, 2018 at 05:01:54PM -0700, Omar Sandoval wrote: > On Tue, May 22, 2018 at 07:12:49PM +0800, Ming Lei wrote: > > IO request allocation may hang for ever if the allocation process > > migrages. This test covers the request allocation code path. > > > > The following patch can fix

Re: [RFC PATCH 3/3] blk-mq: Remove generation seqeunce

2018-05-22 Thread Ming Lei
On Tue, May 22, 2018 at 06:17:04PM +0200, Christoph Hellwig wrote: > Hi Keith, > > I like this series a lot. One comment that is probably close > to the big discussion in the thread: > > > switch (ret) { > > case BLK_EH_HANDLED: > > /* > > +* If the request is

Re: [PATCH V2] blk-mq: avoid to starve tag allocation after allocation process migrates

2018-05-22 Thread Ming Lei
On Tue, May 22, 2018 at 02:20:37PM -0600, Jens Axboe wrote: > On 5/19/18 1:44 AM, Ming Lei wrote: > > When the allocation process is scheduled back and the mapped hw queue is > > changed, do one extra wake up on orignal queue for compensating wake up > > miss, so other allocations on the orignal

Re: [PATCH blktests] Documentation: document prerequisite scriptlets

2018-05-22 Thread Omar Sandoval
On Tue, May 22, 2018 at 09:30:24AM +0200, Johannes Thumshirn wrote: > On Mon, May 21, 2018 at 11:29:04AM -0700, Omar Sandoval wrote: > > But I'm curious about this specific example. Is this not mounted for you > > automatically? I'm guessing systemd does it for me on my setup. > > No my setup is

Re: [PATCH blktests] block/020: test IO req allocation

2018-05-22 Thread Omar Sandoval
On Tue, May 22, 2018 at 07:12:49PM +0800, Ming Lei wrote: > IO request allocation may hang for ever if the allocation process > migrages. This test covers the request allocation code path. > > The following patch can fix this issue on linus kernel: > >

Re: [PATCH blktests] blktests: use consistent helper returns

2018-05-22 Thread Omar Sandoval
On Tue, May 22, 2018 at 03:36:11AM -0400, Chaitanya Kulkarni wrote: > This is a cleanup patch which uses consistent return values > for helper functions. > > Signed-off-by: Chaitanya Kulkarni Thanks, applied.

[PATCH] Revert "block: Add warning for bi_next not NULL in bio_endio()"

2018-05-22 Thread Bart Van Assche
This patch avoids that KASAN reports the following complaint when running the srp-test software: BUG: KASAN: use-after-free in bio_advance+0x110/0x1b0 Read of size 4 at addr 88014c7aa950 by task ksoftirqd/10/72 Call Trace: dump_stack+0x9a/0xeb print_address_description+0x65/0x270

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Kees Cook
On Tue, May 22, 2018 at 4:42 PM, Jens Axboe wrote: > On May 22, 2018, at 5:31 PM, Kees Cook wrote: >> >>> On Tue, May 22, 2018 at 12:16 PM, Jens Axboe wrote: On 5/22/18 1:13 PM, Christoph Hellwig wrote: > On Tue, May 22, 2018 at

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Jens Axboe
On May 22, 2018, at 5:31 PM, Kees Cook wrote: > >> On Tue, May 22, 2018 at 12:16 PM, Jens Axboe wrote: >>> On 5/22/18 1:13 PM, Christoph Hellwig wrote: On Tue, May 22, 2018 at 01:09:41PM -0600, Jens Axboe wrote: I think Martin and Christoph are

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Randy Dunlap
On 05/22/2018 04:39 PM, Kees Cook wrote: > On Tue, May 22, 2018 at 4:34 PM, Randy Dunlap wrote: >> On 05/22/2018 04:31 PM, Kees Cook wrote: >>> On Tue, May 22, 2018 at 12:16 PM, Jens Axboe wrote: On 5/22/18 1:13 PM, Christoph Hellwig wrote: > On

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Randy Dunlap
On 05/22/2018 04:31 PM, Kees Cook wrote: > On Tue, May 22, 2018 at 12:16 PM, Jens Axboe wrote: >> On 5/22/18 1:13 PM, Christoph Hellwig wrote: >>> On Tue, May 22, 2018 at 01:09:41PM -0600, Jens Axboe wrote: I think Martin and Christoph are objecting to moving the code to

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Kees Cook
On Tue, May 22, 2018 at 12:16 PM, Jens Axboe wrote: > On 5/22/18 1:13 PM, Christoph Hellwig wrote: >> On Tue, May 22, 2018 at 01:09:41PM -0600, Jens Axboe wrote: >>> I think Martin and Christoph are objecting to moving the code to >>> block/scsi_ioctl.h. I don't care too much

Re: [PATCH 16/34] iomap: add initial support for writes without buffer heads

2018-05-22 Thread Dave Chinner
On Tue, May 22, 2018 at 10:24:54AM +0200, Christoph Hellwig wrote: > On Tue, May 22, 2018 at 10:07:45AM +1000, Dave Chinner wrote: > > > Something doesn't smell right here. The only pages we need to read in > > > are the first and last pages in the write_begin range, and only if they > > > aren't

Re: [PATCH v7 0/5] AIO add per-command iopriority

2018-05-22 Thread Adam Manzanares
On 5/22/18 11:30 AM, Jens Axboe wrote: > On 5/22/18 12:30 PM, Al Viro wrote: >> On Tue, May 22, 2018 at 11:55:04AM -0600, Jens Axboe wrote: >>> On 5/22/18 11:52 AM, adam.manzana...@wdc.com wrote: From: Adam Manzanares This is the per-I/O equivalent of the

Re: [PATCH 00/10] Misc block layer patches for bcachefs

2018-05-22 Thread Bart Van Assche
On Sun, 2018-05-20 at 18:17 -0400, Kent Overstreet wrote: > On Fri, May 18, 2018 at 03:12:27PM +, Bart Van Assche wrote: > > On Fri, 2018-05-18 at 05:06 -0400, Kent Overstreet wrote: > > > On Thu, May 17, 2018 at 08:54:57PM +, Bart Van Assche wrote: > > > > With Jens' latest for-next

Re: [PATCH v4 06/14] PCI/P2PDMA: Add P2P DMA driver writer's documentation

2018-05-22 Thread Logan Gunthorpe
Thanks for the review Randy! I'll make the changes for the next time we post the series. On 22/05/18 03:24 PM, Randy Dunlap wrote: >> +The first task an orchestrator driver must do is compile a list of >> +all client drivers that will be involved in a given transaction. For >> +example, the NVMe

Re: [PATCH v4 06/14] PCI/P2PDMA: Add P2P DMA driver writer's documentation

2018-05-22 Thread Randy Dunlap
On 04/23/2018 04:30 PM, Logan Gunthorpe wrote: > Add a restructured text file describing how to write drivers > with support for P2P DMA transactions. The document describes > how to use the APIs that were added in the previous few > commits. > > Also adds an index for the PCI documentation tree

Re: [PATCH 2/6] scsi: cxlflash: Drop unused sense buffers

2018-05-22 Thread Matthew R. Ochs
On Tue, May 22, 2018 at 11:15:08AM -0700, Kees Cook wrote: > This removes the unused sense buffer in read_cap16() and write_same16(). > > Signed-off-by: Kees Cook Looks good. Acked-by: Matthew R. Ochs

Re: [PATCH v13] blk-mq: Rework blk-mq timeout handling again

2018-05-22 Thread Christoph Hellwig
On Tue, May 22, 2018 at 02:29:21PM -0600, Jens Axboe wrote: > > of BLK_EH_HANDLED. Is the driver supposed to return BLK_EH_NOT_HANDLED > > when the driver actually knows the request has been completed before > > returning the status? > > If the driver knows it's completed, it'd have to return

Re: [PATCH v13] blk-mq: Rework blk-mq timeout handling again

2018-05-22 Thread Bart Van Assche
On Tue, 2018-05-22 at 14:44 -0600, Keith Busch wrote: > On Tue, May 22, 2018 at 08:36:27PM +, Bart Van Assche wrote: > > > > Have you noticed that if blk_mq_complete_request() encounters a request with > > state MQ_RQ_TIMED_OUT that it doesn't call __blk_mq_complete_request()? I > > think >

Re: [PATCH v13] blk-mq: Rework blk-mq timeout handling again

2018-05-22 Thread Bart Van Assche
On Tue, 2018-05-22 at 14:38 -0600, Jens Axboe wrote: > On 5/22/18 2:33 PM, Bart Van Assche wrote: > > Thanks for having reported this. How about using the following change to > > suppress > > that warning: > > > > diff --git a/block/blk-mq.c b/block/blk-mq.c > > index bb99c03e7a34..84e55ea55baf

Re: [PATCH v13] blk-mq: Rework blk-mq timeout handling again

2018-05-22 Thread Keith Busch
On Tue, May 22, 2018 at 08:36:27PM +, Bart Van Assche wrote: > > Have you noticed that if blk_mq_complete_request() encounters a request with > state MQ_RQ_TIMED_OUT that it doesn't call __blk_mq_complete_request()? I > think > the code in blk_mq_complete_request() together with the above

Re: [PATCH v13] blk-mq: Rework blk-mq timeout handling again

2018-05-22 Thread Jens Axboe
On 5/22/18 2:33 PM, Bart Van Assche wrote: > On Tue, 2018-05-22 at 13:38 -0600, Jens Axboe wrote: >> On 5/22/18 1:03 PM, Jens Axboe wrote: >>> On 5/22/18 12:47 PM, Jens Axboe wrote: Ran into this, running block/014 from blktests: [ 5744.949839] run blktests block/014 at 2018-05-22

Re: [PATCH v13] blk-mq: Rework blk-mq timeout handling again

2018-05-22 Thread Keith Busch
On Tue, May 22, 2018 at 08:36:27PM +, Bart Van Assche wrote: > Have you noticed that if blk_mq_complete_request() encounters a request with > state MQ_RQ_TIMED_OUT that it doesn't call __blk_mq_complete_request()? I > think > the code in blk_mq_complete_request() together with the above code

Re: [PATCH v13] blk-mq: Rework blk-mq timeout handling again

2018-05-22 Thread Bart Van Assche
On Tue, 2018-05-22 at 14:33 -0600, Keith Busch wrote: > On Tue, May 22, 2018 at 09:25:15AM -0700, Bart Van Assche wrote: > > @@ -848,13 +843,22 @@ static void blk_mq_rq_timed_out(struct request *req, > > bool reserved) > > case BLK_EH_RESET_TIMER: > > + blk_mq_add_timer(req); > >

Re: [PATCH v13] blk-mq: Rework blk-mq timeout handling again

2018-05-22 Thread Bart Van Assche
On Tue, 2018-05-22 at 13:38 -0600, Jens Axboe wrote: > On 5/22/18 1:03 PM, Jens Axboe wrote: > > On 5/22/18 12:47 PM, Jens Axboe wrote: > > > Ran into this, running block/014 from blktests: > > > > > > [ 5744.949839] run blktests block/014 at 2018-05-22 12:41:25 > > > [ 5750.723000] null: rq

Re: [PATCH v13] blk-mq: Rework blk-mq timeout handling again

2018-05-22 Thread Keith Busch
On Tue, May 22, 2018 at 09:25:15AM -0700, Bart Van Assche wrote: > @@ -848,13 +843,22 @@ static void blk_mq_rq_timed_out(struct request *req, > bool reserved) > case BLK_EH_RESET_TIMER: > + blk_mq_add_timer(req); > /* > + * The loop is for the unlikely

Re: [PATCH v13] blk-mq: Rework blk-mq timeout handling again

2018-05-22 Thread Jens Axboe
On 5/22/18 2:26 PM, Keith Busch wrote: > On Tue, May 22, 2018 at 01:38:06PM -0600, Jens Axboe wrote: >> I guess it would be cleaner to actually do the transition, in >> blk_mq_rq_timed_out(): >> >> case BLK_EH_HANDLED: >> >>

Re: buffered I/O without buffer heads in xfs and iomap v2

2018-05-22 Thread Christoph Hellwig
On Mon, May 21, 2018 at 01:46:10PM -0700, Darrick J. Wong wrote: > On Fri, May 18, 2018 at 06:47:56PM +0200, Christoph Hellwig wrote: > > Hi all, > > > > this series adds support for buffered I/O without buffer heads to > > the iomap and XFS code. > > > > For now this series only contains

Re: [PATCH v13] blk-mq: Rework blk-mq timeout handling again

2018-05-22 Thread Keith Busch
On Tue, May 22, 2018 at 01:38:06PM -0600, Jens Axboe wrote: > I guess it would be cleaner to actually do the transition, in > blk_mq_rq_timed_out(): > > case BLK_EH_HANDLED: > > if (blk_mq_change_rq_state(req,

Re: [PATCH V2] blk-mq: avoid to starve tag allocation after allocation process migrates

2018-05-22 Thread Jens Axboe
On 5/19/18 1:44 AM, Ming Lei wrote: > When the allocation process is scheduled back and the mapped hw queue is > changed, do one extra wake up on orignal queue for compensating wake up > miss, so other allocations on the orignal queue won't be starved. > > This patch fixes one request allocation

Re: [PATCH] block: kyber: make kyber more friendly with merging

2018-05-22 Thread Omar Sandoval
On Tue, May 22, 2018 at 10:48:29PM +0800, Jianchao Wang wrote: > Currently, kyber is very unfriendly with merging. kyber depends > on ctx rq_list to do merging, however, most of time, it will not > leave any requests in ctx rq_list. This is because even if tokens > of one domain is used up, kyber

Re: [PATCH] bcache: do not check return value of debugfs_create_dir()

2018-05-22 Thread Kai Krakow
Hello Coly! 2018-05-22 9:10 GMT+02:00 Coly Li : > Greg KH suggests that normal code should not care about debugfs. Therefore > no matter successful or failed of debugfs_create_dir() execution, it is > unncessary to check its return value. > > There are two functions called

Re: [PATCH v13] blk-mq: Rework blk-mq timeout handling again

2018-05-22 Thread Jens Axboe
On 5/22/18 1:03 PM, Jens Axboe wrote: > On 5/22/18 12:47 PM, Jens Axboe wrote: >> On 5/22/18 11:17 AM, Jens Axboe wrote: >>> On 5/22/18 10:44 AM, Jens Axboe wrote: On 5/22/18 10:25 AM, Bart Van Assche wrote: > Recently the blk-mq timeout handling code was reworked. See also Tejun

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Jens Axboe
On 5/22/18 1:13 PM, Christoph Hellwig wrote: > On Tue, May 22, 2018 at 01:09:41PM -0600, Jens Axboe wrote: >> I think Martin and Christoph are objecting to moving the code to >> block/scsi_ioctl.h. I don't care too much about where the code is, but >> think it would be nice to have the definitions

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Christoph Hellwig
On Tue, May 22, 2018 at 01:09:41PM -0600, Jens Axboe wrote: > I think Martin and Christoph are objecting to moving the code to > block/scsi_ioctl.h. I don't care too much about where the code is, but > think it would be nice to have the definitions in a separate header. But > if they prefer just

Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-22 Thread Mike Snitzer
On Tue, May 22 2018 at 2:41am -0400, Christoph Hellwig wrote: > On Mon, May 21, 2018 at 07:38:55PM -0400, Kent Overstreet wrote: > > On Mon, May 21, 2018 at 02:24:32PM -0400, Mike Snitzer wrote: > > > Every single data structure change in this series should be reviewed for >

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Jens Axboe
On 5/22/18 12:59 PM, Kees Cook wrote: > On Tue, May 22, 2018 at 11:50 AM, Martin K. Petersen > wrote: >> >> Christoph, >> >>> On Tue, May 22, 2018 at 11:15:09AM -0700, Kees Cook wrote: Both SCSI and ATAPI share the sense header. In preparation for using the

Re: [PATCH v13] blk-mq: Rework blk-mq timeout handling again

2018-05-22 Thread Jens Axboe
On 5/22/18 12:47 PM, Jens Axboe wrote: > On 5/22/18 11:17 AM, Jens Axboe wrote: >> On 5/22/18 10:44 AM, Jens Axboe wrote: >>> >>> On 5/22/18 10:25 AM, Bart Van Assche wrote: Recently the blk-mq timeout handling code was reworked. See also Tejun Heo, "[PATCHSET v4] blk-mq: reimplement

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Kees Cook
On Tue, May 22, 2018 at 11:50 AM, Martin K. Petersen wrote: > > Christoph, > >> On Tue, May 22, 2018 at 11:15:09AM -0700, Kees Cook wrote: >>> Both SCSI and ATAPI share the sense header. In preparation for using the >>> struct scsi_sense_hdr more widely, move this into

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Martin K. Petersen
Christoph, > On Tue, May 22, 2018 at 11:15:09AM -0700, Kees Cook wrote: >> Both SCSI and ATAPI share the sense header. In preparation for using the >> struct scsi_sense_hdr more widely, move this into a separate header and >> move the helper function to scsi_ioctl.c which is linked with

Re: [PATCH v13] blk-mq: Rework blk-mq timeout handling again

2018-05-22 Thread Jens Axboe
On 5/22/18 11:17 AM, Jens Axboe wrote: > On 5/22/18 10:44 AM, Jens Axboe wrote: >> >> On 5/22/18 10:25 AM, Bart Van Assche wrote: >>> Recently the blk-mq timeout handling code was reworked. See also Tejun >>> Heo, "[PATCHSET v4] blk-mq: reimplement timeout handling", 08 Jan 2018 >>>

Re: [PATCH 1/6] ide-cd: Drop unused sense buffers

2018-05-22 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [PATCH 2/6] scsi: cxlflash: Drop unused sense buffers

2018-05-22 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Christoph Hellwig
On Tue, May 22, 2018 at 11:15:09AM -0700, Kees Cook wrote: > Both SCSI and ATAPI share the sense header. In preparation for using the > struct scsi_sense_hdr more widely, move this into a separate header and > move the helper function to scsi_ioctl.c which is linked with CONFIG_IDE > by way of

Re: [PATCH] block: kyber: make kyber more friendly with merging

2018-05-22 Thread Holger Hoffstätte
On 05/22/18 19:46, Jens Axboe wrote: > On 5/22/18 10:20 AM, Jens Axboe wrote: >> On 5/22/18 10:17 AM, Holger Hoffstätte wrote: >>> On 05/22/18 16:48, Jianchao Wang wrote: Currently, kyber is very unfriendly with merging. kyber depends on ctx rq_list to do merging, however, most of time,

Re: [PATCH v7 0/5] AIO add per-command iopriority

2018-05-22 Thread Jens Axboe
On 5/22/18 12:30 PM, Al Viro wrote: > On Tue, May 22, 2018 at 11:55:04AM -0600, Jens Axboe wrote: >> On 5/22/18 11:52 AM, adam.manzana...@wdc.com wrote: >>> From: Adam Manzanares >>> >>> This is the per-I/O equivalent of the ioprio_set system call. >>> See the following

Re: [PATCH v7 0/5] AIO add per-command iopriority

2018-05-22 Thread Al Viro
On Tue, May 22, 2018 at 11:55:04AM -0600, Jens Axboe wrote: > On 5/22/18 11:52 AM, adam.manzana...@wdc.com wrote: > > From: Adam Manzanares > > > > This is the per-I/O equivalent of the ioprio_set system call. > > See the following link for performance implications on a

[PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Kees Cook
Both SCSI and ATAPI share the sense header. In preparation for using the struct scsi_sense_hdr more widely, move this into a separate header and move the helper function to scsi_ioctl.c which is linked with CONFIG_IDE by way of CONFIG_BLK_SCSI_REQUEST. Signed-off-by: Kees Cook

[PATCH 2/6] scsi: cxlflash: Drop unused sense buffers

2018-05-22 Thread Kees Cook
This removes the unused sense buffer in read_cap16() and write_same16(). Signed-off-by: Kees Cook --- drivers/scsi/cxlflash/superpipe.c | 8 ++-- drivers/scsi/cxlflash/vlun.c | 7 ++- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git

[PATCH 1/6] ide-cd: Drop unused sense buffers

2018-05-22 Thread Kees Cook
This drops unused sense buffers from: cdrom_eject() cdrom_read_capacity() cdrom_read_tocentry() ide_cd_lockdoor() ide_cd_read_toc() Signed-off-by: Kees Cook --- drivers/ide/ide-cd.c | 36 +++-

[PATCH 0/6] block: Consolidate scsi sense buffer usage

2018-05-22 Thread Kees Cook
This is a follow-up to commit f7068114d45e ("sr: pass down correctly sized SCSI sense buffer") which further cleans up and removes needless sense character array buffers and "struct request_sense" usage in favor of the common "struct scsi_sense_hdr". First, drop a bunch of unused sense buffers:

[PATCH 6/6] scsi: Check sense buffer size at build time

2018-05-22 Thread Kees Cook
To avoid introducing problems like those fixed in commit f7068114d45e ("sr: pass down correctly sized SCSI sense buffer"), this creates a macro wrapper for scsi_execute() that verifies the size of the sense buffer similar to what was done for command string sizes in commit 3756f6401c30 ("exec:

[PATCH 5/6] libata-scsi: Move sense buffers onto stack

2018-05-22 Thread Kees Cook
Instead of dynamically allocating the sense buffers, put them on the stack so that future compile-time sizeof() checks will be able to see their buffer length. Signed-off-by: Kees Cook --- drivers/ata/libata-scsi.c | 18 ++ 1 file changed, 6 insertions(+),

[PATCH 4/6] block: Consolidate scsi sense buffer usage

2018-05-22 Thread Kees Cook
There is a lot of needless struct request_sense usage in the CDROM code. These can all be struct scsi_sense_hdr instead, to avoid any confusion over their respective structure sizes. This patch is a lot of noise changing "sense" to "sshdr", but the final code is more readable to distinguish

Re: [PATCH] blkdev_report_zones_ioctl(): Use vmalloc() to allocate large buffers

2018-05-22 Thread Jens Axboe
On 5/22/18 9:27 AM, Bart Van Assche wrote: > Avoid that complaints similar to the following appear in the kernel log > if the number of zones is sufficiently large: > > fio: page allocation failure: order:9, > mode:0x140c0c0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO), nodemask=(null) > Call Trace: >

Re: [PATCH v7 0/5] AIO add per-command iopriority

2018-05-22 Thread Jens Axboe
On 5/22/18 11:52 AM, adam.manzana...@wdc.com wrote: > From: Adam Manzanares > > This is the per-I/O equivalent of the ioprio_set system call. > See the following link for performance implications on a SATA HDD: > https://lkml.org/lkml/2016/12/6/495 > > First patch

[PATCH v7 5/5] fs: iomap dio set bio prio from kiocb prio

2018-05-22 Thread adam . manzanares
From: Adam Manzanares Now that kiocb has an ioprio field copy this over to the bio when it is created from the kiocb during direct IO. Signed-off-by: Adam Manzanares Reviewed-by: Jeff Moyer Reviewed-by: Christoph Hellwig

[PATCH v7 2/5] fs: Convert kiocb rw_hint from enum to u16

2018-05-22 Thread adam . manzanares
From: Adam Manzanares In order to avoid kiocb bloat for per command iopriority support, rw_hint is converted from enum to a u16. Added a guard around ki_hint assignment. Signed-off-by: Adam Manzanares --- fs/aio.c | 2 +-

[PATCH v7 3/5] fs: Add aio iopriority support

2018-05-22 Thread adam . manzanares
From: Adam Manzanares This is the per-I/O equivalent of the ioprio_set system call. When IOCB_FLAG_IOPRIO is set on the iocb aio_flags field, then we set the newly added kiocb ki_ioprio field to the value in the iocb aio_reqprio field. This patch depends on block: add

[PATCH v7 4/5] fs: blkdev set bio prio from kiocb prio

2018-05-22 Thread adam . manzanares
From: Adam Manzanares Now that kiocb has an ioprio field copy this over to the bio when it is created from the kiocb. Signed-off-by: Adam Manzanares Reviewed-by: Jeff Moyer --- fs/block_dev.c | 2 ++ 1 file changed, 2

[PATCH v7 0/5] AIO add per-command iopriority

2018-05-22 Thread adam . manzanares
From: Adam Manzanares This is the per-I/O equivalent of the ioprio_set system call. See the following link for performance implications on a SATA HDD: https://lkml.org/lkml/2016/12/6/495 First patch factors ioprio_check_cap function out of ioprio_set system call to also

[PATCH v7 1/5] block: add ioprio_check_cap function

2018-05-22 Thread adam . manzanares
From: Adam Manzanares Aio per command iopriority support introduces a second interface between userland and the kernel capable of passing iopriority. The aio interface also needs the ability to verify that the submitting context has sufficient privileges to submit

Re: [PATCH] block: kyber: make kyber more friendly with merging

2018-05-22 Thread Jens Axboe
On 5/22/18 10:20 AM, Jens Axboe wrote: > On 5/22/18 10:17 AM, Holger Hoffstätte wrote: >> On 05/22/18 16:48, Jianchao Wang wrote: >>> Currently, kyber is very unfriendly with merging. kyber depends >>> on ctx rq_list to do merging, however, most of time, it will not >>> leave any requests in ctx

Re: [PATCH v5 3/5] fs: Add aio iopriority support

2018-05-22 Thread kbuild test robot
: https://github.com/0day-ci/linux/commits/adam-manzanares-wdc-com/AIO-add-per-command-iopriority/20180522-232203 config: x86_64-randconfig-s0-05230027 (attached as .config) compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026 reproduce: # save the attached .config to linux build tree

Re: [PATCH v6 2/5] fs: Convert kiocb rw_hint from enum to u16

2018-05-22 Thread Adam Manzanares
On 5/22/18 9:30 AM, Jens Axboe wrote: > On 5/22/18 10:24 AM, Goldwyn Rodrigues wrote: >> >> >> On 05/22/2018 10:32 AM, Jens Axboe wrote: >>> On 5/22/18 9:07 AM, adam.manzana...@wdc.com wrote: From: Adam Manzanares In order to avoid kiocb bloat for per

Re: [PATCH v13] blk-mq: Rework blk-mq timeout handling again

2018-05-22 Thread Jens Axboe
On 5/22/18 10:44 AM, Jens Axboe wrote: > > On 5/22/18 10:25 AM, Bart Van Assche wrote: >> Recently the blk-mq timeout handling code was reworked. See also Tejun >> Heo, "[PATCHSET v4] blk-mq: reimplement timeout handling", 08 Jan 2018 >>

Re: [PATCH v2 01/26] rculist: introduce list_next_or_null_rr_rcu()

2018-05-22 Thread Paul E. McKenney
On Tue, May 22, 2018 at 09:38:13AM -0700, Linus Torvalds wrote: > On Tue, May 22, 2018 at 2:09 AM Roman Penyaev < > roman.peny...@profitbricks.com> wrote: > > > Should I resend current patch with more clear comments about how careful > > caller should be with a leaking pointer? > > No. Even if

Re: [PATCH v2 01/26] rculist: introduce list_next_or_null_rr_rcu()

2018-05-22 Thread Paul E. McKenney
On Tue, May 22, 2018 at 11:09:16AM +0200, Roman Penyaev wrote: > On Mon, May 21, 2018 at 5:31 PM, Paul E. McKenney > wrote: > > On Mon, May 21, 2018 at 03:50:10PM +0200, Roman Penyaev wrote: > >> On Sun, May 20, 2018 at 2:43 AM, Paul E. McKenney > >>

Re: [RFC PATCH 3/3] blk-mq: Remove generation seqeunce

2018-05-22 Thread Bart Van Assche
On Tue, 2018-05-22 at 10:34 -0600, Keith Busch wrote: > On Tue, May 22, 2018 at 04:29:07PM +, Bart Van Assche wrote: > > Please have another look at the current code that handles request timeouts > > and completions. The current implementation guarantees that no double > > completions can

Re: [PATCH v2 00/26] InfiniBand Transport (IBTRS) and Network Block Device (IBNBD)

2018-05-22 Thread Jason Gunthorpe
On Fri, May 18, 2018 at 03:03:47PM +0200, Roman Pen wrote: > Hi all, > > This is v2 of series, which introduces IBNBD/IBTRS modules. > > This cover letter is split on three parts: > > 1. Introduction, which almost repeats everything from previous cover >letters. > 2. Changelog. > 3.

Re: [PATCH v13] blk-mq: Rework blk-mq timeout handling again

2018-05-22 Thread Jens Axboe
On 5/22/18 10:25 AM, Bart Van Assche wrote: > Recently the blk-mq timeout handling code was reworked. See also Tejun > Heo, "[PATCHSET v4] blk-mq: reimplement timeout handling", 08 Jan 2018 > (https://www.mail-archive.com/linux-block@vger.kernel.org/msg16985.html). > This patch reworks the blk-mq

Re: [RFC PATCH 0/3] blk-mq: Timeout rework

2018-05-22 Thread Keith Busch
On Tue, May 22, 2018 at 04:30:41PM +, Bart Van Assche wrote: > > Please have a look at v13 of the timeout handling rework patch that I posted. > That patch should not introduce any new race conditions and should also handle > the scenario fine in which blk_mq_complete_request() is called

Re: [PATCH v2 01/26] rculist: introduce list_next_or_null_rr_rcu()

2018-05-22 Thread Linus Torvalds
On Tue, May 22, 2018 at 2:09 AM Roman Penyaev < roman.peny...@profitbricks.com> wrote: > Should I resend current patch with more clear comments about how careful > caller should be with a leaking pointer? No. Even if we go your way, there is *one* single user, and that one is special and needs

Re: [PATCH v2 01/26] rculist: introduce list_next_or_null_rr_rcu()

2018-05-22 Thread Paul E. McKenney
On Tue, May 22, 2018 at 11:09:08AM +0200, Roman Penyaev wrote: > On Mon, May 21, 2018 at 5:33 PM, Paul E. McKenney > wrote: > > On Mon, May 21, 2018 at 08:16:59AM -0700, Linus Torvalds wrote: > >> On Mon, May 21, 2018 at 6:51 AM Roman Penyaev < > >>

Re: [RFC PATCH 3/3] blk-mq: Remove generation seqeunce

2018-05-22 Thread Keith Busch
On Tue, May 22, 2018 at 04:29:07PM +, Bart Van Assche wrote: > Please have another look at the current code that handles request timeouts > and completions. The current implementation guarantees that no double > completions can occur but your patch removes essential aspects of that >

Re: [RFC PATCH 0/3] blk-mq: Timeout rework

2018-05-22 Thread Bart Van Assche
On Tue, 2018-05-22 at 08:06 -0600, Keith Busch wrote: > On Mon, May 21, 2018 at 11:29:21PM +, Bart Van Assche wrote: > > Can you explain why the NVMe driver needs reference counting of requests but > > no other block driver needs this? Additionally, why is it that for all block > > drivers

Re: [PATCH v6 2/5] fs: Convert kiocb rw_hint from enum to u16

2018-05-22 Thread Jens Axboe
On 5/22/18 10:24 AM, Goldwyn Rodrigues wrote: > > > On 05/22/2018 10:32 AM, Jens Axboe wrote: >> On 5/22/18 9:07 AM, adam.manzana...@wdc.com wrote: >>> From: Adam Manzanares >>> >>> In order to avoid kiocb bloat for per command iopriority support, rw_hint >>> is

Re: [RFC PATCH 3/3] blk-mq: Remove generation seqeunce

2018-05-22 Thread Bart Van Assche
On Tue, 2018-05-22 at 08:15 -0600, Keith Busch wrote: > This shouldn't be introducing any new concorrent calls to > __blk_mq_complete_request if they don't already exist. The timeout work > calls it only if the driver's timeout returns BLK_EH_HANDLED, which means > the driver is claiming the

Re: [RFC PATCH 2/3] blk-mq: Fix timeout and state order

2018-05-22 Thread Bart Van Assche
On Tue, 2018-05-22 at 17:24 +0200, Christoph Hellwig wrote: > On Mon, May 21, 2018 at 05:11:30PM -0600, Keith Busch wrote: > > The block layer had been setting the state to in-flight prior to updating > > the timer. This is the wrong order since the timeout handler could observe > > the in-flight

Re: [PATCH v6 2/5] fs: Convert kiocb rw_hint from enum to u16

2018-05-22 Thread Goldwyn Rodrigues
On 05/22/2018 10:32 AM, Jens Axboe wrote: > On 5/22/18 9:07 AM, adam.manzana...@wdc.com wrote: >> From: Adam Manzanares >> >> In order to avoid kiocb bloat for per command iopriority support, rw_hint >> is converted from enum to a u16. Added a guard around ki_hint

[PATCH v13] blk-mq: Rework blk-mq timeout handling again

2018-05-22 Thread Bart Van Assche
Recently the blk-mq timeout handling code was reworked. See also Tejun Heo, "[PATCHSET v4] blk-mq: reimplement timeout handling", 08 Jan 2018 (https://www.mail-archive.com/linux-block@vger.kernel.org/msg16985.html). This patch reworks the blk-mq timeout handling code again. The timeout handling

Re: [PATCH] block: kyber: make kyber more friendly with merging

2018-05-22 Thread Jens Axboe
On 5/22/18 10:17 AM, Holger Hoffstätte wrote: > On 05/22/18 16:48, Jianchao Wang wrote: >> Currently, kyber is very unfriendly with merging. kyber depends >> on ctx rq_list to do merging, however, most of time, it will not >> leave any requests in ctx rq_list. This is because even if tokens >> of

Re: [PATCH] block: kyber: make kyber more friendly with merging

2018-05-22 Thread Holger Hoffstätte
On 05/22/18 16:48, Jianchao Wang wrote: > Currently, kyber is very unfriendly with merging. kyber depends > on ctx rq_list to do merging, however, most of time, it will not > leave any requests in ctx rq_list. This is because even if tokens > of one domain is used up, kyber will try to dispatch

Re: [PATCH v2 14/26] ibtrs: include client and server modules into kernel compilation

2018-05-22 Thread Roman Penyaev
On Tue, May 22, 2018 at 3:18 PM, Leon Romanovsky wrote: > On Tue, May 22, 2018 at 11:27:21AM +0200, Roman Penyaev wrote: >> On Tue, May 22, 2018 at 7:05 AM, Leon Romanovsky wrote: >> > On Fri, May 18, 2018 at 03:04:01PM +0200, Roman Pen wrote: >> >> Add IBTRS

Re: [RFC PATCH 3/3] blk-mq: Remove generation seqeunce

2018-05-22 Thread Christoph Hellwig
Hi Keith, I like this series a lot. One comment that is probably close to the big discussion in the thread: > switch (ret) { > case BLK_EH_HANDLED: > /* > + * If the request is still in flight, the driver is requesting > + * blk-mq complete

Re: [PATCH v6 2/5] fs: Convert kiocb rw_hint from enum to u16

2018-05-22 Thread Adam Manzanares
On 5/22/18 8:32 AM, Jens Axboe wrote: > On 5/22/18 9:07 AM, adam.manzana...@wdc.com wrote: >> From: Adam Manzanares >> >> In order to avoid kiocb bloat for per command iopriority support, rw_hint >> is converted from enum to a u16. Added a guard around ki_hint

Re: [PATCH v6 2/5] fs: Convert kiocb rw_hint from enum to u16

2018-05-22 Thread Jens Axboe
On 5/22/18 9:07 AM, adam.manzana...@wdc.com wrote: > From: Adam Manzanares > > In order to avoid kiocb bloat for per command iopriority support, rw_hint > is converted from enum to a u16. Added a guard around ki_hint assignment. > > Signed-off-by: Adam Manzanares

[PATCH] blkdev_report_zones_ioctl(): Use vmalloc() to allocate large buffers

2018-05-22 Thread Bart Van Assche
Avoid that complaints similar to the following appear in the kernel log if the number of zones is sufficiently large: fio: page allocation failure: order:9, mode:0x140c0c0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO), nodemask=(null) Call Trace: dump_stack+0x63/0x88 warn_alloc+0xf5/0x190

  1   2   >