Commit 1690102d authored by Marcos Paulo de Souza's avatar Marcos Paulo de Souza Committed by Jens Axboe

blktrace: Use blk_trace_bio_get_cgid inside blk_add_trace_bio

We always pass in blk_trace_bio_get_cgid(q, bio) to blk_add_trace_bio().
Since both are readily available in the function already, kill the
argument.
Signed-off-by: default avatarMarcos Paulo de Souza <marcos.souza.org@gmail.com>

Rewrote commit message.
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 7fb52621
...@@ -872,7 +872,7 @@ static void blk_add_trace_rq_complete(void *ignore, struct request *rq, ...@@ -872,7 +872,7 @@ static void blk_add_trace_rq_complete(void *ignore, struct request *rq,
* *
**/ **/
static void blk_add_trace_bio(struct request_queue *q, struct bio *bio, static void blk_add_trace_bio(struct request_queue *q, struct bio *bio,
u32 what, int error, union kernfs_node_id *cgid) u32 what, int error)
{ {
struct blk_trace *bt = q->blk_trace; struct blk_trace *bt = q->blk_trace;
...@@ -880,22 +880,21 @@ static void blk_add_trace_bio(struct request_queue *q, struct bio *bio, ...@@ -880,22 +880,21 @@ static void blk_add_trace_bio(struct request_queue *q, struct bio *bio,
return; return;
__blk_add_trace(bt, bio->bi_iter.bi_sector, bio->bi_iter.bi_size, __blk_add_trace(bt, bio->bi_iter.bi_sector, bio->bi_iter.bi_size,
bio_op(bio), bio->bi_opf, what, error, 0, NULL, cgid); bio_op(bio), bio->bi_opf, what, error, 0, NULL,
blk_trace_bio_get_cgid(q, bio));
} }
static void blk_add_trace_bio_bounce(void *ignore, static void blk_add_trace_bio_bounce(void *ignore,
struct request_queue *q, struct bio *bio) struct request_queue *q, struct bio *bio)
{ {
blk_add_trace_bio(q, bio, BLK_TA_BOUNCE, 0, blk_add_trace_bio(q, bio, BLK_TA_BOUNCE, 0);
blk_trace_bio_get_cgid(q, bio));
} }
static void blk_add_trace_bio_complete(void *ignore, static void blk_add_trace_bio_complete(void *ignore,
struct request_queue *q, struct bio *bio, struct request_queue *q, struct bio *bio,
int error) int error)
{ {
blk_add_trace_bio(q, bio, BLK_TA_COMPLETE, error, blk_add_trace_bio(q, bio, BLK_TA_COMPLETE, error);
blk_trace_bio_get_cgid(q, bio));
} }
static void blk_add_trace_bio_backmerge(void *ignore, static void blk_add_trace_bio_backmerge(void *ignore,
...@@ -903,8 +902,7 @@ static void blk_add_trace_bio_backmerge(void *ignore, ...@@ -903,8 +902,7 @@ static void blk_add_trace_bio_backmerge(void *ignore,
struct request *rq, struct request *rq,
struct bio *bio) struct bio *bio)
{ {
blk_add_trace_bio(q, bio, BLK_TA_BACKMERGE, 0, blk_add_trace_bio(q, bio, BLK_TA_BACKMERGE, 0);
blk_trace_bio_get_cgid(q, bio));
} }
static void blk_add_trace_bio_frontmerge(void *ignore, static void blk_add_trace_bio_frontmerge(void *ignore,
...@@ -912,15 +910,13 @@ static void blk_add_trace_bio_frontmerge(void *ignore, ...@@ -912,15 +910,13 @@ static void blk_add_trace_bio_frontmerge(void *ignore,
struct request *rq, struct request *rq,
struct bio *bio) struct bio *bio)
{ {
blk_add_trace_bio(q, bio, BLK_TA_FRONTMERGE, 0, blk_add_trace_bio(q, bio, BLK_TA_FRONTMERGE, 0);
blk_trace_bio_get_cgid(q, bio));
} }
static void blk_add_trace_bio_queue(void *ignore, static void blk_add_trace_bio_queue(void *ignore,
struct request_queue *q, struct bio *bio) struct request_queue *q, struct bio *bio)
{ {
blk_add_trace_bio(q, bio, BLK_TA_QUEUE, 0, blk_add_trace_bio(q, bio, BLK_TA_QUEUE, 0);
blk_trace_bio_get_cgid(q, bio));
} }
static void blk_add_trace_getrq(void *ignore, static void blk_add_trace_getrq(void *ignore,
...@@ -928,8 +924,7 @@ static void blk_add_trace_getrq(void *ignore, ...@@ -928,8 +924,7 @@ static void blk_add_trace_getrq(void *ignore,
struct bio *bio, int rw) struct bio *bio, int rw)
{ {
if (bio) if (bio)
blk_add_trace_bio(q, bio, BLK_TA_GETRQ, 0, blk_add_trace_bio(q, bio, BLK_TA_GETRQ, 0);
blk_trace_bio_get_cgid(q, bio));
else { else {
struct blk_trace *bt = q->blk_trace; struct blk_trace *bt = q->blk_trace;
...@@ -945,8 +940,7 @@ static void blk_add_trace_sleeprq(void *ignore, ...@@ -945,8 +940,7 @@ static void blk_add_trace_sleeprq(void *ignore,
struct bio *bio, int rw) struct bio *bio, int rw)
{ {
if (bio) if (bio)
blk_add_trace_bio(q, bio, BLK_TA_SLEEPRQ, 0, blk_add_trace_bio(q, bio, BLK_TA_SLEEPRQ, 0);
blk_trace_bio_get_cgid(q, bio));
else { else {
struct blk_trace *bt = q->blk_trace; struct blk_trace *bt = q->blk_trace;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment