diff options
author | Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> | 2020-03-25 10:49:54 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-03-27 13:39:09 -0600 |
commit | 02694e86356dcf72d39329e52630234ad687e206 (patch) | |
tree | fa4d87c8a233e5a9fa6635b5aa450d79135612e0 /include/linux/blkdev.h | |
parent | 01bb12fce73720f56eefd513bc07a2354a09b31f (diff) | |
download | lwn-02694e86356dcf72d39329e52630234ad687e206.tar.gz lwn-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.h | 4 |
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)); |