aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>2020-03-25 10:49:54 -0700
committerJens Axboe <axboe@kernel.dk>2020-03-27 13:39:09 -0600
commit02694e86356dcf72d39329e52630234ad687e206 (patch)
treefa4d87c8a233e5a9fa6635b5aa450d79135612e0 /include/linux/blkdev.h
parentMerge branch 'nvme-5.7-rc1' of git://git.infradead.org/nvme into for-5.7/drivers (diff)
downloadwireguard-linux-02694e86356dcf72d39329e52630234ad687e206.tar.xz
wireguard-linux-02694e86356dcf72d39329e52630234ad687e206.zip
block: add a zone condition debug helper
Add a helper to stringify the zone conditions. We use this helper in the next patch to track zone conditions in tracepoints. Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index f629d40c645c..a5acf17e7d76 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -952,6 +952,10 @@ static inline unsigned int blk_rq_stats_sectors(const struct request *rq)
}
#ifdef CONFIG_BLK_DEV_ZONED
+
+/* Helper to convert BLK_ZONE_ZONE_XXX to its string format XXX */
+const char *blk_zone_cond_str(enum blk_zone_cond zone_cond);
+
static inline unsigned int blk_rq_zone_no(struct request *rq)
{
return blk_queue_zone_no(rq->q, blk_rq_pos(rq));