Skip to contentSkip to conversation

block: add missed trace_block_plug

PATCH In review Shaohua Li 2 participants 2 messages Sep 28, 2011 Block layer

lore
Share & tools
lore

Shaohua Li

author
#0 lore raw

PATCH 2/2 block: add missed trace_block_plug

After flush plug list, the list has no request, so we need add a trace_block_plug.

---
 block/blk-core.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
block/blk-core.c +3 -1
Index: linux/block/blk-core.c
===================================================================
@@ -1307,8 +1307,10 @@ get_rq:
 				if (__rq->q != q)
 					plug->should_sort = 1;
 			}
-			if (request_count >= BLK_MAX_REQUEST_COUNT)
+			if (request_count >= BLK_MAX_REQUEST_COUNT) {
 				blk_flush_plug_list(plug, false);
+				trace_block_plug(q);
+			}
 		}
 		list_add_tail(&req->queuelist, &plug->list);
 		drive_stat_acct(req, 1);
Reviewed-by on v1 2/2
#1 lore raw
Quoted 4 lines · Shaohua Li

After flush plug list, the list has no request, so we need add a trace_block_plug.

Quoted 21 lines
---
 block/blk-core.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: linux/block/blk-core.c
===================================================================

block/blk-core.c +3 -1
@@ -1307,8 +1307,10 @@ get_rq:
 				if (__rq->q != q)
 					plug->should_sort = 1;
 			}
-			if (request_count >= BLK_MAX_REQUEST_COUNT)
+			if (request_count >= BLK_MAX_REQUEST_COUNT) {
 				blk_flush_plug_list(plug, false);
+				trace_block_plug(q);
+			}
 		}
 		list_add_tail(&req->queuelist, &plug->list);
 		drive_stat_acct(req, 1);