diff options
author | Michael Callahan <michaelcallahan@fb.com> | 2018-07-18 04:47:38 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-07-18 08:44:18 -0600 |
commit | dbae2c551377b6533a00c11fc7ede370100ab404 (patch) | |
tree | bbbfb46c0d4c3ff3b9250f70453b259c58e89539 /include/linux/blk_types.h | |
parent | 59767fbd49d794b4499d30b314df6c0d4aca584b (diff) | |
download | blackbird-op-linux-dbae2c551377b6533a00c11fc7ede370100ab404.tar.gz blackbird-op-linux-dbae2c551377b6533a00c11fc7ede370100ab404.zip |
block: Define and use STAT_READ and STAT_WRITE
Add defines for STAT_READ and STAT_WRITE for indexing the partition
stat entries. This clarifies some fs/ code which has hardcoded 1 for
STAT_WRITE and will make it easier to extend the stats with additional
fields.
tj: Refreshed on top of v4.17.
Signed-off-by: Michael Callahan <michaelcallahan@fb.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/blk_types.h')
-rw-r--r-- | include/linux/blk_types.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index e13449a379a1..d2b44de56bc1 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h @@ -357,6 +357,13 @@ enum req_flag_bits { #define REQ_NOMERGE_FLAGS \ (REQ_NOMERGE | REQ_PREFLUSH | REQ_FUA) +enum stat_group { + STAT_READ, + STAT_WRITE, + + NR_STAT_GROUPS +}; + #define bio_op(bio) \ ((bio)->bi_opf & REQ_OP_MASK) #define req_op(req) \ |