From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Date: Thu, 22 Nov 2018 12:03:15 +0100 Subject: [Cluster-devel] [PATCH V11 12/19] block: allow bio_for_each_segment_all() to iterate over multi-page bvec In-Reply-To: <20181121032327.8434-13-ming.lei@redhat.com> References: <20181121032327.8434-1-ming.lei@redhat.com> <20181121032327.8434-13-ming.lei@redhat.com> Message-ID: <20181122110315.GA30369@lst.de> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit > +/* 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, though. > +{ > + struct bio_vec *bv = &iter_all->bv; > + > + if (bv->bv_page) { > + bv->bv_page += 1; I think this needs to use nth_page() given that with discontigmem page structures might not be allocated contigously.