Commit 179d1600 authored by Chaitanya Kulkarni's avatar Chaitanya Kulkarni Committed by Jens Axboe

block: remove superfluous param in blk_fill_rwbs()

The last parameter for the function blk_fill_rwbs() was added in
5782138e47 ("tracing/events: convert block trace points to
TRACE_EVENT()") in order to signal read request and use of that parameter
was replaced with using switch case REQ_OP_READ with
1b9a9ab7 ("blktrace: use op accessors"), but the parameter was never
removed.

Remove the unused parameter and adjust the respective call sites.

Fixes: 1b9a9ab7 ("blktrace: use op accessors")
Signed-off-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 9fb40717
...@@ -119,7 +119,7 @@ struct compat_blk_user_trace_setup { ...@@ -119,7 +119,7 @@ struct compat_blk_user_trace_setup {
#endif #endif
extern void blk_fill_rwbs(char *rwbs, unsigned int op, int bytes); extern void blk_fill_rwbs(char *rwbs, unsigned int op);
static inline sector_t blk_rq_trace_sector(struct request *rq) static inline sector_t blk_rq_trace_sector(struct request *rq)
{ {
......
...@@ -28,7 +28,7 @@ DECLARE_EVENT_CLASS(bcache_request, ...@@ -28,7 +28,7 @@ DECLARE_EVENT_CLASS(bcache_request,
__entry->sector = bio->bi_iter.bi_sector; __entry->sector = bio->bi_iter.bi_sector;
__entry->orig_sector = bio->bi_iter.bi_sector - 16; __entry->orig_sector = bio->bi_iter.bi_sector - 16;
__entry->nr_sector = bio->bi_iter.bi_size >> 9; __entry->nr_sector = bio->bi_iter.bi_size >> 9;
blk_fill_rwbs(__entry->rwbs, bio->bi_opf, bio->bi_iter.bi_size); blk_fill_rwbs(__entry->rwbs, bio->bi_opf);
), ),
TP_printk("%d,%d %s %llu + %u (from %d,%d @ %llu)", TP_printk("%d,%d %s %llu + %u (from %d,%d @ %llu)",
...@@ -102,7 +102,7 @@ DECLARE_EVENT_CLASS(bcache_bio, ...@@ -102,7 +102,7 @@ DECLARE_EVENT_CLASS(bcache_bio,
__entry->dev = bio_dev(bio); __entry->dev = bio_dev(bio);
__entry->sector = bio->bi_iter.bi_sector; __entry->sector = bio->bi_iter.bi_sector;
__entry->nr_sector = bio->bi_iter.bi_size >> 9; __entry->nr_sector = bio->bi_iter.bi_size >> 9;
blk_fill_rwbs(__entry->rwbs, bio->bi_opf, bio->bi_iter.bi_size); blk_fill_rwbs(__entry->rwbs, bio->bi_opf);
), ),
TP_printk("%d,%d %s %llu + %u", TP_printk("%d,%d %s %llu + %u",
...@@ -137,7 +137,7 @@ TRACE_EVENT(bcache_read, ...@@ -137,7 +137,7 @@ TRACE_EVENT(bcache_read,
__entry->dev = bio_dev(bio); __entry->dev = bio_dev(bio);
__entry->sector = bio->bi_iter.bi_sector; __entry->sector = bio->bi_iter.bi_sector;
__entry->nr_sector = bio->bi_iter.bi_size >> 9; __entry->nr_sector = bio->bi_iter.bi_size >> 9;
blk_fill_rwbs(__entry->rwbs, bio->bi_opf, bio->bi_iter.bi_size); blk_fill_rwbs(__entry->rwbs, bio->bi_opf);
__entry->cache_hit = hit; __entry->cache_hit = hit;
__entry->bypass = bypass; __entry->bypass = bypass;
), ),
...@@ -168,7 +168,7 @@ TRACE_EVENT(bcache_write, ...@@ -168,7 +168,7 @@ TRACE_EVENT(bcache_write,
__entry->inode = inode; __entry->inode = inode;
__entry->sector = bio->bi_iter.bi_sector; __entry->sector = bio->bi_iter.bi_sector;
__entry->nr_sector = bio->bi_iter.bi_size >> 9; __entry->nr_sector = bio->bi_iter.bi_size >> 9;
blk_fill_rwbs(__entry->rwbs, bio->bi_opf, bio->bi_iter.bi_size); blk_fill_rwbs(__entry->rwbs, bio->bi_opf);
__entry->writeback = writeback; __entry->writeback = writeback;
__entry->bypass = bypass; __entry->bypass = bypass;
), ),
...@@ -238,7 +238,7 @@ TRACE_EVENT(bcache_journal_write, ...@@ -238,7 +238,7 @@ TRACE_EVENT(bcache_journal_write,
__entry->sector = bio->bi_iter.bi_sector; __entry->sector = bio->bi_iter.bi_sector;
__entry->nr_sector = bio->bi_iter.bi_size >> 9; __entry->nr_sector = bio->bi_iter.bi_size >> 9;
__entry->nr_keys = keys; __entry->nr_keys = keys;
blk_fill_rwbs(__entry->rwbs, bio->bi_opf, bio->bi_iter.bi_size); blk_fill_rwbs(__entry->rwbs, bio->bi_opf);
), ),
TP_printk("%d,%d %s %llu + %u keys %u", TP_printk("%d,%d %s %llu + %u keys %u",
......
...@@ -89,7 +89,7 @@ TRACE_EVENT(block_rq_requeue, ...@@ -89,7 +89,7 @@ TRACE_EVENT(block_rq_requeue,
__entry->sector = blk_rq_trace_sector(rq); __entry->sector = blk_rq_trace_sector(rq);
__entry->nr_sector = blk_rq_trace_nr_sectors(rq); __entry->nr_sector = blk_rq_trace_nr_sectors(rq);
blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, blk_rq_bytes(rq)); blk_fill_rwbs(__entry->rwbs, rq->cmd_flags);
__get_str(cmd)[0] = '\0'; __get_str(cmd)[0] = '\0';
), ),
...@@ -133,7 +133,7 @@ TRACE_EVENT(block_rq_complete, ...@@ -133,7 +133,7 @@ TRACE_EVENT(block_rq_complete,
__entry->nr_sector = nr_bytes >> 9; __entry->nr_sector = nr_bytes >> 9;
__entry->error = error; __entry->error = error;
blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, nr_bytes); blk_fill_rwbs(__entry->rwbs, rq->cmd_flags);
__get_str(cmd)[0] = '\0'; __get_str(cmd)[0] = '\0';
), ),
...@@ -166,7 +166,7 @@ DECLARE_EVENT_CLASS(block_rq, ...@@ -166,7 +166,7 @@ DECLARE_EVENT_CLASS(block_rq,
__entry->nr_sector = blk_rq_trace_nr_sectors(rq); __entry->nr_sector = blk_rq_trace_nr_sectors(rq);
__entry->bytes = blk_rq_bytes(rq); __entry->bytes = blk_rq_bytes(rq);
blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, blk_rq_bytes(rq)); blk_fill_rwbs(__entry->rwbs, rq->cmd_flags);
__get_str(cmd)[0] = '\0'; __get_str(cmd)[0] = '\0';
memcpy(__entry->comm, current->comm, TASK_COMM_LEN); memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
), ),
...@@ -249,7 +249,7 @@ TRACE_EVENT(block_bio_complete, ...@@ -249,7 +249,7 @@ TRACE_EVENT(block_bio_complete,
__entry->sector = bio->bi_iter.bi_sector; __entry->sector = bio->bi_iter.bi_sector;
__entry->nr_sector = bio_sectors(bio); __entry->nr_sector = bio_sectors(bio);
__entry->error = blk_status_to_errno(bio->bi_status); __entry->error = blk_status_to_errno(bio->bi_status);
blk_fill_rwbs(__entry->rwbs, bio->bi_opf, bio->bi_iter.bi_size); blk_fill_rwbs(__entry->rwbs, bio->bi_opf);
), ),
TP_printk("%d,%d %s %llu + %u [%d]", TP_printk("%d,%d %s %llu + %u [%d]",
...@@ -276,7 +276,7 @@ DECLARE_EVENT_CLASS(block_bio, ...@@ -276,7 +276,7 @@ DECLARE_EVENT_CLASS(block_bio,
__entry->dev = bio_dev(bio); __entry->dev = bio_dev(bio);
__entry->sector = bio->bi_iter.bi_sector; __entry->sector = bio->bi_iter.bi_sector;
__entry->nr_sector = bio_sectors(bio); __entry->nr_sector = bio_sectors(bio);
blk_fill_rwbs(__entry->rwbs, bio->bi_opf, bio->bi_iter.bi_size); blk_fill_rwbs(__entry->rwbs, bio->bi_opf);
memcpy(__entry->comm, current->comm, TASK_COMM_LEN); memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
), ),
...@@ -433,7 +433,7 @@ TRACE_EVENT(block_split, ...@@ -433,7 +433,7 @@ TRACE_EVENT(block_split,
__entry->dev = bio_dev(bio); __entry->dev = bio_dev(bio);
__entry->sector = bio->bi_iter.bi_sector; __entry->sector = bio->bi_iter.bi_sector;
__entry->new_sector = new_sector; __entry->new_sector = new_sector;
blk_fill_rwbs(__entry->rwbs, bio->bi_opf, bio->bi_iter.bi_size); blk_fill_rwbs(__entry->rwbs, bio->bi_opf);
memcpy(__entry->comm, current->comm, TASK_COMM_LEN); memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
), ),
...@@ -474,7 +474,7 @@ TRACE_EVENT(block_bio_remap, ...@@ -474,7 +474,7 @@ TRACE_EVENT(block_bio_remap,
__entry->nr_sector = bio_sectors(bio); __entry->nr_sector = bio_sectors(bio);
__entry->old_dev = dev; __entry->old_dev = dev;
__entry->old_sector = from; __entry->old_sector = from;
blk_fill_rwbs(__entry->rwbs, bio->bi_opf, bio->bi_iter.bi_size); blk_fill_rwbs(__entry->rwbs, bio->bi_opf);
), ),
TP_printk("%d,%d %s %llu + %u <- (%d,%d) %llu", TP_printk("%d,%d %s %llu + %u <- (%d,%d) %llu",
...@@ -518,7 +518,7 @@ TRACE_EVENT(block_rq_remap, ...@@ -518,7 +518,7 @@ TRACE_EVENT(block_rq_remap,
__entry->old_dev = dev; __entry->old_dev = dev;
__entry->old_sector = from; __entry->old_sector = from;
__entry->nr_bios = blk_rq_count_bios(rq); __entry->nr_bios = blk_rq_count_bios(rq);
blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, blk_rq_bytes(rq)); blk_fill_rwbs(__entry->rwbs, rq->cmd_flags);
), ),
TP_printk("%d,%d %s %llu + %u <- (%d,%d) %llu %u", TP_printk("%d,%d %s %llu + %u <- (%d,%d) %llu %u",
......
...@@ -1867,7 +1867,7 @@ void blk_trace_remove_sysfs(struct device *dev) ...@@ -1867,7 +1867,7 @@ void blk_trace_remove_sysfs(struct device *dev)
#ifdef CONFIG_EVENT_TRACING #ifdef CONFIG_EVENT_TRACING
void blk_fill_rwbs(char *rwbs, unsigned int op, int bytes) void blk_fill_rwbs(char *rwbs, unsigned int op)
{ {
int i = 0; int i = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment