[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230503101611epcms2p57098b1a64ba519b0e2d3cd132d96051a@epcms2p5>
Date: Wed, 03 May 2023 19:16:11 +0900
From: Jinyoung CHOI <j-young.choi@...sung.com>
To: Jinyoung CHOI <j-young.choi@...sung.com>,
"axboe@...nel.dk" <axboe@...nel.dk>, "hch@....de" <hch@....de>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH 08/15] block: add helper function to get the number of
integrity segments
Since request always has the number of integrity segments in the process
of generating and merging, a function for simply obtained this has been
added.
Cc: Christoph Hellwig <hch@....de>
Cc: Martin K. Petersen <martin.petersen@...cle.com>
Signed-off-by: Jinyoung Choi <j-young.choi@...sung.com>
---
include/linux/blk-integrity.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/include/linux/blk-integrity.h b/include/linux/blk-integrity.h
index 378b2459efe2..45b9fde1fee1 100644
--- a/include/linux/blk-integrity.h
+++ b/include/linux/blk-integrity.h
@@ -43,6 +43,11 @@ int blk_rq_map_integrity_sg(struct request_queue *, struct bio *,
struct scatterlist *);
int blk_rq_count_integrity_sg(struct request_queue *, struct bio *);
+static inline unsigned short blk_rq_nr_integrity_segments(struct request *rq)
+{
+ return rq->nr_integrity_segments;
+}
+
static inline struct blk_integrity *blk_get_integrity(struct gendisk *disk)
{
struct blk_integrity *bi = &disk->queue->integrity;
@@ -120,6 +125,10 @@ static inline int blk_rq_count_integrity_sg(struct request_queue *q,
{
return 0;
}
+static inline unsigned short blk_rq_nr_integrity_segments(struct request *rq)
+{
+ return 0;
+}
static inline int blk_rq_map_integrity_sg(struct request_queue *q,
struct bio *b,
struct scatterlist *s)
--
2.34.1
Powered by blists - more mailing lists