diff options
author | Jens Axboe <axboe@suse.de> | 2006-07-22 20:12:01 -0400 |
---|---|---|
committer | Jens Axboe <axboe@nelson.home.kernel.dk> | 2006-09-30 14:29:43 -0400 |
commit | 7457e6e2d7406c7009e9ad03db1335fe93b5fb71 (patch) | |
tree | b1653b11f3fe9a2d9a061aec7c4747a9809ecdb1 /block | |
parent | 374f84ac39ec7829a57a66efd5125d3561ff0e00 (diff) |
[PATCH] blktrace: support for logging metadata reads
Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'block')
-rw-r--r-- | block/blktrace.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/block/blktrace.c b/block/blktrace.c index 8ff33441d8a..2592f215a90 100644 --- a/block/blktrace.c +++ b/block/blktrace.c | |||
@@ -69,7 +69,7 @@ static u32 ddir_act[2] __read_mostly = { BLK_TC_ACT(BLK_TC_READ), BLK_TC_ACT(BLK | |||
69 | /* | 69 | /* |
70 | * Bio action bits of interest | 70 | * Bio action bits of interest |
71 | */ | 71 | */ |
72 | static u32 bio_act[5] __read_mostly = { 0, BLK_TC_ACT(BLK_TC_BARRIER), BLK_TC_ACT(BLK_TC_SYNC), 0, BLK_TC_ACT(BLK_TC_AHEAD) }; | 72 | static u32 bio_act[9] __read_mostly = { 0, BLK_TC_ACT(BLK_TC_BARRIER), BLK_TC_ACT(BLK_TC_SYNC), 0, BLK_TC_ACT(BLK_TC_AHEAD), 0, 0, 0, BLK_TC_ACT(BLK_TC_META) }; |
73 | 73 | ||
74 | /* | 74 | /* |
75 | * More could be added as needed, taking care to increment the decrementer | 75 | * More could be added as needed, taking care to increment the decrementer |
@@ -81,6 +81,8 @@ static u32 bio_act[5] __read_mostly = { 0, BLK_TC_ACT(BLK_TC_BARRIER), BLK_TC_AC | |||
81 | (((rw) & (1 << BIO_RW_SYNC)) >> (BIO_RW_SYNC - 1)) | 81 | (((rw) & (1 << BIO_RW_SYNC)) >> (BIO_RW_SYNC - 1)) |
82 | #define trace_ahead_bit(rw) \ | 82 | #define trace_ahead_bit(rw) \ |
83 | (((rw) & (1 << BIO_RW_AHEAD)) << (2 - BIO_RW_AHEAD)) | 83 | (((rw) & (1 << BIO_RW_AHEAD)) << (2 - BIO_RW_AHEAD)) |
84 | #define trace_meta_bit(rw) \ | ||
85 | (((rw) & (1 << BIO_RW_META)) >> (BIO_RW_META - 3)) | ||
84 | 86 | ||
85 | /* | 87 | /* |
86 | * The worker for the various blk_add_trace*() types. Fills out a | 88 | * The worker for the various blk_add_trace*() types. Fills out a |
@@ -103,6 +105,7 @@ void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes, | |||
103 | what |= bio_act[trace_barrier_bit(rw)]; | 105 | what |= bio_act[trace_barrier_bit(rw)]; |
104 | what |= bio_act[trace_sync_bit(rw)]; | 106 | what |= bio_act[trace_sync_bit(rw)]; |
105 | what |= bio_act[trace_ahead_bit(rw)]; | 107 | what |= bio_act[trace_ahead_bit(rw)]; |
108 | what |= bio_act[trace_meta_bit(rw)]; | ||
106 | 109 | ||
107 | pid = tsk->pid; | 110 | pid = tsk->pid; |
108 | if (unlikely(act_log_check(bt, what, sector, pid))) | 111 | if (unlikely(act_log_check(bt, what, sector, pid))) |