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
Preparing for supporting multipage bvec.
Cc: Chris Mason <c...@fb.com>
Cc: Josef Bacik <jba...@fb.com>
Cc: David Sterba <dste...@suse.com>
Cc: linux-btrfs@vger.kernel.org
Signed-off-by: Ming Lei <ming@redhat.com>
---
fs/btrfs/compression.c | 5 -
fs/btrfs/extent_i
On Thu, May 24, 2018 at 11:44:41PM +0200, David Sterba wrote:
> On Thu, May 24, 2018 at 05:01:15PM +0800, Ming Lei wrote:
> > Preparing for supporting multipage bvec.
>
> Could you please also CC the cover letter so we have a chance to learn
> what multipage bvec means or wh
Preparing for supporting multipage bvec.
Cc: Chris Mason <c...@fb.com>
Cc: Josef Bacik <jba...@fb.com>
Cc: David Sterba <dste...@suse.com>
Cc: linux-btrfs@vger.kernel.org
Signed-off-by: Ming Lei <ming@redhat.com>
---
fs/btrfs/compression.c | 5 -
fs/btrfs/extent_i
d until a name is assigned). This is a dm-mpath queue.
>
> There seems to be something wrong in hctx->nr_active.
Then looks it is same with the issue I saw during starting multipathd, and the
following patch should fix that, if there isn't other issue.
https://marc.info/?l=linux-blo
On Sat, Jan 13, 2018 at 10:45:14PM +0800, Ming Lei wrote:
> On Fri, Jan 12, 2018 at 04:55:34PM -0500, Laurence Oberman wrote:
> > On Fri, 2018-01-12 at 20:57 +, Bart Van Assche wrote:
> > > On Tue, 2018-01-09 at 08:29 -0800, Tejun Heo wrote:
> > > > Currently, bl
On Fri, Jan 12, 2018 at 04:55:34PM -0500, Laurence Oberman wrote:
> On Fri, 2018-01-12 at 20:57 +, Bart Van Assche wrote:
> > On Tue, 2018-01-09 at 08:29 -0800, Tejun Heo wrote:
> > > Currently, blk-mq timeout path synchronizes against the usual
> > > issue/completion path using a complex
On Fri, Jan 12, 2018 at 04:55:34PM -0500, Laurence Oberman wrote:
> On Fri, 2018-01-12 at 20:57 +, Bart Van Assche wrote:
> > On Tue, 2018-01-09 at 08:29 -0800, Tejun Heo wrote:
> > > Currently, blk-mq timeout path synchronizes against the usual
> > > issue/completion path using a complex
k <jba...@fb.com>
Cc: David Sterba <dste...@suse.com>
Cc: linux-btrfs@vger.kernel.org
Cc: Liu Bo <bo.li@oracle.com>
Reviewed-by: Liu Bo <bo.li@oracle.com>
Acked: David Sterba <dste...@suse.com>
Signed-off-by: Ming Lei <ming@redhat.com>
---
fs/btrfs/inod
btrfs@vger.kernel.org
Acked-by: David Sterba <dste...@suse.com>
Signed-off-by: Ming Lei <ming@redhat.com>
---
fs/btrfs/extent_io.c | 9 +
fs/btrfs/extent_io.h | 2 +-
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
Preparing for supporting multipage bvec.
Cc: Chris Mason <c...@fb.com>
Cc: Josef Bacik <jba...@fb.com>
Cc: David Sterba <dste...@suse.com>
Cc: linux-btrfs@vger.kernel.org
Signed-off-by: Ming Lei <ming@redhat.com>
---
fs/btrfs/compression.c | 5 -
fs/btrfs/extent_i
k <jba...@fb.com>
Cc: David Sterba <dste...@suse.com>
Cc: linux-btrfs@vger.kernel.org
Cc: Liu Bo <bo.li@oracle.com>
Reviewed-by: Liu Bo <bo.li@oracle.com>
Acked: David Sterba <dste...@suse.com>
Signed-off-by: Ming Lei <ming@redhat.com>
---
fs/btrfs/inod
btrfs@vger.kernel.org
Acked-by: David Sterba <dste...@suse.com>
Signed-off-by: Ming Lei <ming@redhat.com>
---
fs/btrfs/extent_io.c | 9 +
fs/btrfs/extent_io.h | 2 +-
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
On Thu, Aug 10, 2017 at 04:29:59AM -0700, Christoph Hellwig wrote:
> > +static unsigned int get_bio_pages(struct bio *bio)
> > +{
> > + unsigned i;
> > + struct bio_vec *bv;
> > +
> > + bio_for_each_segment_all(bv, bio, i)
> > + ;
> > +
> > + return i;
> > +}
>
>
m>
Cc: linux-btrfs@vger.kernel.org
Acked-by: David Sterba <dste...@suse.com>
Signed-off-by: Ming Lei <ming@redhat.com>
---
fs/btrfs/extent_io.c | 20
fs/btrfs/extent_io.h | 2 +-
2 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/extent_
k <jba...@fb.com>
Cc: David Sterba <dste...@suse.com>
Cc: linux-btrfs@vger.kernel.org
Cc: Liu Bo <bo.li@oracle.com>
Reviewed-by: Liu Bo <bo.li@oracle.com>
Acked: David Sterba <dste...@suse.com>
Signed-off-by: Ming Lei <ming@redhat.com>
---
fs/btrfs/inod
Preparing for supporting multipage bvec.
Cc: Chris Mason <c...@fb.com>
Cc: Josef Bacik <jba...@fb.com>
Cc: David Sterba <dste...@suse.com>
Cc: linux-btrfs@vger.kernel.org
Signed-off-by: Ming Lei <ming@redhat.com>
---
fs/btrfs/compression.c | 5 -
fs/btrfs/exten
Cc: Chris Mason <c...@fb.com>
Cc: Josef Bacik <jba...@fb.com>
Cc: David Sterba <dste...@suse.com>
Cc: linux-btrfs@vger.kernel.org
Signed-off-by: Ming Lei <ming@redhat.com>
---
fs/btrfs/compression.c | 3 ++-
fs/btrfs/disk-io.c | 3 ++-
fs/btrfs/extent_io.c | 1
Cc: Chris Mason <c...@fb.com>
Cc: Josef Bacik <jba...@fb.com>
Cc: David Sterba <dste...@suse.com>
Cc: linux-btrfs@vger.kernel.org
Acked: David Sterba <dste...@suse.com>
Signed-off-by: Ming Lei <ming@redhat.com>
---
fs/btrfs/compression.c | 4
fs/btrfs/inod
Cc: Chris Mason <c...@fb.com>
Cc: Josef Bacik <jba...@fb.com>
Cc: David Sterba <dste...@suse.com>
Cc: linux-btrfs@vger.kernel.org
Signed-off-by: Ming Lei <ming@redhat.com>
---
fs/btrfs/compression.c | 4
fs/btrfs/inode.c | 12
2 files changed
k <jba...@fb.com>
Cc: David Sterba <dste...@suse.com>
Cc: linux-btrfs@vger.kernel.org
Cc: Liu Bo <bo.li@oracle.com>
Signed-off-by: Ming Lei <ming@redhat.com>
---
fs/btrfs/inode.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/in
m>
Cc: linux-btrfs@vger.kernel.org
Signed-off-by: Ming Lei <ming@redhat.com>
---
fs/btrfs/extent_io.c | 21 +
fs/btrfs/extent_io.h | 2 +-
2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 0863164d97d2..5
Preparing for supporting multipage bvec.
Cc: Chris Mason <c...@fb.com>
Cc: Josef Bacik <jba...@fb.com>
Cc: David Sterba <dste...@suse.com>
Cc: linux-btrfs@vger.kernel.org
Signed-off-by: Ming Lei <ming@redhat.com>
---
fs/btrfs/compression.c | 5 -
fs/btrfs/exten
Cc: Chris Mason <c...@fb.com>
Cc: Josef Bacik <jba...@fb.com>
Cc: David Sterba <dste...@suse.com>
Cc: linux-btrfs@vger.kernel.org
Signed-off-by: Ming Lei <ming@redhat.com>
---
fs/btrfs/compression.c | 3 ++-
fs/btrfs/disk-io.c | 3 ++-
fs/btrfs/extent_io.c | 1
ror(bio);
>> + else
>> + bio_io_error(bio);
>
> This doesn't look right. What if the queue is dying, and BIO_NOWAIT just
> happened to be set?
>
> And you're missing wbt_wait() as well as a blocking point. Ditto in
> blk-m
BTRFS uses bio->bi_vcnt to figure out page numbers, this
way becomes not correct once we start to support multipage
bvec.
So use bio_segments_all() instead.
Signed-off-by: Ming Lei <tom.leim...@gmail.com>
---
fs/btrfs/check-integrity.c | 7 ---
fs/btrfs/extent_io.c | 9
Signed-off-by: Ming Lei <tom.leim...@gmail.com>
---
fs/btrfs/compression.c | 4
fs/btrfs/inode.c | 17 +
2 files changed, 21 insertions(+)
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index 485a60923bba..54306dee392a 100644
--- a/fs/btrfs/compres
Signed-off-by: Ming Lei <tom.leim...@gmail.com>
---
fs/btrfs/check-integrity.c | 5 +++--
fs/btrfs/compression.c | 3 ++-
fs/btrfs/disk-io.c | 3 ++-
fs/btrfs/extent_io.c | 9 ++---
fs/btrfs/file-item.c | 6 --
fs/btrfs/inode.c
Preparing for supporting multipage bvec.
Signed-off-by: Ming Lei <tom.leim...@gmail.com>
---
fs/btrfs/compression.c | 5 -
fs/btrfs/extent_io.c | 8 ++--
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index adcf55
There are lots of direct access to .bi_vcnt & .bi_io_vec
of bio, and it isn't ready to support multipage bvecs
for BTRFS, so set NO_MP for these request queues.
Signed-off-by: Ming Lei <tom.leim...@gmail.com>
---
fs/btrfs/volumes.c | 3 +++
1 file changed, 3 insertions(+)
diff --git
On Mon, May 2, 2016 at 10:50 PM, Christoph Hellwig <h...@infradead.org> wrote:
> On Thu, Apr 28, 2016 at 09:09:48AM +0800, Ming Lei wrote:
>> bio_endio() is the graceful way to complete one bio.
>
>
>
>>
>> Signed-off-by: Ming Lei <ming@canon
On Fri, Apr 29, 2016 at 4:39 PM, Mikulas Patocka <mpato...@redhat.com> wrote:
>
>
> On Fri, 29 Apr 2016, Ming Lei wrote:
>
>> On Fri, Apr 29, 2016 at 12:59 AM, Mikulas Patocka <mpato...@redhat.com>
>> wrote:
>> >
>> >
>> > On Fri, 29
On Fri, Apr 29, 2016 at 12:59 AM, Mikulas Patocka <mpato...@redhat.com> wrote:
>
>
> On Fri, 29 Apr 2016, Ming Lei wrote:
>
>> On Thu, Apr 28, 2016 at 11:58 PM, Mikulas Patocka <mpato...@redhat.com>
>> wrote:
>> >
>> >
>>
On Thu, Apr 28, 2016 at 11:58 PM, Mikulas Patocka <mpato...@redhat.com> wrote:
>
>
> On Thu, 28 Apr 2016, Ming Lei wrote:
>
>> Hi Mikulas,
>>
>> On Thu, Apr 28, 2016 at 11:29 PM, Mikulas Patocka <mpato...@redhat.com>
>> wrote:
&g
Hi Mikulas,
On Thu, Apr 28, 2016 at 11:29 PM, Mikulas Patocka <mpato...@redhat.com> wrote:
>
>
> On Thu, 28 Apr 2016, Ming Lei wrote:
>
>> There were reports about heavy stack use by recursive calling
>> .bi_end_io()([1][2][3]). For example, more than 16K stack
If error is passed to dio_end_io(), it should have been
dealt with. Unfortunately current code just ignores that
silently.
Only btrfs uses dio_end_io().
Signed-off-by: Ming Lei <ming@canonical.com>
---
fs/direct-io.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/direct-io.
Tancheff <shaun.tanch...@seagate.com>
Cc: Christoph Hellwig <h...@infradead.org>
Cc: Mikulas Patocka <mpato...@redhat.com>
Cc: Alan Cox <a...@linux.intel.com>
Cc: Neil Brown <ne...@suse.de>
Cc: Liu Bo <bo.li....@oracle.com>
Signed-off-by: Ming Lei <ming..
bio_endio() is the graceful way to complete one bio.
Signed-off-by: Ming Lei <ming@canonical.com>
---
fs/direct-io.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/fs/direct-io.c b/fs/direct-io.c
index a8dd60a..0a35e51 100644
--- a/fs/direct-io.c
+++ b/fs/
st again: no regression found on ext4,
but generic/323 and generic/224 cause kernel oops
Ming Lei (3):
fs: direct-io: handle error in dio_end_io()
fs: direct-io: call .bi_end_io via bio_endio()
bflock: avoid to call .bi_end_io() recursively
block/bio.c
On Wed, Apr 27, 2016 at 12:02 PM, NeilBrown <ne...@suse.de> wrote:
> On Wed, Apr 27 2016, Ming Lei wrote:
>
>> There were reports about heavy stack use by recursive calling
>> .bi_end_io()([1][2][3]). For example, more than 16K stack is
>> consumed in a single b
bio_endio() is the graceful way to complete one bio.
Signed-off-by: Ming Lei <ming@canonical.com>
---
fs/direct-io.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/fs/direct-io.c b/fs/direct-io.c
index a8dd60a..0a35e51 100644
--- a/fs/direct-io.c
+++ b/fs/
If error is passed to dio_end_io(), it should have been
dealt with. Unfortunately current code just ignores that
silently.
Only btrfs uses dio_end_io().
Signed-off-by: Ming Lei <ming@canonical.com>
---
fs/direct-io.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/direct-io.
Tancheff <shaun.tanch...@seagate.com>
Cc: Christoph Hellwig <h...@infradead.org>
Cc: Mikulas Patocka <mpato...@redhat.com>
Cc: Alan Cox <a...@linux.intel.com>
Cc: Neil Brown <ne...@suse.de>
Cc: Liu Bo <bo.li....@oracle.com>
Signed-off-by: Ming Lei <ming..
text, and
makes generic/323 & generic/224 of xfstests happy on btrfs
V1:
- change to RFC
- fix when unwind_bio_endio() is called recursively
- run xfstest again: no regression found on ext4,
but generic/323 and generic/224 cause kernel oops
Ming Lei (3):
fs: d
=2
[2] http://marc.info/?l=dm-devel=139595190620008=2
[3] http://marc.info/?t=14597464411=1=2
Cc: Shaun Tancheff <shaun.tanch...@seagate.com>
Cc: Christoph Hellwig <h...@infradead.org>
Cc: Mikulas Patocka <mpato...@redhat.com>
Signed-off-by: Ming Lei <ming@
users switch to
btrfs.
-Original Message-
From: Miao Xie [mailto:mi...@cn.fujitsu.com]
Sent: Monday, August 18, 2014 8:18 PM
To: Ming Lei; linux-btrfs@vger.kernel.org
Subject: Re: fs_mark test on btrfs on 3.16.0-rc6+ #1 SMP
On Mon, 18 Aug 2014 17:38:17 +, Ming Lei wrote:
Hi,
I
Hi,
I ran the fs_mark test on a single empty hard drive. After the test, the df -h
results are:
/dev/sdk1 917G 39G 832G 5% /ext4
/dev/sdj1 932G 53G 850G 6% /btrfs
The test result for btrfs shows it ran 15 hours. Note there is no file/dir
remove operation
68 matches
Mail list logo