Re: [PATCH V10 18/19] block: kill QUEUE_FLAG_NO_SG_MERGE

2018-11-19 Thread Ming Lei
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

Re: [PATCH V10 18/19] block: kill QUEUE_FLAG_NO_SG_MERGE

2018-11-19 Thread Ming Lei
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_

Re: [PATCH V10 17/19] block: don't use bio->bi_vcnt to figure out segment number

2018-11-19 Thread Ming Lei
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, > &

Re: [PATCH V10 15/19] block: always define BIO_MAX_PAGES as 256

2018-11-19 Thread Ming Lei
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

Re: [PATCH V10 14/19] block: enable multipage bvecs

2018-11-19 Thread Ming Lei
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; > > -

Re: [PATCH V10 14/19] block: enable multipage bvecs

2018-11-19 Thread Ming Lei
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

Re: [PATCH V10 13/19] iomap & xfs: only account for new added page

2018-11-19 Thread Ming Lei
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

Re: [PATCH V10 13/19] iomap & xfs: only account for new added page

2018-11-19 Thread Ming Lei
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

Re: [PATCH V10 12/19] block: allow bio_for_each_segment_all() to iterate over multi-page bvec

2018-11-19 Thread Ming Lei
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

Re: [PATCH V10 12/19] block: allow bio_for_each_segment_all() to iterate over multi-page bvec

2018-11-19 Thread Ming Lei
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

Re: [PATCH V10 11/19] bcache: avoid to use bio_for_each_segment_all() in bch_bio_alloc_pages()

2018-11-19 Thread Ming Lei
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

Re: [PATCH V10 11/19] bcache: avoid to use bio_for_each_segment_all() in bch_bio_alloc_pages()

2018-11-19 Thread Ming Lei
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

Re: [PATCH V10 10/19] block: loop: pass multi-page bvec to iov_iter

2018-11-19 Thread Ming Lei
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

Re: [PATCH V10 09/19] block: introduce bio_bvecs()

2018-11-19 Thread Ming Lei
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

Re: [PATCH V10 08/19] btrfs: move bio_pages_all() to btrfs

2018-11-19 Thread Ming Lei
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-&

Re: [PATCH V10 08/19] btrfs: move bio_pages_all() to btrfs

2018-11-19 Thread Ming Lei
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

Re: [PATCH V10 07/19] btrfs: use bvec_last_segment to get bio's last page

2018-11-19 Thread Ming Lei
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

Re: [PATCH V10 05/19] block: introduce bvec_last_segment()

2018-11-18 Thread Ming Lei
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. > >

Re: [PATCH V10 04/19] block: use bio_for_each_bvec() to map sg

2018-11-18 Thread Ming Lei
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

Re: [PATCH V10 03/19] block: use bio_for_each_bvec() to compute multi-page bvec count

2018-11-18 Thread Ming Lei
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 > >

Re: [PATCH V10 01/19] block: introduce multi-page page bvec helpers

2018-11-18 Thread Ming Lei
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

Re: [PATCH V10 02/19] block: introduce bio_for_each_bvec()

2018-11-18 Thread Ming Lei
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

[RESEND PATCH V5 10/33] btrfs: use segment_last_page to get bio's last page

2018-05-24 Thread Ming Lei
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

Re: [PATCH V5 10/33] btrfs: use segment_last_page to get bio's last page

2018-05-24 Thread Ming Lei
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

[PATCH V5 10/33] btrfs: use segment_last_page to get bio's last page

2018-05-24 Thread Ming Lei
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

Re: [PATCHSET v5] blk-mq: reimplement timeout handling

2018-01-14 Thread Ming Lei
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

Re: [PATCHSET v5] blk-mq: reimplement timeout handling

2018-01-13 Thread Ming Lei
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

Re: [PATCHSET v5] blk-mq: reimplement timeout handling

2018-01-13 Thread Ming Lei
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

Re: [PATCHSET v5] blk-mq: reimplement timeout handling

2018-01-13 Thread Ming Lei
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

[PATCH V4 10/45] btrfs: avoid to access bvec table directly for a cloned bio

2017-12-18 Thread Ming Lei
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

[PATCH V4 09/45] btrfs: avoid access to .bi_vcnt directly

2017-12-18 Thread Ming Lei
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

[PATCH V4 24/45] btrfs: use segment_last_page to get bio's last page

2017-12-18 Thread Ming Lei
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

[PATCH 10/10] btrfs: avoid to access bvec table directly for a cloned bio

2017-12-08 Thread Ming Lei
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

[PATCH 09/10] btrfs: avoid access to .bi_vcnt directly

