On 3/21/19 4:11 PM, Christoph Hellwig wrote: > Return the currently active bvec segment, potentially spanning multiple > pages. > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> > --- > include/linux/blkdev.h | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h > index 0de92b29f589..255e20313cde 100644 > --- a/include/linux/blkdev.h > +++ b/include/linux/blkdev.h > @@ -929,6 +929,13 @@ static inline unsigned int blk_rq_payload_bytes(struct request *rq) > return blk_rq_bytes(rq); > } > > +static inline struct bio_vec req_bvec(struct request *rq) > +{ > + if (rq->rq_flags & RQF_SPECIAL_PAYLOAD) > + return rq->special_vec; Quick question here mostly for my understanding, do we also have to check here for nr_phys_segments for the operations such as write-zeroes ? OR this may never get called in write-zeroes context ? OR not applicable ? > + return mp_bvec_iter_bvec(rq->bio->bi_io_vec, rq->bio->bi_iter); > +} > + > static inline unsigned int blk_queue_get_max_sectors(struct request_queue *q, > int op) > { > Otherwise, looks good. Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>