aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2009-03-24 04:05:06 -0400
committerIngo Molnar <mingo@elte.hu>2009-03-24 08:08:59 -0400
commit65796348e09880e12b97267d39b8857c758440a6 (patch)
tree176f962be8db38b8fe7309363d73c72fa6c4c69e /kernel/trace
parente4955c9986a27bb47ddeb6cd55803053f547e2e9 (diff)
blktrace: fix wrong calculation of RWBS
Impact: fix the output of IO type category characters Trace categories are the upper 16 bits, not the lower 16 bits. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Acked-by: Jens Axboe <jens.axboe@oracle.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> LKML-Reference: <49C89432.8010805@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/blktrace.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 1ffcbd4ac45b..9af41430ee54 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -922,23 +922,24 @@ static void blk_unregister_tracepoints(void)
922static void fill_rwbs(char *rwbs, const struct blk_io_trace *t) 922static void fill_rwbs(char *rwbs, const struct blk_io_trace *t)
923{ 923{
924 int i = 0; 924 int i = 0;
925 int tc = t->action >> BLK_TC_SHIFT;
925 926
926 if (t->action & BLK_TC_DISCARD) 927 if (tc & BLK_TC_DISCARD)
927 rwbs[i++] = 'D'; 928 rwbs[i++] = 'D';
928 else if (t->action & BLK_TC_WRITE) 929 else if (tc & BLK_TC_WRITE)
929 rwbs[i++] = 'W'; 930 rwbs[i++] = 'W';
930 else if (t->bytes) 931 else if (t->bytes)
931 rwbs[i++] = 'R'; 932 rwbs[i++] = 'R';
932 else 933 else
933 rwbs[i++] = 'N'; 934 rwbs[i++] = 'N';
934 935
935 if (t->action & BLK_TC_AHEAD) 936 if (tc & BLK_TC_AHEAD)
936 rwbs[i++] = 'A'; 937 rwbs[i++] = 'A';
937 if (t->action & BLK_TC_BARRIER) 938 if (tc & BLK_TC_BARRIER)
938 rwbs[i++] = 'B'; 939 rwbs[i++] = 'B';
939 if (t->action & BLK_TC_SYNC) 940 if (tc & BLK_TC_SYNC)
940 rwbs[i++] = 'S'; 941 rwbs[i++] = 'S';
941 if (t->action & BLK_TC_META) 942 if (tc & BLK_TC_META)
942 rwbs[i++] = 'M'; 943 rwbs[i++] = 'M';
943 944
944 rwbs[i] = '\0'; 945 rwbs[i] = '\0';