Thread (102 messages) 102 messages, 8 authors, 2018-11-21

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

From: Ming Lei <hidden>
Date: 2018-11-19 03:35:14
Also in: dm-devel, linux-bcache, linux-block, linux-btrfs, linux-fsdevel, linux-mm, linux-raid, linux-xfs, lkml

On Sun, Nov 18, 2018 at 08:10:14PM -0700, Jens Axboe wrote:
On 11/18/18 7:23 PM, Ming Lei wrote:
quoted
On Fri, Nov 16, 2018 at 02:13:05PM +0100, Christoph Hellwig wrote:
quoted
quoted
-#define bvec_iter_page(bvec, iter)				\
+#define mp_bvec_iter_page(bvec, iter)				\
 	(__bvec_iter_bvec((bvec), (iter))->bv_page)
 
-#define bvec_iter_len(bvec, iter)				\
+#define mp_bvec_iter_len(bvec, iter)				\
I'd much prefer if we would stick to the segment naming that
we also use in the higher level helper.

So segment_iter_page, segment_iter_len, etc.
We discussed the naming problem before, one big problem is that the 'segment'
in bio_for_each_segment*() means one single page segment actually.

If we use segment_iter_page() here for multi-page segment, it may
confuse people.

Of course, I prefer to the naming of segment/page, 

And Jens didn't agree to rename bio_for_each_segment*() before.
I didn't like frivolous renaming (and I still don't), but mp_
is horrible imho. Don't name these after the fact that they
are done in conjunction with supporting multipage bvecs. That
very fact will be irrelevant very soon
OK, so what is your suggestion for the naming issue?

Are you fine to use segment_iter_page() here? Then the term of 'segment'
may be interpreted as multi-page segment here, but as single-page in
bio_for_each_segment*().

thanks
Ming
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help