Skip to contentSkip to conversation

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

PATCH In review Christoph Hellwig 2 participants 2 messages Dec 9, 2016 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 block/blk-wbt.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
block/blk-wbt.c +2 -3
index d500e43..6e82769 100644
@@ -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;
 
 	/*
Signature · 1 line
2.1.4
maintainer
#1 lore raw
Quoted 2 lines · Christoph Hellwig

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

Added, thanks.

Signature · 1 line
Jens Axboe