1
0
Fork 0

blk-wbt: don't throttle discard or write zeroes

Both of these are metadata only commands that are not issued by the
writeback code and not directly relevant to the writeback bandwith.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
hifive-unleashed-5.1
Christoph Hellwig 2016-12-09 14:19:06 +01:00 committed by Jens Axboe
parent a897b6664e
commit be07e14f96
1 changed files with 2 additions and 3 deletions

View File

@ -575,10 +575,9 @@ static inline bool wbt_should_throttle(struct rq_wb *rwb, struct bio *bio)
const int op = bio_op(bio);
/*
* If not a WRITE (or a discard or write zeroes), do nothing
* If not a WRITE, do nothing
*/
if (!(op == REQ_OP_WRITE || op == REQ_OP_DISCARD ||
op == REQ_OP_WRITE_ZEROES))
if (op != REQ_OP_WRITE)
return false;
/*