Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 825843b0 authored by Jens Axboe's avatar Jens Axboe
Browse files

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: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: default avatarOmar Sandoval <osandov@fb.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent af097f5d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 */