Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233823
b: refs/heads/master
c: 2d3a849
h: refs/heads/master
i:
  233821: 6c2ddf0
  233819: 7852c9b
  233815: 1a8da4f
  233807: 4c6ef42
  233791: 83b670f
v: v3
  • Loading branch information
Tao Ma authored and Jens Axboe committed Mar 3, 2011
1 parent 4c0c017 commit 32d182c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 255bb490c8c27eed484d538efe6ef6a7473bd3f6
refs/heads/master: 2d3a8497f8cc5aca14b722cd37d51f6c15ff9f74
1 change: 0 additions & 1 deletion trunk/include/linux/blktrace_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ static inline int blk_cmd_buf_len(struct request *rq)

extern void blk_dump_cmd(char *buf, struct request *rq);
extern void blk_fill_rwbs(char *rwbs, u32 rw, int bytes);
extern void blk_fill_rwbs_rq(char *rwbs, struct request *rq);

#endif /* CONFIG_EVENT_TRACING && CONFIG_BLOCK */

Expand Down
6 changes: 3 additions & 3 deletions trunk/include/trace/events/block.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ DECLARE_EVENT_CLASS(block_rq_with_error,
0 : blk_rq_sectors(rq);
__entry->errors = rq->errors;

blk_fill_rwbs_rq(__entry->rwbs, rq);
blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, blk_rq_bytes(rq));
blk_dump_cmd(__get_str(cmd), rq);
),

Expand Down Expand Up @@ -118,7 +118,7 @@ DECLARE_EVENT_CLASS(block_rq,
__entry->bytes = (rq->cmd_type == REQ_TYPE_BLOCK_PC) ?
blk_rq_bytes(rq) : 0;

blk_fill_rwbs_rq(__entry->rwbs, rq);
blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, blk_rq_bytes(rq));
blk_dump_cmd(__get_str(cmd), rq);
memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
),
Expand Down Expand Up @@ -563,7 +563,7 @@ TRACE_EVENT(block_rq_remap,
__entry->nr_sector = blk_rq_sectors(rq);
__entry->old_dev = dev;
__entry->old_sector = from;
blk_fill_rwbs_rq(__entry->rwbs, rq);
blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, blk_rq_bytes(rq));
),

TP_printk("%d,%d %s %llu + %u <- (%d,%d) %llu",
Expand Down
16 changes: 0 additions & 16 deletions trunk/kernel/trace/blktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1827,21 +1827,5 @@ void blk_fill_rwbs(char *rwbs, u32 rw, int bytes)
rwbs[i] = '\0';
}

void blk_fill_rwbs_rq(char *rwbs, struct request *rq)
{
int rw = rq->cmd_flags & 0x03;
int bytes;

if (rq->cmd_flags & REQ_DISCARD)
rw |= REQ_DISCARD;

if (rq->cmd_flags & REQ_SECURE)
rw |= REQ_SECURE;

bytes = blk_rq_bytes(rq);

blk_fill_rwbs(rwbs, rw, bytes);
}

#endif /* CONFIG_EVENT_TRACING */

0 comments on commit 32d182c

Please sign in to comment.