Re: [Cluster-devel] [PATCH V11 14/19] block: handle non-cluster bio out of blk_bio_segment_split

2018-11-22 Thread Ming Lei
On Thu, Nov 22, 2018 at 11:04:28AM +0100, Christoph Hellwig wrote: > On Thu, Nov 22, 2018 at 05:33:00PM +0800, Ming Lei wrote: > > However, using virt boundary limit on non-cluster seems over-kill, > > because the bio will be over-split(each small bvec may be split as one bio) > > if it includes

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

2018-11-22 Thread Christoph Hellwig
> +/* used for chunk_for_each_segment */ > +static inline void bvec_next_segment(const struct bio_vec *bvec, > + struct bvec_iter_all *iter_all) FYI, chunk_for_each_segment doesn't exist anymore, this is bvec_for_each_segment now. Not sure the comment helps much,

Re: [Cluster-devel] [PATCH V11 14/19] block: handle non-cluster bio out of blk_bio_segment_split

2018-11-22 Thread Christoph Hellwig
On Thu, Nov 22, 2018 at 06:32:09PM +0800, Ming Lei wrote: > On Thu, Nov 22, 2018 at 11:04:28AM +0100, Christoph Hellwig wrote: > > On Thu, Nov 22, 2018 at 05:33:00PM +0800, Ming Lei wrote: > > > However, using virt boundary limit on non-cluster seems over-kill, > > > because the bio will be

Re: [Cluster-devel] [PATCH V11 03/19] block: introduce bio_for_each_bvec()

