Skip to content

Commit

Permalink
blk-wbt: don't throttle discard or write zeroes
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Christoph Hellwig authored and axboe committed Dec 9, 2016
1 parent a897b66 commit be07e14
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions block/blk-wbt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down

0 comments on commit be07e14

Please sign in to comment.