Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair

2016-11-01 Thread Kent Overstreet
On Mon, Oct 31, 2016 at 08:11:23AM -0700, Christoph Hellwig wrote: > On Mon, Oct 31, 2016 at 09:59:43AM -0400, Theodore Ts'o wrote: > > What is _rd and _wt supposed to stand for? > > I think it's read and write, but I think the naming is highly > unfortunate. I started dabbling around with the

Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair

2016-11-01 Thread Kent Overstreet
On Mon, Oct 31, 2016 at 08:11:23AM -0700, Christoph Hellwig wrote: > On Mon, Oct 31, 2016 at 09:59:43AM -0400, Theodore Ts'o wrote: > > What is _rd and _wt supposed to stand for? > > I think it's read and write, but I think the naming is highly > unfortunate. I started dabbling around with the

Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair

2016-11-01 Thread Ming Lei
On Tue, Nov 1, 2016 at 10:17 PM, Theodore Ts'o wrote: > On Tue, Nov 01, 2016 at 07:51:27AM +0800, Ming Lei wrote: >> Sorry for forgetting to mention one important point: >> >> - after multipage bvec is introduced, the iterated bvec pointer >> still points to singlge page bvec,

Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair

2016-11-01 Thread Ming Lei
On Tue, Nov 1, 2016 at 10:17 PM, Theodore Ts'o wrote: > On Tue, Nov 01, 2016 at 07:51:27AM +0800, Ming Lei wrote: >> Sorry for forgetting to mention one important point: >> >> - after multipage bvec is introduced, the iterated bvec pointer >> still points to singlge page bvec, which is generated

Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair

2016-11-01 Thread Theodore Ts'o
On Tue, Nov 01, 2016 at 07:51:27AM +0800, Ming Lei wrote: > Sorry for forgetting to mention one important point: > > - after multipage bvec is introduced, the iterated bvec pointer > still points to singlge page bvec, which is generated in-flight > and is readonly actually. That is the motivation

Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair

2016-11-01 Thread Theodore Ts'o
On Tue, Nov 01, 2016 at 07:51:27AM +0800, Ming Lei wrote: > Sorry for forgetting to mention one important point: > > - after multipage bvec is introduced, the iterated bvec pointer > still points to singlge page bvec, which is generated in-flight > and is readonly actually. That is the motivation

Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair

2016-10-31 Thread Ming Lei
On Tue, Nov 1, 2016 at 6:46 AM, Ming Lei wrote: > On Mon, Oct 31, 2016 at 9:59 PM, Theodore Ts'o wrote: >> On Sat, Oct 29, 2016 at 04:08:44PM +0800, Ming Lei wrote: >>> This patches introduce bio_for_each_segment_all_rd() and >>>

Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair

2016-10-31 Thread Ming Lei
On Tue, Nov 1, 2016 at 6:46 AM, Ming Lei wrote: > On Mon, Oct 31, 2016 at 9:59 PM, Theodore Ts'o wrote: >> On Sat, Oct 29, 2016 at 04:08:44PM +0800, Ming Lei wrote: >>> This patches introduce bio_for_each_segment_all_rd() and >>> bio_for_each_segment_all_wt(). >>> >>>

Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair

2016-10-31 Thread Ming Lei
On Mon, Oct 31, 2016 at 11:11 PM, Christoph Hellwig wrote: > On Mon, Oct 31, 2016 at 09:59:43AM -0400, Theodore Ts'o wrote: >> What is _rd and _wt supposed to stand for? > > I think it's read and write, but I think the naming is highly > unfortunate. I started dabbling around

Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair

2016-10-31 Thread Ming Lei
On Mon, Oct 31, 2016 at 11:11 PM, Christoph Hellwig wrote: > On Mon, Oct 31, 2016 at 09:59:43AM -0400, Theodore Ts'o wrote: >> What is _rd and _wt supposed to stand for? > > I think it's read and write, but I think the naming is highly > unfortunate. I started dabbling around with the patches a

Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair

2016-10-31 Thread Ming Lei
On Mon, Oct 31, 2016 at 9:59 PM, Theodore Ts'o wrote: > On Sat, Oct 29, 2016 at 04:08:44PM +0800, Ming Lei wrote: >> This patches introduce bio_for_each_segment_all_rd() and >> bio_for_each_segment_all_wt(). >> >> bio_for_each_segment_all_rd() is for replacing >>

Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair

2016-10-31 Thread Ming Lei
On Mon, Oct 31, 2016 at 9:59 PM, Theodore Ts'o wrote: > On Sat, Oct 29, 2016 at 04:08:44PM +0800, Ming Lei wrote: >> This patches introduce bio_for_each_segment_all_rd() and >> bio_for_each_segment_all_wt(). >> >> bio_for_each_segment_all_rd() is for replacing >> bio_for_each_segment_all() in

Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair

2016-10-31 Thread Christoph Hellwig
On Mon, Oct 31, 2016 at 09:59:43AM -0400, Theodore Ts'o wrote: > What is _rd and _wt supposed to stand for? I think it's read and write, but I think the naming is highly unfortunate. I started dabbling around with the patches a bit, and to keep my sanity a started reaming it to _pages and _bvec

Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair

2016-10-31 Thread Christoph Hellwig
On Mon, Oct 31, 2016 at 09:59:43AM -0400, Theodore Ts'o wrote: > What is _rd and _wt supposed to stand for? I think it's read and write, but I think the naming is highly unfortunate. I started dabbling around with the patches a bit, and to keep my sanity a started reaming it to _pages and _bvec

Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair

2016-10-31 Thread Theodore Ts'o
On Sat, Oct 29, 2016 at 04:08:44PM +0800, Ming Lei wrote: > This patches introduce bio_for_each_segment_all_rd() and > bio_for_each_segment_all_wt(). > > bio_for_each_segment_all_rd() is for replacing > bio_for_each_segment_all() in case the bvec from bio->bi_io_vec > is accessed as readonly. >

Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair

2016-10-31 Thread Theodore Ts'o
On Sat, Oct 29, 2016 at 04:08:44PM +0800, Ming Lei wrote: > This patches introduce bio_for_each_segment_all_rd() and > bio_for_each_segment_all_wt(). > > bio_for_each_segment_all_rd() is for replacing > bio_for_each_segment_all() in case the bvec from bio->bi_io_vec > is accessed as readonly. >

[PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair

2016-10-29 Thread Ming Lei
This patches introduce bio_for_each_segment_all_rd() and bio_for_each_segment_all_wt(). bio_for_each_segment_all_rd() is for replacing bio_for_each_segment_all() in case the bvec from bio->bi_io_vec is accessed as readonly. bio_for_each_segment_all_wt() is for replacing

[PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair

2016-10-29 Thread Ming Lei
This patches introduce bio_for_each_segment_all_rd() and bio_for_each_segment_all_wt(). bio_for_each_segment_all_rd() is for replacing bio_for_each_segment_all() in case the bvec from bio->bi_io_vec is accessed as readonly. bio_for_each_segment_all_wt() is for replacing