summaryrefslogtreecommitdiff
path: root/blkparse_fmt.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2006-07-06 10:04:23 +0200
committerJens Axboe <axboe@suse.de>2006-07-06 10:04:23 +0200
commitf86990edd23e465f8a865c34d308f888b8e6ee2d (patch)
tree416b22faad843a1d9aab2fdfa483a9f8fd51c099 /blkparse_fmt.c
parent871ef6d09b45f1e60d52abc2c0ede07ae47796a1 (diff)
downloadblktrace-f86990edd23e465f8a865c34d308f888b8e6ee2d.tar.gz
blktrace-f86990edd23e465f8a865c34d308f888b8e6ee2d.tar.bz2
[PATCH] Support for readahead tracing
These are the userspace changes to allow blktrace to distinguish readahead from non-readahead reads.
Diffstat (limited to 'blkparse_fmt.c')
-rw-r--r--blkparse_fmt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/blkparse_fmt.c b/blkparse_fmt.c
index fe788b5..fdbe2dd 100644
--- a/blkparse_fmt.c
+++ b/blkparse_fmt.c
@@ -63,6 +63,7 @@ int add_format_spec(char *option)
static inline void fill_rwbs(char *rwbs, struct blk_io_trace *t)
{
int w = t->action & BLK_TC_ACT(BLK_TC_WRITE);
+ int a = t->action & BLK_TC_ACT(BLK_TC_AHEAD);
int b = t->action & BLK_TC_ACT(BLK_TC_BARRIER);
int s = t->action & BLK_TC_ACT(BLK_TC_SYNC);
int i = 0;
@@ -71,6 +72,8 @@ static inline void fill_rwbs(char *rwbs, struct blk_io_trace *t)
rwbs[i++] = 'W';
else
rwbs[i++] = 'R';
+ if (a)
+ rwbs[i++] = 'A';
if (b)
rwbs[i++] = 'B';
if (s)