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>
This commit is contained in:
parent
af097f5d19
commit
825843b0ad
|
@ -701,7 +701,7 @@ static int wbt_data_dir(const struct request *rq)
|
||||||
|
|
||||||
if (op == REQ_OP_READ)
|
if (op == REQ_OP_READ)
|
||||||
return READ;
|
return READ;
|
||||||
else if (op == REQ_OP_WRITE || op == REQ_OP_FLUSH)
|
else if (op_is_write(op))
|
||||||
return WRITE;
|
return WRITE;
|
||||||
|
|
||||||
/* don't account */
|
/* don't account */
|
||||||
|
|
Loading…
Reference in New Issue