sed on a patch from Ming,
> but with the list insert case covered as well.
>
> Fixes: ffe81d45322c ("blk-mq: fix corruption with direct issue")
> Cc: sta...@vger.kernel.org
> Suggested-by: Ming Lei
> Reported-by: Bart Van Assche
> Signed-off-by: Jens Axboe
On Fri, Dec 07, 2018 at 11:44:39AM +0800, Ming Lei wrote:
> On Thu, Dec 06, 2018 at 09:46:42PM -0500, Theodore Y. Ts'o wrote:
> > On Wed, Dec 05, 2018 at 11:03:01AM +0800, Ming Lei wrote:
> > >
> > > But at that time, there isn't io scheduler for MQ, so in th
sed on a patch from Ming,
> but with the list insert case covered as well.
>
> Fixes: ffe81d45322c ("blk-mq: fix corruption with direct issue")
> Cc: sta...@vger.kernel.org
> Suggested-by: Ming Lei
> Reported-by: Bart Van Assche
> Signed-off-by: Jens Axboe
On Thu, Dec 06, 2018 at 09:46:42PM -0500, Theodore Y. Ts'o wrote:
> On Wed, Dec 05, 2018 at 11:03:01AM +0800, Ming Lei wrote:
> >
> > But at that time, there isn't io scheduler for MQ, so in theory the
> > issue should be there since v4.11, especially 945ffb60c11d ("m
ce buffer empty)
[4.490492] CR2: 0098
[4.491052] ---[ end trace 03cd268ad5a86ff7 ]---
Cc: Christoph Hellwig
Cc: linux-n...@lists.infradead.org
Cc: David Milburn
Signed-off-by: Ming Lei
---
block/blk-mq.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --gi
On Thu, Dec 06, 2018 at 07:57:34PM -0700, Jens Axboe wrote:
> On 12/6/18 7:55 PM, Ming Lei wrote:
> > Now almost all .map_queues() implementation based on managed irq
> > affinity doesn't update queue mapping and it just retrieves the
> > old built mapping, so if nr
ce buffer empty)
[4.490492] CR2: 0098
[4.491052] ---[ end trace 03cd268ad5a86ff7 ]---
Cc: Christoph Hellwig
Cc: linux-n...@lists.infradead.org
Cc: David Milburn
Signed-off-by: Ming Lei
---
block/blk-mq.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
d
On Wed, Dec 05, 2018 at 10:58:02AM +0800, Ming Lei wrote:
> On Tue, Dec 04, 2018 at 07:30:24PM -0700, Jens Axboe wrote:
> > On 12/4/18 7:27 PM, Ming Lei wrote:
> > > On Tue, Dec 04, 2018 at 07:16:11PM -0700, Jens Axboe wrote:
> > >> On 12/4/18 6:37 PM, Ming Lei wrote
On Tue, Dec 04, 2018 at 07:30:24PM -0700, Jens Axboe wrote:
> On 12/4/18 7:27 PM, Ming Lei wrote:
> > On Tue, Dec 04, 2018 at 07:16:11PM -0700, Jens Axboe wrote:
> >> On 12/4/18 6:37 PM, Ming Lei wrote:
> >>> On Tue, Dec 04, 2018 at 03:47:46PM -0700, Jens Axboe wrote:
On Tue, Dec 04, 2018 at 07:16:11PM -0700, Jens Axboe wrote:
> On 12/4/18 6:37 PM, Ming Lei wrote:
> > On Tue, Dec 04, 2018 at 03:47:46PM -0700, Jens Axboe wrote:
> >> If we attempt a direct issue to a SCSI device, and it returns BUSY, then
> >> we queue the request up
On Tue, Dec 04, 2018 at 03:47:46PM -0700, Jens Axboe wrote:
> If we attempt a direct issue to a SCSI device, and it returns BUSY, then
> we queue the request up normally. However, the SCSI layer may have
> already setup SG tables etc for this particular command. If we later
> merge with this
On Tue, Dec 04, 2018 at 03:30:11PM +0530, Kashyap Desai wrote:
> Problem statement :
> Whenever try to get outstanding request via scsi_host_find_tag,
> block layer will return stale entries instead of actual outstanding
> request. Kernel panic if stale entry is inaccessible or memory is reused.
>
000 R08: 0001 R09: 0207b4e0
[ 106.400976] R10: 000c R11: 0202 R12: 7f8d989f5670
[ 106.401951] R13: R14: 0207b7b0 R15: 0205b7c0
[ 204.246336] null: module loaded
[ 294.406501] null: module loaded
[ 396.936354] null: module loaded
[ 497.202198] end test sanity/001: (NO_HANG, 0)
Thanks,
Ming Lei
-fc that means we could even unexport the
> low-level interface.
Agree, and especially SCSI's use should be understood given
SCSI is so widely deployed in product system.
thanks,
Ming Lei
ge with scheduler attached")
Reported-by: Jens Axboe
Cc: Guangwu Zhang
Cc: Christoph Hellwig
Cc: Jianchao Wang
Signed-off-by: Ming Lei
---
block/blk-merge.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-merge.c b/block/blk-merge.c
index e7696c47489a..7695
gt;last in a smart
> + * fashion.
> + */
> unsigned int request_count = plug->rq_count;
> struct request *last = NULL;
>
> --
> 2.17.1
>
Reviewed-by: Ming Lei
thanks,
Ming
_device_operations floppy_fops
> = {
>
> static const struct blk_mq_ops ataflop_mq_ops = {
> .queue_rq = ataflop_queue_rq,
> + .commit_rqs = ataflop_commit_rqs,
> };
>
> static struct kobject *floppy_find(dev_t dev, int *part, void *data)
> --
> 2.17.1
>
Reviewed-by: Ming Lei
thanks,
Ming
requests(struct blk_mq_hw_ctx *hctx,
> struct blk_mq_ctx *ctx,
> struct list_head *list);
>
> /* Used by blk_insert_cloned_request() to issue request directly */
> -blk_status_t blk_mq_request_issue_directly(struct request *rq);
> +blk_status_t blk_mq_request_issue_directly(struct request *rq, bool last);
> void blk_mq_try_issue_list_directly(struct blk_mq_hw_ctx *hctx,
> struct list_head *list);
>
> --
> 2.17.1
>
Reviewed-by: Ming Lei
Thanks,
Ming
On Wed, Nov 28, 2018 at 08:13:43PM -0700, Jens Axboe wrote:
> On 11/28/18 7:51 PM, Ming Lei wrote:
> > On Wed, Nov 28, 2018 at 07:19:09PM -0700, Jens Axboe wrote:
> >> On 11/28/18 6:23 PM, Ming Lei wrote:
> >>> On Tue, Nov 27, 2018 at 07:34:51PM -0700, Jens Axboe wro
On Wed, Nov 28, 2018 at 07:19:09PM -0700, Jens Axboe wrote:
> On 11/28/18 6:23 PM, Ming Lei wrote:
> > On Tue, Nov 27, 2018 at 07:34:51PM -0700, Jens Axboe wrote:
> >> On 11/27/18 7:10 PM, Ming Lei wrote:
> >>> On Mon, Nov 26, 2018 at 09:35:53AM -0700, Jens Axboe wrot
On Tue, Nov 27, 2018 at 07:34:51PM -0700, Jens Axboe wrote:
> On 11/27/18 7:10 PM, Ming Lei wrote:
> > On Mon, Nov 26, 2018 at 09:35:53AM -0700, Jens Axboe wrote:
> >> We need this for blk-mq to kick things into gear, if we told it that
> >> we had more IO coming,
On Mon, Nov 26, 2018 at 09:35:53AM -0700, Jens Axboe wrote:
> We need this for blk-mq to kick things into gear, if we told it that
> we had more IO coming, but then failed to deliver on that promise.
>
> Signed-off-by: Jens Axboe
> ---
> drivers/block/virtio_blk.c | 15 +++
> 1 file
On Mon, Nov 26, 2018 at 09:35:55AM -0700, Jens Axboe wrote:
> If we are issuing a list of requests, we know if we're at the last one.
> If we fail issuing, ensure that we call ->commits_rqs() to flush any
> potential previous requests.
>
> Signed-off-by: Jens Axboe
> ---
> block/blk-core.c | 2
* make us stop issuing further requests, this hook serves the
> + * purpose of kicking the hardware (which the last request otherwise
> + * would have done).
> + */
> + commit_rqs_fn *commit_rqs;
> +
> /*
>* Return a queue map type for the given request/bio flags
>*/
> --
> 2.17.1
>
Looks fine,
Reviewed-by: Ming Lei
Thanks,
Ming
On Mon, Nov 26, 2018 at 04:33:10PM -0800, Omar Sandoval wrote:
> On Thu, Nov 15, 2018 at 12:00:17PM +0800, Ming Lei wrote:
> > This test covers the following two issues:
> >
> > 1) discard sector need to be aligned with logical block size
> >
> > 2) make sure 's
On Thu, Nov 15, 2018 at 12:01 PM Ming Lei wrote:
>
> This test covers the following two issues:
>
> 1) discard sector need to be aligned with logical block size
>
> 2) make sure 'sector_t' instead of 'unsigned int' is used when comparing
> with discard sector size
>
&
On Tue, Nov 20, 2018 at 10:31:19AM -0700, Jens Axboe wrote:
> On 11/20/18 10:21 AM, Ming Lei wrote:
> > On Mon, Nov 19, 2018 at 12:51:26PM +0900, Damien Le Moal wrote:
> >> bio->bi_ioc is never set so always NULL. Remove references to it in
> >> bio_disassociate_tas
On Mon, Nov 19, 2018 at 12:51:26PM +0900, Damien Le Moal wrote:
> bio->bi_ioc is never set so always NULL. Remove references to it in
> bio_disassociate_task() and in rq_ioc() and delete this field from
> struct bio. With this change, rq_ioc() always returns
> current->io_context without the need
T_RELEASE
is enabled.
Reported-by: Guenter Roeck
Cc: "jianchao.wang"
Cc: Guenter Roeck
Cc: Greg Kroah-Hartman
Cc: sta...@vger.kernel.org
Signed-off-by: Ming Lei
---
V3:
- keep to allocate q->queue_ctx via percpu allocator, so one extra
pointer reference can be sa
On Mon, Nov 19, 2018 at 11:17:49AM +0100, Greg Kroah-Hartman wrote:
> On Mon, Nov 19, 2018 at 10:04:27AM +0800, Ming Lei wrote:
> > On Sat, Nov 17, 2018 at 11:03:42AM +0100, Greg Kroah-Hartman wrote:
> > > On Sat, Nov 17, 2018 at 10:34:18AM +0800, Ming Lei wrote:
> > > &
On Mon, Nov 19, 2018 at 11:06:06AM +0100, Greg Kroah-Hartman wrote:
> On Sat, Nov 17, 2018 at 10:26:38AM +0800, Ming Lei wrote:
> > On Fri, Nov 16, 2018 at 06:05:21AM -0800, Greg Kroah-Hartman wrote:
> > > On Fri, Nov 16, 2018 at 07:23:10PM +0800, Ming Lei wrote:
> > > &
On Fri, Nov 16, 2018 at 02:58:03PM +0100, Christoph Hellwig wrote:
> On Thu, Nov 15, 2018 at 04:53:05PM +0800, Ming Lei wrote:
> > Since bdced438acd83ad83a6c ("block: setup bi_phys_segments after
> > splitting"),
> > physical segment number is mainly figured out in
On Thu, Nov 15, 2018 at 06:18:11PM -0800, Omar Sandoval wrote:
> On Thu, Nov 15, 2018 at 04:53:05PM +0800, Ming Lei wrote:
> > Since bdced438acd83ad83a6c ("block: setup bi_phys_segments after
> > splitting"),
> > physical segment number is mainly figured out in blk_
On Thu, Nov 15, 2018 at 06:11:40PM -0800, Omar Sandoval wrote:
> On Thu, Nov 15, 2018 at 04:53:04PM +0800, Ming Lei wrote:
> > It is wrong to use bio->bi_vcnt to figure out how many segments
> > there are in the bio even though CLONED flag isn't set on this bio,
> &
On Thu, Nov 15, 2018 at 05:59:36PM -0800, Omar Sandoval wrote:
> On Thu, Nov 15, 2018 at 04:53:02PM +0800, Ming Lei wrote:
> > Now multi-page bvec can cover CONFIG_THP_SWAP, so we don't need to
> > increase BIO_MAX_PAGES for it.
>
> You mentioned to it in the cover letter
On Fri, Nov 16, 2018 at 02:53:08PM +0100, Christoph Hellwig wrote:
> > -
> > - if (page == bv->bv_page && off == bv->bv_offset + bv->bv_len) {
> > - bv->bv_len += len;
> > - bio->bi_iter.bi_size += len;
> > - return true;
> > -
On Thu, Nov 15, 2018 at 05:56:27PM -0800, Omar Sandoval wrote:
> On Thu, Nov 15, 2018 at 04:53:01PM +0800, Ming Lei wrote:
> > This patch pulls the trigger for multi-page bvecs.
> >
> > Now any request queue which supports queue cluster will see multi-page
> > bvecs
On Fri, Nov 16, 2018 at 02:49:36PM +0100, Christoph Hellwig wrote:
> I'd much rather have __bio_try_merge_page only do merges in
> the same page, and have a new __bio_try_merge_segment that does
> multi-page merges. This will keep the accounting a lot simpler.
Looks this way is clever, will do
On Thu, Nov 15, 2018 at 05:46:58PM -0800, Omar Sandoval wrote:
> On Thu, Nov 15, 2018 at 04:53:00PM +0800, Ming Lei wrote:
> > After multi-page is enabled, one new page may be merged to a segment
> > even though it is a new added page.
> >
> > This patch deals wi
On Thu, Nov 15, 2018 at 05:22:45PM -0800, Omar Sandoval wrote:
> On Thu, Nov 15, 2018 at 04:52:59PM +0800, Ming Lei wrote:
> > This patch introduces one extra iterator variable to
> > bio_for_each_segment_all(),
> > then we can allow bio_for_each_segment_all() to iterate over
On Thu, Nov 15, 2018 at 01:42:52PM +0100, David Sterba wrote:
> On Thu, Nov 15, 2018 at 04:52:59PM +0800, Ming Lei wrote:
> > diff --git a/block/blk-zoned.c b/block/blk-zoned.c
> > index 13ba2011a306..789b09ae402a 100644
> > --- a/block/blk-zoned.c
> > +++ b/block/blk-z
On Fri, Nov 16, 2018 at 02:46:45PM +0100, Christoph Hellwig wrote:
> > - bio_for_each_segment_all(bv, bio, i) {
> > + for (i = 0, bv = bio->bi_io_vec; i < bio->bi_vcnt; bv++) {
>
> This really needs a comment. Otherwise it looks fine to me.
OK, will do it in next version.
Thanks,
Ming
On Thu, Nov 15, 2018 at 04:44:02PM -0800, Omar Sandoval wrote:
> On Thu, Nov 15, 2018 at 04:52:58PM +0800, Ming Lei wrote:
> > bch_bio_alloc_pages() is always called on one new bio, so it is safe
> > to access the bvec table directly. Given it is the only kind of this
> > cas
On Thu, Nov 15, 2018 at 04:40:22PM -0800, Omar Sandoval wrote:
> On Thu, Nov 15, 2018 at 04:52:57PM +0800, Ming Lei wrote:
> > iov_iter is implemented with bvec itererator, so it is safe to pass
> > multipage bvec to it, and this way is much more efficient than
> > passing
On Fri, Nov 16, 2018 at 02:45:41PM +0100, Christoph Hellwig wrote:
> On Thu, Nov 15, 2018 at 04:52:56PM +0800, Ming Lei wrote:
> > There are still cases in which we need to use bio_bvecs() for get the
> > number of multi-page segment, so introduce it.
>
> The only user in
On Fri, Nov 16, 2018 at 02:38:45PM +0100, Christoph Hellwig wrote:
> On Thu, Nov 15, 2018 at 04:52:55PM +0800, Ming Lei wrote:
> > BTRFS is the only user of this helper, so move this helper into
> > BTRFS, and implement it via bio_for_each_segment_all(), since
> > bio-&
On Thu, Nov 15, 2018 at 04:23:56PM -0800, Omar Sandoval wrote:
> On Thu, Nov 15, 2018 at 04:52:55PM +0800, Ming Lei wrote:
> > BTRFS is the only user of this helper, so move this helper into
> > BTRFS, and implement it via bio_for_each_segment_all(), since
> > bio->bi_vcnt
On Fri, Nov 16, 2018 at 02:37:10PM +0100, Christoph Hellwig wrote:
> On Thu, Nov 15, 2018 at 04:52:54PM +0800, Ming Lei wrote:
> > index 2955a4ea2fa8..161e14b8b180 100644
> > --- a/fs/btrfs/compression.c
> > +++ b/fs/btrfs/compression.c
> > @@ -40
On Thu, Nov 15, 2018 at 03:23:56PM -0800, Omar Sandoval wrote:
> On Thu, Nov 15, 2018 at 04:52:52PM +0800, Ming Lei wrote:
> > BTRFS and guard_bio_eod() need to get the last singlepage segment
> > from one multipage bvec, so introduce this helper to make them happy.
> >
On Fri, Nov 16, 2018 at 02:33:14PM +0100, Christoph Hellwig wrote:
> > + if (!*sg)
> > + return sglist;
> > + else {
>
> No need for an else after an early return.
OK, good catch!
Thanks,
Ming
On Thu, Nov 15, 2018 at 12:20:28PM -0800, Omar Sandoval wrote:
> On Thu, Nov 15, 2018 at 04:52:50PM +0800, Ming Lei wrote:
> > First it is more efficient to use bio_for_each_bvec() in both
> > blk_bio_segment_split() and __blk_recalc_rq_segments() to compute how
> >
On Sun, Nov 18, 2018 at 08:10:14PM -0700, Jens Axboe wrote:
> On 11/18/18 7:23 PM, Ming Lei wrote:
> > On Fri, Nov 16, 2018 at 02:13:05PM +0100, Christoph Hellwig wrote:
> >>> -#define bvec_iter_page(bvec, iter) \
> >>> +#de
On Fri, Nov 16, 2018 at 02:30:28PM +0100, Christoph Hellwig wrote:
> > +static inline void __bio_advance_iter(struct bio *bio, struct bvec_iter
> > *iter,
> > + unsigned bytes, bool mp)
>
> I think these magic 'bool np' arguments and wrappers over wrapper
> don't
On Sat, Nov 17, 2018 at 11:03:42AM +0100, Greg Kroah-Hartman wrote:
> On Sat, Nov 17, 2018 at 10:34:18AM +0800, Ming Lei wrote:
> > On Fri, Nov 16, 2018 at 06:06:23AM -0800, Greg Kroah-Hartman wrote:
> > > On Fri, Nov 16, 2018 at 07:23:11PM +0800, Ming Lei wrote:
> > >
On Fri, Nov 16, 2018 at 06:06:23AM -0800, Greg Kroah-Hartman wrote:
> On Fri, Nov 16, 2018 at 07:23:11PM +0800, Ming Lei wrote:
> > Now q->queue_ctx is just one read-mostly table for query the
> > 'blk_mq_ctx' instance from one cpu index, it isn't necessary
> > to alloca
On Fri, Nov 16, 2018 at 06:05:21AM -0800, Greg Kroah-Hartman wrote:
> On Fri, Nov 16, 2018 at 07:23:10PM +0800, Ming Lei wrote:
> > @@ -456,7 +456,7 @@ struct request_queue {
> > /*
> > * mq queue kobject
> > */
> > - struct kobject mq_kobj
On Fri, Nov 16, 2018 at 03:04:57PM +1100, Dave Chinner wrote:
> On Thu, Nov 15, 2018 at 02:24:19PM -0800, Darrick J. Wong wrote:
> > On Fri, Nov 16, 2018 at 09:13:37AM +1100, Dave Chinner wrote:
> > > On Thu, Nov 15, 2018 at 11:10:36AM +0800, Ming Lei wrote:
> > > >
Hi Jens,
The 1st patch fixes the kobject lifetime issue which is triggerd when
DEBUG_KOBJECT_RELEASE is enabled.
The 2nd patch can be thought as one follow-up cleanup.
V2:
- allocate 'blk_mq_ctx' inside blk_mq_init_allocated_queue()
- allocate q->mq_kobj directly
Ming Lei
Now q->queue_ctx is just one read-mostly table for query the
'blk_mq_ctx' instance from one cpu index, it isn't necessary
to allocate it as percpu variable. One simple array may be
more efficient.
Cc: "jianchao.wang"
Cc: Guenter Roeck
Cc: Greg Kroah-Hartman
Signed-off-by: Ming Le
ocated dynamically.
This patch fixes kernel panic issue during booting when DEBUG_KOBJECT_RELEASE
is enabled.
Reported-by: Guenter Roeck
Cc: "jianchao.wang"
Cc: Guenter Roeck
Cc: Greg Kroah-Hartman
Cc: sta...@vger.kernel.org
Signed-off-by: Ming Lei
---
block/blk-m
On Fri, Nov 16, 2018 at 02:11:07PM +0800, jianchao.wang wrote:
>
>
> On 11/16/18 11:28 AM, Ming Lei wrote:
> ...
> >
> > +struct blk_mq_kobj {
> > + struct kobject kobj;
> > +};
> > +
> > static void blk_mq_sysfs_release(struct kobject *
On Fri, Nov 16, 2018 at 01:52:05AM -0500, Sasha Levin wrote:
> On Fri, Nov 16, 2018 at 11:28:25AM +0800, Ming Lei wrote:
> > Even though .mq_kobj, ctx->kobj and q->kobj share same lifetime
> > from block layer's view, actually they don't because userspace may
> > grab on
Hi Jens,
The 1st patch fixes the kobject lifetime issue which is triggerd when
DEBUG_KOBJECT_RELEASE is enabled.
The 2nd patch can be thought as one follow-up cleanup.
Ming Lei (2):
blk-mq: not embed .mq_kobj and ctx->kobj into queue instance
blk-mq: alloc q->queue_ctx as normal
ocated dynamically.
This patch fixes kernel panic issue during booting when DEBUG_KOBJECT_RELEASE
is enabled.
Reported-by: Guenter Roeck
Cc: Guenter Roeck
Cc: Greg Kroah-Hartman
Cc: sta...@vger.kernel.org
Signed-off-by: Ming Lei
---
block/blk-mq-sysfs.c
Now q->queue_ctx is just one read-mostly table for query the
'blk_mq_ctx' instance from one cpu index, it isn't necessary
to allocate it as percpu variable. One simple array may be
more efficient.
Cc: Guenter Roeck
Cc: Greg Kroah-Hartman
Signed-off-by: Ming Lei
---
block/blk-mq-sysfs.c |
This test covers the following two issues:
1) discard sector need to be aligned with logical block size
2) make sure 'sector_t' instead of 'unsigned int' is used when comparing
with discard sector size
Signed-off-by: Ming Lei
---
tests/block/025 | 37
On Thu, Nov 15, 2018 at 12:22:01PM +1100, Dave Chinner wrote:
> On Thu, Nov 15, 2018 at 09:06:52AM +0800, Ming Lei wrote:
> > On Wed, Nov 14, 2018 at 08:18:24AM -0700, Jens Axboe wrote:
> > > On 11/13/18 2:43 PM, Dave Chinner wrote:
> > > > From: Dave Chinner
>
On Wed, Nov 14, 2018 at 08:18:24AM -0700, Jens Axboe wrote:
> On 11/13/18 2:43 PM, Dave Chinner wrote:
> > From: Dave Chinner
> >
> > A discard cleanup merged into 4.20-rc2 causes fstests xfs/259 to
> > fall into an endless loop in the discard code. The test is creating
> > a device that is
On Wed, Nov 14, 2018 at 4:09 PM Dave Chinner wrote:
>
> On Wed, Nov 14, 2018 at 10:53:11AM +0800, Ming Lei wrote:
> > On Wed, Nov 14, 2018 at 5:44 AM Dave Chinner wrote:
> > >
> > > From: Dave Chinner
> > >
> > > A discard cleanup merged in
int, nr_sects,
+ unsigned int req_sects = min_t(sector_t, nr_sects,
bio_allowed_max_sectors(q));
>
> + WARN_ON_ONCE(req_sects == 0);
The above line isn't necessary given 'nr_sects' can't be zero.
Thanks,
Ming Lei
-scsi/sata/usb-storage emulated via qemu-2.10.2-1.fc27, not observed
this problem.
Thanks,
Ming Lei
On Wed, Nov 7, 2018 at 11:47 PM Keith Busch wrote:
>
> On Wed, Nov 07, 2018 at 11:44:59PM +0800, Ming Lei wrote:
> > blk_update_request() may tell us how much progress made, :-)
>
> Except when it doesn't, which is 100% of the time for many block
> drivers, includi
On Wed, Nov 7, 2018 at 11:19 PM Keith Busch wrote:
>
> On Wed, Nov 07, 2018 at 11:09:27PM +0800, Ming Lei wrote:
> > On Wed, Nov 7, 2018 at 10:42 PM Keith Busch wrote:
> > >
> > > If the kernel allocates a bounce buffer for user read data, this memory
> >
if (ret)
> goto cleanup;
> } else {
> + zero_fill_bio(bio);
> iov_iter_advance(iter, bio->bi_iter.bi_size);
> }
This way looks inefficient because zero fill should only be required
for short READ.
Thanks,
Ming Lei
On Tue, Nov 06, 2018 at 04:48:13PM +, Rui Salvaterra wrote:
> On Mon, 5 Nov 2018 at 03:41, Ming Lei wrote:
> >
> > V2 addresses Christoph's comment by introducing bio_allowed_max_sectors().
> >
> > Ping...
> >
> > Thanks,
> > Ming
>
> H
On Mon, Oct 29, 2018 at 08:57:16PM +0800, Ming Lei wrote:
> Hi,
>
> The 1st & 3rd patch fixes bio size alignment issue.
>
> The 2nd patch cleans up __blkdev_issue_discard() a bit.
>
> V2:
> - introduce helper of bio_allowed_max_sectors()
> - add comm
This reverts commit 1d44f6f43e229ca06bf680aa7eb5ad380eaa5d72.
---
drivers/pci/msi.c | 14 --
include/linux/interrupt.h | 4
kernel/irq/affinity.c | 40 +---
3 files changed, 9 insertions(+), 49 deletions(-)
diff --git
/main.c:1068
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:350
Reported-by: syzbot+3701447012fe951da...@syzkaller.appspotmail.com
Signed-off-by: Ming Lei
---
V2:
- don't reference queue via disk->queue in brd_alloc()
drivers/block/brd.c | 16 +++-
1 file changed,
/main.c:1068
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:350
Reported-by: syzbot+3701447012fe951da...@syzkaller.appspotmail.com
Signed-off-by: Ming Lei
---
drivers/block/brd.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/block/brd.c b/drivers
On Wed, Oct 24, 2018 at 9:18 PM Ming Lei wrote:
>
> rq_qos_exit() removes the current q->rq_qos, this action has to be
> done after queue is frozen, otherwise the IO queue path may never
> be waken up, then IO hang is caused.
>
> So fixes this issue by moving rq_qos_exit()
ke Snitzer
Cc: Christoph Hellwig
Cc: Xiao Ni
Cc: Mariusz Dabrowski
Signed-off-by: Ming Lei
---
block/blk-lib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-lib.c b/block/blk-lib.c
index d58d5d87dd88..e8b3bb9bf375 100644
--- a/block/blk-lib.c
+++ b/block
Cleanup __blkdev_issue_discard() a bit:
- remove local variable of 'end_sect'
- remove code block of 'fail'
Cc: Rui Salvaterra
Cc: Mike Snitzer
Cc: Christoph Hellwig
Cc: Xiao Ni
Cc: Mariusz Dabrowski
Signed-off-by: Ming Lei
---
block/blk-lib.c | 23 ++-
1 file changed
Hi,
The 1st & 3rd patch fixes bio size alignment issue.
The 2nd patch cleans up __blkdev_issue_discard() a bit.
V2:
- introduce helper of bio_allowed_max_sectors()
- add commit log for patch 2
Ming Lei (3):
block: make sure discard bio is aligned with logical block
t;block: re-add discard_granularity and alignment
checks")
Reported-by: Rui Salvaterra
Cc: Rui Salvaterra
Cc: sta...@vger.kernel.org
Cc: Mike Snitzer
Cc: Christoph Hellwig
Cc: Xiao Ni
Cc: Mariusz Dabrowski
Signed-off-by: Ming Lei
---
block/blk-lib.c | 3 +--
block/blk-merge.c | 3 ++-
bl
On Sat, Oct 27, 2018 at 12:01:09AM +0800, Jianchao Wang wrote:
> Merge blk_mq_try_issue_directly and __blk_mq_try_issue_directly
> into one interface which is able to handle the return value from
> .queue_rq callback. Due to we can only issue directly w/o io
> scheduler, so remove the
On Sun, Oct 28, 2018 at 04:49:47PM +0100, Christoph Hellwig wrote:
> On Sun, Oct 28, 2018 at 08:51:31AM +0800, Ming Lei wrote:
> > On Fri, Oct 26, 2018 at 09:44:15AM +0200, Christoph Hellwig wrote:
> > > > if (req_sects > UINT_MAX >> 9)
> > &
On Fri, Oct 26, 2018 at 09:44:15AM +0200, Christoph Hellwig wrote:
> > if (req_sects > UINT_MAX >> 9)
> > - req_sects = UINT_MAX >> 9;
> > + req_sects = (UINT_MAX >> 9) & ~bs_mask;
>
> Given that we have this same thing duplicated in write zeroes
>
Hi,
The 1st & 3rd patch fixes bio size alignment issue.
The 2nd patch cleans up __blkdev_issue_discard() a bit.
Thanks,
Ming Lei (3):
block: make sure discard bio is aligned with logical block size
block: cleanup __blkdev_issue_discard()
block: make sure writesame bio is ali
Dabrowski
Signed-off-by: Ming Lei
---
block/blk-lib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-lib.c b/block/blk-lib.c
index 93011785f710..1750f0e480c0 100644
--- a/block/blk-lib.c
+++ b/block/blk-lib.c
@@ -149,7 +149,7 @@ static int __blkdev_issue_write_s
Cleanup __blkdev_issue_discard().
Cc: Rui Salvaterra
Cc: Mike Snitzer
Cc: Christoph Hellwig
Cc: Xiao Ni
Cc: Mariusz Dabrowski
Signed-off-by: Ming Lei
---
block/blk-lib.c | 23 +--
1 file changed, 5 insertions(+), 18 deletions(-)
diff --git a/block/blk-lib.c b/block/blk
c: Xiao Ni
Cc: Mariusz Dabrowski
Signed-off-by: Ming Lei
---
block/blk-lib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-lib.c b/block/blk-lib.c
index bbd44666f2b5..aa3944946b2f 100644
--- a/block/blk-lib.c
+++ b/block/blk-lib.c
@@ -59,7 +59,7 @@ int __blkdev_iss
rq_qos_exit() removes the current q->rq_qos, this action has to be
done after queue is frozen, otherwise the IO queue path may never
be waken up, then IO hang is caused.
So fixes this issue by moving rq_qos_exit() after queue is frozen.
Cc: Josef Bacik
Signed-off-by: Ming Lei
---
block/
On Thu, Oct 18, 2018 at 03:24:47PM -0600, Jens Axboe wrote:
> We're only setting up the bounce bio sets if we happen
> to need bouncing for regular HIGHMEM, not if we only need
> it for ISA devices.
>
> Reported-by: Ondrej Zary
> Tested-by: Ondrej Zary
> Signed-off-by: Jens Axboe
>
> diff
On Thu, Oct 18, 2018 at 05:22:19PM +0200, Christoph Hellwig wrote:
> On Thu, Oct 18, 2018 at 08:11:23AM -0700, Matthew Wilcox wrote:
> > On Thu, Oct 18, 2018 at 04:42:07PM +0200, Christoph Hellwig wrote:
> > > This all seems quite complicated.
> > >
> > > I think the interface we'd want is more
On Thu, Oct 18, 2018 at 07:52:59PM -0600, Jens Axboe wrote:
> On 10/18/18 7:39 PM, Ming Lei wrote:
> > On Thu, Oct 18, 2018 at 07:33:50PM -0600, Jens Axboe wrote:
> >> On 10/18/18 7:28 PM, Ming Lei wrote:
> >>> On Thu, Oct 18, 2018 at 08:27:28AM -0600, Jens Axboe wro
On Thu, Oct 18, 2018 at 07:33:50PM -0600, Jens Axboe wrote:
> On 10/18/18 7:28 PM, Ming Lei wrote:
> > On Thu, Oct 18, 2018 at 08:27:28AM -0600, Jens Axboe wrote:
> >> On 10/18/18 7:18 AM, Ming Lei wrote:
> >>> Now we only check if DMA IO buffer is aligned to queue_
On Thu, Oct 18, 2018 at 08:27:28AM -0600, Jens Axboe wrote:
> On 10/18/18 7:18 AM, Ming Lei wrote:
> > Now we only check if DMA IO buffer is aligned to queue_dma_alignment()
> > for pass-through request, and it isn't done for normal IO request.
> >
> > Given the check
: Christoph Hellwig
Cc: Bart Van Assche
Cc: Matthew Wilcox
Signed-off-by: Ming Lei
---
block/blk-settings.c | 89 +---
1 file changed, 50 insertions(+), 39 deletions(-)
diff --git a/block/blk-settings.c b/block/blk-settings.c
index cf9cd241dc16
epares for
making it as one stacked limit.
Cc: Vitaly Kuznetsov
Cc: Dave Chinner
Cc: Linux FS Devel
Cc: Darrick J. Wong
Cc: x...@vger.kernel.org
Cc: Dave Chinner
Cc: Christoph Hellwig
Cc: Bart Van Assche
Cc: Matthew Wilcox
Signed-off-by: Ming Lei
---
block/blk-settings.c | 6 +++---
include
o/?t=15373485754=1=2
Thanks,
Ming
Ming Lei (5):
block: warn on un-aligned DMA IO buffer
block: move .dma_alignment into q->limits
block: make dma_alignment as stacked limit
block: introduce helpers for allocating IO buffers from slab
xfs: use block layer helpers to allocate io buffer fr
1 - 100 of 2196 matches
Mail list logo