bio_for_each_page_all() can't be used any more after multipage bvec is
enabled, so we have to convert to bio_for_each_page_all2().
Signed-off-by: Ming Lei
---
fs/f2fs/data.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
Now multipage bvec can cover CONFIG_THP_SWAP, so we don't need to
increase BIO_MAX_PAGES for it.
Signed-off-by: Ming Lei
---
include/linux/bio.h | 8
1 file changed, 8 deletions(-)
diff --git a/include/linux/bio.h b/include/linux/bio.h
index fc8a8238805e..839dddf81d09 100644
No one uses it any more, so kill it and we can reuse this helper
name.
Signed-off-by: Ming Lei
---
include/linux/bio.h | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 5ae2bc876295..c5e692d43f23 100644
--- a/include/linux
Under some situations, such as block direct I/O, we can't use
bio_add_page() for merging pages into multipage bvec, so
a new function is implemented for converting page array into one
segment array, then these cases can benefit from multipage bvec
too.
Signed-off-by: Ming Lei
---
block/
Now multipage bvec is supported, and some helpers may return page by
page, and some may return segment by segment, this patch documents the
usage for helping us use them correctly.
Signed-off-by: Ming Lei
---
Documentation/block/biovecs.txt | 32
1 file changed
Now bio_for_each_page_all() is gone, we can reuse the name to iterate
bio page by page, which is done via bio_for_each_page_all2() now.
Signed-off-by: Ming Lei
---
block/bio.c | 14 +++---
block/blk-zoned.c | 4 ++--
block/bounce.c| 4 ++--
drivers/md
This patch pulls the trigger for multipage bvecs.
Now any request queue which supports queue cluster will see multipage
bvecs.
Signed-off-by: Ming Lei
---
block/bio.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/block/bio.c b/block/bio.c
index c160c143cc1b..bc3992f52fe8
bio_for_each_page_all() can't be used any more after multipage bvec is
enabled, so we have to convert to bio_for_each_page_all2().
Signed-off-by: Ming Lei
---
fs/ext4/page-io.c | 3 ++-
fs/ext4/readpage.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/ext4/page
On Fri, May 25, 2018 at 10:30:46AM -0600, Jens Axboe wrote:
> On 5/24/18 10:53 PM, Kent Overstreet wrote:
> > On Fri, May 25, 2018 at 11:45:48AM +0800, Ming Lei wrote:
> >> Hi,
> >>
> >> This patchset brings multipage bvec into block layer:
> >
> >
On Sun, May 27, 2018 at 07:44:52PM -0600, Jens Axboe wrote:
> On 5/27/18 1:23 AM, Ming Lei wrote:
> > On Fri, May 25, 2018 at 10:30:46AM -0600, Jens Axboe wrote:
> >> On 5/24/18 10:53 PM, Kent Overstreet wrote:
> >>> On Fri, May 25, 2018 at 11:45:48AM +0
software intervention, and AER logs them for informational purposes.
>
> But it seems very likely that these corrected errors are related to
> the nvme timeout: the first corrected errors were logged at
> 12720.894411, nvme_io_timeout defaults to 30 seconds, and the nvme
> timeout was at 12750.281158.
The following patchset might help this issue:
https://marc.info/?l=linux-block&m=152604179903505&w=2
--
Ming Lei
On Wed, May 30, 2018 at 4:36 PM, jianchao.wang
wrote:
> Hi ming
>
> Thanks for your kindly response.
>
> On 05/30/2018 04:22 PM, Ming Lei wrote:
>>>> you could keep the software queues as-is but add our own version of
>>>> flush_busy_ctxs() that only remo
On Tue, May 29, 2018 at 09:22:40AM +0200, Johannes Thumshirn wrote:
> On Mon, May 28, 2018 at 11:02:36PM -0400, Mike Snitzer wrote:
> > No, what both Red Hat and SUSE are saying is: cool let's have a go at
> > "Plan A" but, in parallel, what harm is there in allowing "Plan B" (dm
> > multipath) to
>
> + /*
> +* switch io scheduler to NULL to clean up the data in it.
> +* will get it back after update mapping between cpu and hw queues.
> +*/
> + list_for_each_entry(q, &set->tag_list, tag_set_list) {
> + if (!q->elevator) {
> + q->elv_type = NULL;
> + continue;
> + }
> + q->elv_type = q->elevator->type;
> + mutex_lock(&q->sysfs_lock);
> + /*
> +* elevator_release will put it.
> +*/
> + __module_get(q->elv_type->elevator_owner);
I understand what elevator_release() frees is the 'ref-counter' got in
elevator_get(), but who will be the counter-pair of the above __module_get()?
Thanks,
Ming Lei
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 blk_mq_get_dr
On Thu, Oct 11, 2018 at 02:12:11PM +0100, John Garry wrote:
> On 11/10/2018 11:15, Christoph Hellwig wrote:
> > On Thu, Oct 11, 2018 at 10:59:11AM +0100, John Garry wrote:
> > >
> > > > blk-mq tags are always per-host (which has actually caused problems for
> > > > ATA, which is now using its own
No functional change, and prepare for the following patch to
support allocating (and affinitizing) sets of IRQs.
Cc: Thomas Gleixner
Cc: linux-kernel@vger.kernel.org
Cc: Hannes Reinecke
Cc: Ming Lei
Cc: Keith Busch
Cc: Sagi Grimberg
Signed-off-by: Ming Lei
---
kernel/irq/affinity.c | 92
Gleixner
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Hannes Reinecke
Reviewed-by: Ming Lei
Reviewed-by: Keith Busch
Reviewed-by: Sagi Grimberg
Signed-off-by: Jens Axboe
Signed-off-by: Ming Lei
---
drivers/pci/msi.c | 14 ++
include/linux/interrupt.h | 4 +++
kernel/irq
On Mon, Nov 05, 2018 at 12:50:50PM +0100, Johannes Thumshirn wrote:
> On 05/11/2018 11:55, Ming Lei wrote:
> > On Mon, Nov 05, 2018 at 11:23:01AM +0100, Johannes Thumshirn wrote:
> >> With drivers like iSer we are seeing a lot of bio splitting and smaller
> >> I/Os
draininig IO.
The 4th patch applies blk_mq_unfreeze_queue_no_drain_io() to
NVMe PCI timeout, so that IO hang may be avoided inside
nvme_reset_work() when new IO timeout is triggered.
Part of idea is from Jianchao's early work:
https://marc.info/?l=linux-kernel&m=153612052611020&w=2
On Fri, Feb 05, 2021 at 10:17:06AM +0800, Ming Lei wrote:
> Hi Guys,
>
> The two patches changes block ioctl(BLKRRPART) for avoiding drop &
> re-add partitions if partitions state isn't changed. The current
> behavior confuses userspace because partitions can disapp
i-segment discards. It calculates the correct discard segment
> count by counting the number of bio as each discard bio is considered its
> own segment.
>
> Fixes: 1e739730c5b9 ("block: optionally merge discontiguous discard bios into
> a single request")
> Signed-off-b
On Tue, Feb 16, 2021 at 09:44:30AM +0100, Christoph Hellwig wrote:
> On Mon, Feb 15, 2021 at 12:03:41PM +0800, Ming Lei wrote:
> > Hello,
>
> I think this is a fundamentally bad idea. We should not keep the
> parsed partition state around forever just to work around some
On Wed, Dec 3, 2014 at 7:38 PM, Ming Lei wrote:
> When one hardware queue has no mapped software queues, it
> shouldn't have been scheduled. Otherwise WARNING or OOPS
> can triggered.
>
> blk_mq_hw_queue_mapped() helper is introduce for fixing
> the problem.
>
On Tue, Dec 9, 2014 at 4:57 AM, Greg Kroah-Hartman
wrote:
> On Mon, Dec 08, 2014 at 05:47:30PM +0100, Pali Rohár wrote:
>> On Monday 08 December 2014 17:37:14 Greg Kroah-Hartman wrote:
>> > On Mon, Dec 08, 2014 at 11:18:18PM +0800, Ming Lei wrote:
>> > > On Sat, Dec
On Tue, Dec 9, 2014 at 12:39 PM, Jens Axboe wrote:
> On 12/08/2014 05:41 PM, Ming Lei wrote:
>
>
> Picked up for 3.19, sorry for the delay. I'm curious how this queue gets
Thanks!
> scheduled, though. My worry here would be that we are masking a bug that
> should be fix
atches attached.
>
> - Sedat -
>
> [1] http://marc.info/?l=linux-kernel&m=142003220301459&w=2
> [2]
> http://wiki.mikejung.biz/Benchmarking#Fio_Random_Write_Test_using_libaio_and_direct_flags
Thanks,
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel
On Thu, Jan 1, 2015 at 8:18 AM, Sedat Dilek wrote:
> On Thu, Jan 1, 2015 at 1:01 AM, Ming Lei wrote:
>> Hi Sedat,
>>
>> On Thu, Jan 1, 2015 at 6:32 AM, Sedat Dilek wrote:
>>> Forgot to CC LKML and linux-fsdevel.
>>>
>>> - Sedat -
>>
>>
ted to play with "block: loop: convert to blk-mq (v3)", so I
>>> recalled this other improvement. )
>>
>> It met with some harsh resistance, so I backed off on it. Then Al Viro
>> got busy re-writing the iov_iter infrastructure and I put my patchset on
>
On Thu, Jan 1, 2015 at 11:14 PM, Sedat Dilek wrote:
> On Thu, Jan 1, 2015 at 1:29 AM, Ming Lei wrote:
> [...]
>>> How did you test with fio (your fio lines)?
>>
>> Your fio command line is basically same with my fio config, and you
>> can attach one image t
Check IS_ERR_OR_NULL(return value) instead of just return value.
Signed-off-by: Ming Lei
---
drivers/block/null_blk.c |2 +-
drivers/block/nvme-core.c |2 +-
drivers/block/virtio_blk.c |2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/block/null_blk.c
t;> [ 88.028750] [] ? hrtimer_get_res+0x50/0x50
>> [ 88.028753] [] ? lookup_ioctx+0xd0/0x140
>> [ 88.028755] [] SyS_io_getevents+0x62/0x100
>> [ 88.028759] [] ? trace_hardirqs_on_thunk+0x3a/0x3f
>> [ 88.028762] [] system_call_fastpath+0x16/0x1b
>> [ 88.0287
On 1/6/15, Maxim Patlasov wrote:
> On 12/31/2014 04:52 PM, Ming Lei wrote:
>> On Thu, Jan 1, 2015 at 6:35 AM, Sedat Dilek
>> wrote:
>>> On Wed, Dec 31, 2014 at 10:52 PM, Dave Kleikamp
>>> wrote:
>>>> On 12/31/2014 02:38 PM, Sedat Dilek wrote:
>
irmware from user space, and this way is simpler and more flexible
since we have request_firmware_direct() already.
Thanks,
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
On Mon, Dec 8, 2014 at 11:22 PM, Pali Rohár wrote:
> On Monday 08 December 2014 16:18:18 Ming Lei wrote:
>> On Sat, Dec 6, 2014 at 9:02 PM, Pali Rohár
> wrote:
>> > On Saturday 06 December 2014 13:49:54 Pavel Machek wrote:
>> > /**
>> >
>> > + *
k/brd.c)
> * mtip_submit_request (drivers/block/mtip32xx/mtip32xx.c)
> * loop_make_request
> * null_queue_bio
> * bcache's make_request fns
I guess the above drivers haven't max_sectors/max_segment
limit.
Thanks,
Ming Lei
--
To unsubscribe from this list: send the line "unsub
ntime,
performance of write and randwrite isn't hurted basically.
Another benefit is that loop driver code gets simplified
much after blk-mq conversion, and the patch can be thought as
cleanup too.
Signed-off-by: Ming Lei
---
drivers/block/loo
block core handles REQ_FUA by its flush state machine, so
won't do it in loop explicitly.
Signed-off-by: Ming Lei
---
drivers/block/loop.c | 14 +++---
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 018af27..18
No behaviour change, just move the handling for REQ_DISCARD
and REQ_FLUSH in these two functions.
Signed-off-by: Ming Lei
---
drivers/block/loop.c | 73 +++---
1 file changed, 40 insertions(+), 33 deletions(-)
diff --git a/drivers/block/loop.c b
Switch to block request completely.
Signed-off-by: Ming Lei
---
drivers/block/loop.c | 45 -
1 file changed, 20 insertions(+), 25 deletions(-)
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index c678eb2..d958901 100644
--- a/drivers
loop.c | 417
drivers/block/loop.h | 17 +-
include/linux/blk-mq.h |2 +
5 files changed, 221 insertions(+), 220 deletions(-)
Thanks,
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.o
It is handy to use the two helpers for switching backend file
in loop driver, so export them.
Signed-off-by: Ming Lei
---
block/blk-mq.c |4 +++-
block/blk-mq.h |1 -
include/linux/blk-mq.h |2 ++
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/block
contains magic
for the sg and tape drivers that's still missing from
blk_rq_map_user_iov
Looks all are nice cleanup:
Reviewed-by: Ming Lei
Also patches passed xfstests(check -g auto) against v3.19-rc4_next-20150115.
Thanks,
Ming Lei
--
To unsubscribe from this list: send the
It doesn't make sense to continue to pin user pages when
bio can't hold more pages.
Also this patch fixes possible double page release issue
when get_user_pages_fast() failure happens just after some
of pages in last round weren't added in the bio.
Signed-off-by: Ming Lei
-
VEC)))
>
> Why do you want to limit what the iov_iter can contain? iovec based
> ones seem very useful, and athough I can come up with a use case
> for vectors pointing to userspace address I can't see anything that
> speaks against allowing them either.
> call this from drive
l_submit()
drivers/block/loop.c | 173 --
drivers/block/loop.h | 11
fs/aio.c | 121 +++
fs/direct-io.c |9 ++-
include/linux/aio.h | 17 -
5 files changed, 323 insertions(+),
So that users can control if kernel aio is used to submit I/O.
Signed-off-by: Ming Lei
---
drivers/block/loop.c | 33 +
drivers/block/loop.h |1 +
2 files changed, 34 insertions(+)
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index d1f168b
st 2
http://kernel.ubuntu.com/~ming/block/loop-mq-aio/v2/vm-loop-mq-fio-disk.pdf
[4], linux kernel base plus kernel aio patch: sar monitor result in case of fio
test 2
http://kernel.ubuntu.com/~ming/block/loop-mq-aio/v2/vm-loop-mq-aio-fio-disk.pdf
Cc: Maxim Patlasov
che problem too
- socket users may benifit from the APIs too
Cc: Maxim Patlasov
Cc: Zach Brown
Cc: Dave Kleikamp
Cc: Benjamin LaHaise
Cc: Alexander Viro
Cc: linux-fsde...@vger.kernel.org
Cc: linux-...@kvack.org (open list:AIO)
Signed-off-by: Ming Lei
---
fs/aio.c
atlasov
Cc: Omar Sandoval
Cc: Zach Brown
Cc: Dave Kleikamp
Cc: Benjamin LaHaise
Cc: Alexander Viro
Cc: linux-fsde...@vger.kernel.org
Signed-off-by: Ming Lei
---
fs/direct-io.c |9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/fs/direct-io.c b/fs/direct-io.c
in
rk, if there are
>> any.
>
> There is a network timeout issue, which is probably one of the more
> important fixes to get in:
>
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=770479
Last time I studied nbd driver a while to see if socket aio can be
used to improve perf
On Wed, Jan 14, 2015 at 12:23 AM, Christoph Hellwig wrote:
> On Tue, Jan 13, 2015 at 11:44:44PM +0800, Ming Lei wrote:
>> Follows benefits from using kernel aio in loop:
>> - avoid double cache, and memory usage decreased a lot
>> - system load gets much decrea
*/
> + mutex_lock(&fw_lock);
> + list_del_init(&buf->pending_list);
> + mutex_unlock(&fw_lock);
The buf is always removed before the complete_all(), isn't it? Or did
you observe the issue?
Thanks,
Ming Lei
> + }
>
. It's a test tool for storage stack development.
>
> I understand that null block is just for testing.
>
> I just think the message like:
>
> [1.971628] nullb0: unknown partition table
>
> may confuse the end user. They may think there are something wrong.
> B
On Thu, Jan 8, 2015 at 12:39 AM, Sasha Levin wrote:
> On 01/06/2015 11:52 PM, Ming Lei wrote:
>> On Mon, Jan 5, 2015 at 11:41 PM, Sasha Levin wrote:
>>> > If we failed loading the firmware we have to make sure it leaves the
>>> > pending
>>&
On Thu, Jan 8, 2015 at 10:37 AM, Sasha Levin wrote:
> On 01/07/2015 09:15 PM, Ming Lei wrote:
>> On Thu, Jan 8, 2015 at 12:39 AM, Sasha Levin wrote:
>>> On 01/06/2015 11:52 PM, Ming Lei wrote:
>>>> On Mon, Jan 5, 2015 at 11:41 PM, Sasha Levin
>>>&
On Thu, Jan 8, 2015 at 11:06 AM, Ming Lei wrote:
> On Thu, Jan 8, 2015 at 10:37 AM, Sasha Levin wrote:
>> On 01/07/2015 09:15 PM, Ming Lei wrote:
>>> On Thu, Jan 8, 2015 at 12:39 AM, Sasha Levin wrote:
>>>> On 01/06/2015 11:52 PM, Ming Lei wrote:
>>>&g
Hi Guys,
On 1/6/15, Ming Lei wrote:
> On 1/6/15, Maxim Patlasov wrote:
>> On 12/31/2014 04:52 PM, Ming Lei wrote:
>>> On Thu, Jan 1, 2015 at 6:35 AM, Sedat Dilek
>>> wrote:
>>>> On Wed, Dec 31, 2014 at 10:52 PM, Dave Kleikamp
>>>> wro
If current request is interrupted by signal, such as 'ctrl + c',
this request has to be aborted for the following reasons:
- the buf need to be removed from pending list
- same requests from other contexts need to be completed
Reported-by: Sasha Levin
Signed-off-by
It is simpler to handle timeout by wait_for_completion_interruptible_timeout(),
so remove previous delay work for timeout.
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c | 30 ++
1 file changed, 6 insertions(+), 24 deletions(-)
diff --git a/drivers/base
On Fri, Jan 16, 2015 at 4:08 AM, Sasha Levin wrote:
> When releasing hctx, we do not know that the embedded kobject has been
> released until it's ->release() callback has been called. It is unsafe
> to unconditionally free the underlying memory until the ->release()
> callback has been called sin
in q->mq_kobj's release handler.
Signed-off-by: Sasha Levin
(fix ctx kobjects)
Signed-off-by: Ming Lei
---
block/blk-mq-sysfs.c | 25 +++--
block/blk-mq.c |6 +-
2 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/block/blk-mq-sysfs.c b/block/b
On 1/25/15, Christoph Hellwig wrote:
> On Tue, Jan 13, 2015 at 11:44:47PM +0800, Ming Lei wrote:
>> So that users can control if kernel aio is used to submit I/O.
>
> Why do you want a sysfs flag for this instead of a flags in ->lo_flags
> at setup time? That's how
On Tue, Jan 27, 2015 at 1:00 AM, Christoph Hellwig wrote:
> On Tue, Jan 27, 2015 at 12:18:23AM +0800, Ming Lei wrote:
>> > Also it might make sense to just offer aio_kernel_read/write intefaces
>> > instead of the common submit wrapper, as that's much closer to o
On 1/25/15, Christoph Hellwig wrote:
> On Tue, Jan 13, 2015 at 11:44:46PM +0800, Ming Lei wrote:
>>
>> -if (dio->is_async && dio->rw == READ)
>> +if (dio->is_async && dio->rw == READ && dio->should_dirty)
>>
] worker_thread+0x11b/0x460
> [] kthread+0xef/0x110
> [] ret_from_fork+0x7c/0xb0
>
> Signed-off-by: Bart Van Assche
> Cc: Ming Lei
> Cc: Sasha Levin
> Cc: Christoph Hellwig
> ---
> block/blk-mq-sysfs.c | 15 +--
> block/blk-mq.c | 12 +++-
&g
On Fri, Mar 20, 2015 at 12:37 AM, Maxim Patlasov
wrote:
> On 03/18/2015 07:57 PM, Ming Lei wrote:
>>
>> On Thu, Mar 19, 2015 at 2:28 AM, Maxim Patlasov
>> wrote:
>>>
>>> On 01/13/2015 07:44 AM, Ming Lei wrote:
>>>>
>>>> Part of t
-fsdevel&m=142159370107007&w=2
[2], kiocb split patchset
http://marc.info/?t=14223814584&r=1&w=2
Thanks,
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info
Now loop code gets simplified a lot, and becomes more clean.
Also one extra page copy is avoided for READ in case of none
transfer.
Signed-off-by: Ming Lei
---
drivers/block/loop.c | 285 ++
drivers/block/loop.h |3 +
2 files changed, 127
The raw page allocated in lo_send() can be a highmem page,
so kmap(page) should be used for read/write on the page.
Also the patch removes kmap()/kunmap() in lo_send() because
it isn't needed at all.
Signed-off-by: Ming Lei
---
drivers/block/loop.c | 11 ++-
1 file chang
Preparing for conversion to vfs iterator based read/write, also
pass 'loop_cmd' instead of 'request' so that rw common stuff
can be put into loop_cmd easily.
Signed-off-by: Ming Lei
---
drivers/block/loop.c | 29 +++--
1 file changed, 23 insert
t the conversion.
[1], https://lkml.org/lkml/2015/1/26/137
[2], https://lkml.org/lkml/2015/3/31/888
Thanks,
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kerne
blkdev_reread_part_no_lock() too for this requirment.
Signed-off-by: Ming Lei
---
block/ioctl.c | 14 ++
include/linux/fs.h |9 +
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/block/ioctl.c b/block/ioctl.c
index 7d8befd..7dce19a 100644
--- a/block
e acquired in I/O path at that time.
- so the conversion won't cause deadlock for nbd
For dasd, both dasd_open(), dasd_release() and request function don't
acquire any mutex/semphone, so the conversion should be safe.
Signed-off-by: Ming Lei
---
block/ioctl.c | 10 --
1 file c
.
In the meantime, this patch switches to new kernel APIs
of blkdev_reread_part() and blkdev_reread_part_nolock().
Signed-off-by: Ming Lei
---
drivers/block/loop.c | 28
1 file changed, 24 insertions(+), 4 deletions(-)
diff --git a/drivers/block/loop.c b/drivers
Signed-off-by: Ming Lei
---
drivers/block/nbd.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index a98c41f..7e9d26e 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -734,7 +734,7 @@ static int __nbd_ioctl(struct
e of loop_index_mutex
- lo_open_mutex is used for syncing open() and loop_clr_fd()
- both open() and release() have been serialized by bd_mutex already
2) don't hold lo_ctl_mutex for decreasing/checking lo_refcnt in
lo_release(), then lo_ctl_mutex is only required for the last release
Also remove the obsolete comment.
Signed-off-by: Ming Lei
---
drivers/s390/block/dasd_genhd.c |9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c
index 90f39f7..2af4619 100644
--- a/drivers/s390/block
On Sun, Apr 5, 2015 at 3:24 PM, Ming Lei wrote:
> The lo_ctl_mutex is held for running all ioctl handlers, and
> in some ioctl handlers, ioctl_by_bdev(BLKRRPART) is called for
> rereading partitions, which requires bd_mutex.
>
> So it is easy to cause failure because trylock(bd_mu
is more clean, but with extra acquiring lock cost for the
failure cases, especially when we replace trylock with mutex_lock().
>
> Please also add a lockdep_assert_held to blkdev_reread_part_nolock to
> ensure callers actually do hold the lock.
Good point!
Thanks,
Ming Lei
--
To unsubscribe from this l
On Mon, Apr 6, 2015 at 9:46 PM, Jarod Wilson wrote:
> On Sun, Apr 05, 2015 at 03:24:47PM +0800, Ming Lei wrote:
>> Also remove the obsolete comment.
>>
>> Signed-off-by: Ming Lei
>> ---
>> drivers/s390/block/dasd_genhd.c |9 +++--
>> 1 fil
On Mon, Apr 6, 2015 at 9:51 PM, Jarod Wilson wrote:
>>
>> Note: patch 6/6 in the series makes this whole while() loops pointless,
>> since the possibility of the -EBUSY return goes away.
>
> Minor clarification: the -EBUSY due to the trylock, which is why that
> retry loop exists, goes away. You *
On Mon, Apr 6, 2015 at 10:50 PM, Christoph Hellwig wrote:
> On Mon, Apr 06, 2015 at 12:40:12AM +0800, Ming Lei wrote:
>> > int blkdev_reread_part(struct block_device *bdev)
>> > {
>> > if (!mutex_trylock(&bdev->bd_mutex
On Mon, Apr 6, 2015 at 9:42 PM, Jarod Wilson wrote:
> On Mon, Apr 06, 2015 at 12:40:12AM +0800, Ming Lei wrote:
>> On Mon, Apr 6, 2015 at 12:12 AM, Christoph Hellwig
>> wrote:
>> >> +/*
>> >> + * This is exported as API for block driver, can be called
&
Hi Jeff,
On Tue, Apr 7, 2015 at 3:14 AM, Jeff Moyer wrote:
> The way the on-stack plugging currently works, each nesting level
> flushes its own list of I/Os. This can be less than optimal (read
> awful) for certain workloads. For example, consider an application
> that issues asynchronous O_DI
On Sat, Apr 11, 2015 at 7:30 PM, Ming Lei wrote:
> The lo_ctl_mutex is held for running all ioctl handlers, and
> in some ioctl handlers, ioctl_by_bdev(BLKRRPART) is called for
> rereading partitions, which requires bd_mutex.
>
> So it is easy to cause failure because trylock(bd_mu
WQ_MEM_RECLAIM | WQ_HIGHPRI | WQ_UNBOUND, 0);
+ WQ_MEM_RECLAIM | WQ_HIGHPRI | WQ_UNBOUND, 32);
if (!loop_wq) {
err = -ENOMEM;
goto misc_out;
Thanks,
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-
Each bio is always submitted to block device one by one,
so it isn't necessary to increase the bio refcount by one
each time with holding dio->bio_lock.
Signed-off-by: Ming Lei
---
fs/direct-io.c | 27 +--
1 file changed, 17 insertions(+), 10 deletions(-)
diff
Hi,
On Tue, Mar 31, 2015 at 10:02 PM, Jeff Moyer wrote:
> Ming Lei writes:
>
>> Each bio is always submitted to block device one by one,
>> so it isn't necessary to increase the bio refcount by one
>> each time with holding dio->bio_lock.
>
> This patch op
hich is typically due to an -EBUSY trying to rescan
> partitions on loop device removal.
This one is because bd_mutex has been held in release path already.
Would you mind testing the attached patch which implements the above
idea?
Thanks,
Ming Lei
>
> CC: Jens Axboe
> CC: Ming Lei
On Sat, Apr 25, 2015 at 5:46 AM, Justin M. Forbes
wrote:
> On Fri, 2015-04-24 at 10:59 +0800, Ming Lei wrote:
>> Hi Justin,
>>
>> Thanks for the report.
>>
>> On Thu, 23 Apr 2015 16:04:10 -0500
>> "Justin M. Forbes" wrote:
>>
>> >
Hi Justin,
On Fri, 24 Apr 2015 16:46:02 -0500
"Justin M. Forbes" wrote:
> On Fri, 2015-04-24 at 10:59 +0800, Ming Lei wrote:
> > Hi Justin,
> >
> > Thanks for the report.
> >
> > On Thu, 23 Apr 2015 16:04:10 -0500
> > "Justin M. Forbes&q
...@vger.kernel.org (v4.0)
Reported-by: Justin M. Forbes
Tested-by: Justin M. Forbes
Signed-off-by: Ming Lei
---
drivers/block/loop.c | 19 +--
drivers/block/loop.h | 2 ++
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index
Hi Jarod,
On Wed, Apr 8, 2015 at 2:23 PM, Jarod Wilson wrote:
> From: Ming Lei
>
> The lo_ctl_mutex is held for running all ioctl handlers, and
> in some ioctl handlers, ioctl_by_bdev(BLKRRPART) is called for
> rereading partitions, which requires bd_mutex.
>
> So it is
On Wed, Apr 8, 2015 at 10:00 PM, Jarod Wilson wrote:
> On Wed, Apr 08, 2015 at 09:40:34AM -0400, Jarod Wilson wrote:
>> On Wed, Apr 08, 2015 at 02:50:59PM +0800, Ming Lei wrote:
>> > Hi Jarod,
>> >
>> > On Wed, Apr 8, 2015 at 2:23 PM, Jarod Wilson wrote:
>
>
> CC: Christoph Hellwig
> CC: Jens Axboe
> CC: Tejun Heo
> CC: Alexander Viro
> CC: Markus Pargmann
> CC: Stefan Weinhuber
> CC: Stefan Haberland
> CC: Sebastian Ott
> CC: Fabian Frederick
> CC: Ming Lei
> CC: David Herrmann
> CC: Mike Gal
On Wed, Apr 8, 2015 at 11:03 PM, Peter Zijlstra wrote:
> On Wed, Apr 08, 2015 at 10:50:56PM +0800, Ming Lei wrote:
>> > +/*
>> > + * This is an exported API for the block driver, and will not
>> > + * acquire bd_mutex, leaving it up to the caller to handle
/fs.h |3 +++
6 files changed, 79 insertions(+), 34 deletions(-)
[1], https://lkml.org/lkml/2015/1/26/137
[2], https://lkml.org/lkml/2015/3/31/888
Thanks,
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a me
introduce
__blkdev_reread_part for use in such cases.
CC: Christoph Hellwig
CC: Jens Axboe
CC: Tejun Heo
CC: Alexander Viro
CC: Markus Pargmann
CC: Stefan Weinhuber
CC: Stefan Haberland
CC: Sebastian Ott
CC: Fabian Frederick
CC: Ming Lei
CC: David Herrmann
CC: Andrew Morton
CC: Peter
, this patch switches to new kernel APIs
of blkdev_reread_part() and __blkdev_reread_part().
Signed-off-by: Jarod Wilson
Signed-off-by: Ming Lei
---
drivers/block/loop.c | 30 ++
1 file changed, 26 insertions(+), 4 deletions(-)
diff --git a/drivers/block/loop.c b
701 - 800 of 2944 matches
Mail list logo