Message ID | 20240911201240.3982856-7-kbusch@meta.com |
---|---|
State | New |
Headers | show |
Series | block integrity merging and counting | expand |
On Wed, Sep 11, 2024 at 01:12:36PM -0700, Keith Busch wrote: > From: Keith Busch <kbusch@kernel.org> > > Provide an integrity equivalent to blk_rq_nr_phys_segments(). Now that the field is unconditional the helper seems a bit pointless. blk_rq_nr_phys_segments is mostly need for the special payload magic for discard.
Christoph, > Now that the field is unconditional the helper seems a bit pointless. Yeah, maybe. I'm OK either way. Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index 4fecf46ef681b..33557af495100 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -1156,6 +1156,11 @@ static inline unsigned short blk_rq_nr_phys_segments(struct request *rq) return rq->nr_phys_segments; } +static inline unsigned short blk_rq_nr_integrity_segments(struct request *rq) +{ + return rq->nr_integrity_segments; +} + /* * Number of discard segments (or ranges) the driver needs to fill in. * Each discard bio merged into a request is counted as one segment.