Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1512967

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

From Ming Lei <tom.leiming@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair
Date 2016-10-31 23:50 +0100
Message-ID <sytyW-8o-29@gated-at.bofh.it> (permalink)
References <sxx1U-3GR-3@gated-at.bofh.it> <sxxbA-3Kf-35@gated-at.bofh.it> <sylrH-3r1-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Oct 31, 2016 at 9:59 PM, Theodore Ts'o <tytso@mit.edu> 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 case the bvec from bio->bi_io_vec
>> is accessed as readonly.
>>
>> bio_for_each_segment_all_wt() is for replacing
>> bio_for_each_segment_all() in case the bvec from bio->bi_io_vec
>> need to be updated.
>
> What is _rd and _wt supposed to stand for?  And speaking more

As Christoph replied, _rd means read, which said the bvec pointed by
the iterator variable(bvec pointer) is read-only, and the bvec table
can't be written into via this usage any more. Maybe
bio_for_each_segment_all_ro is better?

On the other hand, _wr meands write, which said the bvec pointed by
the iterator variable(bvec pointer) can be written to. Maybe we can use
original bio_for_each_segment_all() for it?

> generally, could you write up some more detailed notes about all of
> the various new functions they have been added, when they should be
> used, and some kind of roadmap about how things are supposed to work
> beyond the very high-level description in the introduction in your
> patch series?  Ideally it would go into the Documentation directory,
> so that after this patch set gets applied, people will be able to
> refer to it to understand how things are supposed to work.

In the next post, I will add comment on the two helpers, thanks for
your review.

Thanks,
Ming

>
> Thanks!!
>
>                                                 - Ted



-- 
Ming Lei

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair Ming Lei <tom.leiming@gmail.com> - 2016-10-29 10:30 +0200
  Re: [PATCH 45/60] block: bio: introduce  bio_for_each_segment_all_rd() and its write pair Theodore Ts'o <tytso@mit.edu> - 2016-10-31 15:10 +0100
    Re: [PATCH 45/60] block: bio: introduce  bio_for_each_segment_all_rd() and its write pair Christoph Hellwig <hch@infradead.org> - 2016-10-31 16:20 +0100
      Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd()  and its write pair Ming Lei <tom.leiming@gmail.com> - 2016-11-01 00:00 +0100
      Re: [PATCH 45/60] block: bio: introduce  bio_for_each_segment_all_rd() and its write pair Kent Overstreet <kent.overstreet@gmail.com> - 2016-11-02 04:10 +0100
    Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd()  and its write pair Ming Lei <tom.leiming@gmail.com> - 2016-10-31 23:50 +0100
      Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd()  and its write pair Ming Lei <tom.leiming@gmail.com> - 2016-11-01 01:00 +0100
        Re: [PATCH 45/60] block: bio: introduce  bio_for_each_segment_all_rd() and its write pair Theodore Ts'o <tytso@mit.edu> - 2016-11-01 15:20 +0100
          Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd()  and its write pair Ming Lei <tom.leiming@gmail.com> - 2016-11-02 03:00 +0100

csiph-web