Skip to contentSkip to conversation

dm: fix parameter to blk_delay_queue()

PATCH In review Tahsin Erdogan 2 participants 3 messages Jul 15, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm: fix parameter to blk_delay_queue()

Second parameter to blk_delay_queue() must be in msec units not jiffies.

---
 drivers/md/dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm.c +1 -1
index 1b2f96205361..17c63265a205 100644
@@ -2175,7 +2175,7 @@ static void dm_request_fn(struct request_queue *q)
 		     md_in_flight(md) && rq->bio && rq->bio->bi_vcnt == 1 &&
 		     md->last_rq_pos == pos && md->last_rq_rw == rq_data_dir(rq)) ||
 		    (ti->type->busy && ti->type->busy(ti))) {
-			blk_delay_queue(q, HZ / 100);
+			blk_delay_queue(q, 10);
 			return;
 		}
 
Signature · 1 line
2.8.0.rc3.226.g39d4020
#1 lore raw
Quoted 3 lines · Tahsin Erdogan

Second parameter to blk_delay_queue() must be in msec units not jiffies.

This needs to be rebased against linux-next (or linux-dm.git's 'for-next') because the code in question has been moved out to dm-rq.c

But I'll gladly take care of it.

Your change seems fine, and in fact my intent was always to have it be 10 msec, see commit: d548b34b062b60

Curious that the initial "HZ / 10" (from Jens' commit 7eaceaccab) wasn't expressed in terms of msecs either.

Anyway, thanks for the fix!

Mike

Quoted 20 lines
---
 drivers/md/dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm.c +1 -1
index 1b2f96205361..17c63265a205 100644
@@ -2175,7 +2175,7 @@ static void dm_request_fn(struct request_queue *q)
 		     md_in_flight(md) && rq->bio && rq->bio->bi_vcnt == 1 &&
 		     md->last_rq_pos == pos && md->last_rq_rw == rq_data_dir(rq)) ||
 		    (ti->type->busy && ti->type->busy(ti))) {
-			blk_delay_queue(q, HZ / 100);
+			blk_delay_queue(q, 10);
 			return;
 		}
 
Signature · 1 line
2.8.0.rc3.226.g39d4020
#2 lore raw
Quoted 4 lines

This needs to be rebased against linux-next (or linux-dm.git's 'for-next') because the code in question has been moved out to dm-rq.c

But I'll gladly take care of it.

Thanks Mike!