]> git.baikalelectronics.ru Git - kernel.git/commit
block: add centralize REQ_OP_XXX to string helper
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Thu, 20 Jun 2019 17:59:16 +0000 (10:59 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 20 Jun 2019 19:03:51 +0000 (13:03 -0600)
commit88fbb1beb730821386e9c746d560dda7c9819e7d
tree838072a1f0b6eb3ad36ff61e9abdf5a90b7841f3
parentfd47bd32188bc0952282a6e419b41ee2f74a3113
block: add centralize REQ_OP_XXX to string helper

In order to centralize the REQ_OP_XXX to string conversion which can be
used in the block layer and different places in the kernel like f2fs,
this patch adds a new helper function along with an array similar to the
one present in the blk-mq-debugfs.c.

We keep this helper functionality centralize under blk-core.c instead of
blk-mq-debugfs.c since blk-core.c is configured using CONFIG_BLOCK and
it will not be dependent on blk-mq-debugfs.c which is configured using
CONFIG_BLK_DEBUG_FS.

Next patch adjusts the code in the blk-mq-debugfs.c with newly
introduced helper.

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c
include/linux/blkdev.h