2017-12-08 Thread Ming Lei
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

Re: [PATCH v3 11/49] btrfs: avoid access to .bi_vcnt directly

2017-10-19 Thread Ming Lei
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; > > +} > >

[PATCH v3 11/49] btrfs: avoid access to .bi_vcnt directly

2017-08-08 Thread Ming Lei
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_

[PATCH v3 12/49] btrfs: avoid to access bvec table directly for a cloned bio

2017-08-08 Thread Ming Lei
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

[PATCH v3 30/49] btrfs: use bvec_get_last_page to get bio's last page

2017-08-08 Thread Ming Lei
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

[PATCH v3 46/49] fs/btrfs: convert to bio_for_each_segment_all_sp()

2017-08-08 Thread Ming Lei
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

[PATCH v3 13/49] btrfs: comment on direct access bvec table

2017-08-08 Thread Ming Lei
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

[PATCH v2 15/51] btrfs: comment on direct access bvec table

2017-06-26 Thread Ming Lei
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

[PATCH v2 14/51] btrfs: avoid to access bvec table directly for a cloned bio

2017-06-26 Thread Ming Lei
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

[PATCH v2 13/51] btrfs: avoid access to .bi_vcnt directly

2017-06-26 Thread Ming Lei
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

[PATCH v2 32/51] btrfs: use bvec_get_last_page to get bio's last page

2017-06-26 Thread Ming Lei
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

[PATCH v2 48/51] fs/btrfs: convert to bio_for_each_segment_all_sp()

2017-06-26 Thread Ming Lei
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

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-03-16 Thread Ming Lei
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

[PATCH v1 51/54] btrfs: avoid access to .bi_vcnt directly

2016-12-27 Thread Ming Lei
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

[PATCH v1 53/54] btrfs: comment on direct access bvec table

2016-12-27 Thread Ming Lei
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

[PATCH v1 47/54] fs/btrfs: convert to bio_for_each_segment_all_sp()

2016-12-27 Thread Ming Lei
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

[PATCH v1 52/54] btrfs: use bvec_get_last_sp to get the last singlepage bvec

2016-12-27 Thread Ming Lei
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

[PATCH 26/60] btrfs: set NO_MP for request queues behind BTRFS

2016-10-29 Thread Ming Lei
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

Re: [PATCH v3 2/3] fs: direct-io: call .bi_end_io via bio_endio()

2016-05-02 Thread Ming Lei
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

Re: [PATCH v3 3/3] block: avoid to call .bi_end_io() recursively

2016-04-29 Thread Ming Lei
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

Re: [PATCH v3 3/3] block: avoid to call .bi_end_io() recursively

2016-04-28 Thread Ming Lei
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: >> > >> > >>

Re: [PATCH v3 3/3] block: avoid to call .bi_end_io() recursively

2016-04-28 Thread Ming Lei
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

Re: [PATCH v3 3/3] block: avoid to call .bi_end_io() recursively

2016-04-28 Thread Ming Lei
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

[PATCH v3 1/3] fs: direct-io: handle error in dio_end_io()

2016-04-27 Thread Ming Lei
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.

[PATCH v3 3/3] block: avoid to call .bi_end_io() recursively

2016-04-27 Thread Ming Lei
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..

[PATCH v3 2/3] fs: direct-io: call .bi_end_io via bio_endio()

2016-04-27 Thread Ming Lei
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/

[PATCH v3 0/3] block: avoid to call .bi_end_io() recursively

2016-04-27 Thread Ming Lei
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

Re: [PATCH v2 3/3] block: avoid to call .bi_end_io() recursively

2016-04-26 Thread Ming Lei
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

[PATCH v2 2/3] fs: direct-io: call .bi_end_io via bio_endio()

2016-04-26 Thread Ming Lei
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/

[PATCH v2 1/3] fs: direct-io: handle error in dio_end_io()

2016-04-26 Thread Ming Lei
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.

[PATCH v2 3/3] block: avoid to call .bi_end_io() recursively

2016-04-26 Thread Ming Lei
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..

[PATCH v2 0/3] block: avoid to call .bi_end_io() recursively

2016-04-26 Thread Ming Lei
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

[RFC PATCH v1] block: avoid to call .bi_end_io() recursively

2016-04-08 Thread Ming Lei
=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@

RE: fs_mark test on btrfs on 3.16.0-rc6+ #1 SMP

2014-08-19 Thread Ming Lei
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

fs_mark test on btrfs on 3.16.0-rc6+ #1 SMP

2014-08-18 Thread Ming Lei
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