Skip to content

Commit

Permalink
block: trace bio queueing trial only when it occurs
Browse files Browse the repository at this point in the history
If BIO is discarded or cross over end of device,
BIO queueing trial doesn't occur.

Actually the trace was called just before make_request at first:
[PATCH] Block queue IO tracing support (blktrace) as of 2006-03-23
      2056a782f8e7e65fd4bfd027506b4ce1c5e9ccd4

And then 2 patches added some checks between them:
[PATCH] md: check bio address after mapping through partitions
        5ddfe9691c91a244e8d1be597b6428fcefd58103,
[BLOCK] Don't allow empty barriers to be passed down to
queues that don't grok them
        51fd77bd9f512ab6cc9df0733ba1caaab89eb957

It breaks original goal.
Let's trace it only when it happens.

Signed-off-by: Minchan Kim <[email protected]>
Acked-by: Wu Fengguang <[email protected]>
Cc: Li Zefan <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Minchan Kim authored and Jens Axboe committed Sep 11, 2009
1 parent 01e97f6 commit 01edede
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1462,8 +1462,6 @@ static inline void __generic_make_request(struct bio *bio)
if (old_sector != -1)
trace_block_remap(q, bio, old_dev, old_sector);

trace_block_bio_queue(q, bio);

old_sector = bio->bi_sector;
old_dev = bio->bi_bdev->bd_dev;

Expand All @@ -1476,6 +1474,8 @@ static inline void __generic_make_request(struct bio *bio)
goto end_io;
}

trace_block_bio_queue(q, bio);

ret = q->make_request_fn(q, bio);
} while (ret);

Expand Down

0 comments on commit 01edede

Please sign in to comment.