Skip to content

Commit

Permalink
block: call elv_bio_merged() when merged
Browse files Browse the repository at this point in the history
Commit 73c1010 ("block: initial patch for on-stack per-task plugging")
removed calls to elv_bio_merged() when @bio merged with @Req. Re-add them.

This in turn will update merged stats in associated group. That
should be safe as long as request has got reference to the blkio_group.

Signed-off-by: Namhyung Kim <[email protected]>
Cc: Divyesh Shah <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
rhvgoyal authored and Jens Axboe committed May 23, 2011
1 parent 317389a commit 95cf3dd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,7 @@ static bool bio_attempt_back_merge(struct request_queue *q, struct request *req,
req->ioprio = ioprio_best(req->ioprio, bio_prio(bio));

drive_stat_acct(req, 0);
elv_bio_merged(q, req, bio);
return true;
}

Expand Down Expand Up @@ -1155,6 +1156,7 @@ static bool bio_attempt_front_merge(struct request_queue *q,
req->ioprio = ioprio_best(req->ioprio, bio_prio(bio));

drive_stat_acct(req, 0);
elv_bio_merged(q, req, bio);
return true;
}

Expand Down

0 comments on commit 95cf3dd

Please sign in to comment.