2018-11-22 Thread Christoph Hellwig
On Thu, Nov 22, 2018 at 06:15:28PM +0800, Ming Lei wrote: > > while (bytes) { > > - unsigned segment_len = segment_iter_len(bv, *iter); > > - > > - if (max_seg_len < BVEC_MAX_LEN) > > - segment_len = min_t(unsigned, segment_len, > > -

Re: [Cluster-devel] [PATCH V11 14/19] block: handle non-cluster bio out of blk_bio_segment_split

2018-11-22 Thread Christoph Hellwig
On Thu, Nov 22, 2018 at 06:26:17PM +0800, Ming Lei wrote: > Suppose one bio includes (pg0, 0, 512) and (pg1, 512, 512): > > The split is introduced by the following code in blk_bio_segment_split(): > > if (bvprvp && bvec_gap_to_prev(q, bvprvp, bv.bv_offset)) > goto

Re: [Cluster-devel] [PATCH V11 14/19] block: handle non-cluster bio out of blk_bio_segment_split

2018-11-22 Thread Christoph Hellwig
On Thu, Nov 22, 2018 at 05:33:00PM +0800, Ming Lei wrote: > However, using virt boundary limit on non-cluster seems over-kill, > because the bio will be over-split(each small bvec may be split as one bio) > if it includes lots of small segment. The combination of the virt boundary of PAGE_SIZE -

Re: [Cluster-devel] [PATCH V11 03/19] block: introduce bio_for_each_bvec()

2018-11-22 Thread Christoph Hellwig
Btw, this patch instead of the plain rever might make it a little more clear what is going on by skipping the confusing helper altogher and operating on the raw bvec array: diff --git a/include/linux/bio.h b/include/linux/bio.h index e5b975fa0558..926550ce2d21 100644 --- a/include/linux/bio.h

Re: [Cluster-devel] [PATCH V11 14/19] block: handle non-cluster bio out of blk_bio_segment_split

2018-11-22 Thread Ming Lei
On Thu, Nov 22, 2018 at 11:41:50AM +0100, Christoph Hellwig wrote: > On Thu, Nov 22, 2018 at 06:32:09PM +0800, Ming Lei wrote: > > On Thu, Nov 22, 2018 at 11:04:28AM +0100, Christoph Hellwig wrote: > > > On Thu, Nov 22, 2018 at 05:33:00PM +0800, Ming Lei wrote: > > > > However, using virt boundary

Re: [Cluster-devel] [PATCH V11 14/19] block: handle non-cluster bio out of blk_bio_segment_split

2018-11-22 Thread Christoph Hellwig
On Thu, Nov 22, 2018 at 06:46:05PM +0800, Ming Lei wrote: > Then your patch should work by just replacing virt boundary with segment > boudary limit. I will do that change in V12 if you don't object. Please do, thanks a lot.

Re: [Cluster-devel] [PATCH V11 07/19] fs/buffer.c: use bvec iterator to truncate the bio

2018-11-22 Thread Christoph Hellwig
Btw, given that this is the last user of bvec_last_segment after my other patches I think we should kill bvec_last_segment and do something like this here: diff --git a/fs/buffer.c b/fs/buffer.c index fa37ad52e962..af5e135d2b83 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -2981,6 +2981,14 @@

Re: [Cluster-devel] [PATCH 0/2] gfs2: improvements to recovery and withdraw process (v2)

2018-11-22 Thread Steven Whitehouse
Hi, On 21/11/18 18:52, Bob Peterson wrote: Hi, This is a second draft of a two-patch set to fix some of the nasty journal recovery problems I've found lately. The original post from 08 November had horribly bad and inaccurate comments, and Steve Whitehouse and Andreas Gruenbacher pointed

Re: [Cluster-devel] [PATCH V11 03/19] block: introduce bio_for_each_bvec()

2018-11-22 Thread Ming Lei
On Wed, Nov 21, 2018 at 06:12:17PM +0100, Christoph Hellwig wrote: > On Wed, Nov 21, 2018 at 05:10:25PM +0100, Christoph Hellwig wrote: > > No - I think we can always use the code without any segment in > > bvec_iter_advance. Because bvec_iter_advance only operates on the > > iteractor, the

Re: [Cluster-devel] [PATCH V11 14/19] block: handle non-cluster bio out of blk_bio_segment_split

2018-11-22 Thread Ming Lei
On Thu, Nov 22, 2018 at 11:04:28AM +0100, Christoph Hellwig wrote: > On Thu, Nov 22, 2018 at 05:33:00PM +0800, Ming Lei wrote: > > However, using virt boundary limit on non-cluster seems over-kill, > > because the bio will be over-split(each small bvec may be split as one bio) > > if it includes

Re: [Cluster-devel] [PATCH V11 14/19] block: handle non-cluster bio out of blk_bio_segment_split

2018-11-22 Thread Ming Lei
On Wed, Nov 21, 2018 at 06:46:21PM +0100, Christoph Hellwig wrote: > Actually.. > > I think we can kill this code entirely. If we look at what the > clustering setting is really about it is to avoid ever merging a > segement that spans a page boundary. And we should be able to do > that with

Re: [Cluster-devel] [PATCH V11 03/19] block: introduce bio_for_each_bvec()

2018-11-22 Thread Ming Lei
On Thu, Nov 22, 2018 at 11:30:33AM +0100, Christoph Hellwig wrote: > Btw, this patch instead of the plain rever might make it a little > more clear what is going on by skipping the confusing helper altogher > and operating on the raw bvec array: > > > diff --git a/include/linux/bio.h

Re: [Cluster-devel] [PATCH V11 07/19] fs/buffer.c: use bvec iterator to truncate the bio

2018-11-22 Thread Ming Lei
On Thu, Nov 22, 2018 at 11:58:49AM +0100, Christoph Hellwig wrote: > Btw, given that this is the last user of bvec_last_segment after my > other patches I think we should kill bvec_last_segment and do something > like this here: > > > diff --git a/fs/buffer.c b/fs/buffer.c > index

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

2018-11-22 Thread Ming Lei
On Thu, Nov 22, 2018 at 12:03:15PM +0100, Christoph Hellwig wrote: > > +/* used for chunk_for_each_segment */ > > +static inline void bvec_next_segment(const struct bio_vec *bvec, > > +struct bvec_iter_all *iter_all) > > FYI, chunk_for_each_segment doesn't exist