diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-05-03 17:14:57 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-05-08 23:10:49 +0200 |
commit | 825843b0adb7c95e8cbab35e6fee64980e29ade8 (patch) | |
tree | 7f23ce098fc82a30c295db0627f4a5767ae0a572 /block | |
parent | block: break discard submissions into the user defined size (diff) | |
download | linux-825843b0adb7c95e8cbab35e6fee64980e29ade8.tar.xz linux-825843b0adb7c95e8cbab35e6fee64980e29ade8.zip |
blk-wbt: account any writing command as a write
We currently special case WRITE and FLUSH, but we should really
just include any command with the write bit set. This ensures
that we account DISCARD.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-wbt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-wbt.c b/block/blk-wbt.c index f92fc84b5e2c..3e34b41bcefc 100644 --- a/block/blk-wbt.c +++ b/block/blk-wbt.c @@ -701,7 +701,7 @@ static int wbt_data_dir(const struct request *rq) if (op == REQ_OP_READ) return READ; - else if (op == REQ_OP_WRITE || op == REQ_OP_FLUSH) + else if (op_is_write(op)) return WRITE; /* don't account */ |