* [PATCH 2/5] blktrace: pass ioprio to tracing data
2026-11-24 13:35 [PATCH 0/5] blktrace: add support for tracing I/O priorities Johannes Thumshirn
2026-11-24 13:35 ` [PATCH 1/5] blktrace: add ioprio field to struct blk_io_trace2 Johannes Thumshirn
@ 2026-11-24 13:35 ` Johannes Thumshirn
2026-11-24 13:35 ` [PATCH 3/5] blktrace: record I/O priorities if requested Johannes Thumshirn
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Johannes Thumshirn @ 2026-11-24 13:35 UTC (permalink / raw)
To: axboe@kernel.dk
Cc: Christoph Hellwig, linux-block, Damien Le Moal, Hannes Reinecke,
Martin K. Petersen, Niklas Cassel, Shinichiro Kawasaki,
Chaitanya Kulkarni, Johannes Thumshirn
Pass the I/O priority of the bio or request down to the recording
functions and store it in struct blk_io_trace2. Events without a bio or
request (plug, unplug and the zone write plug events) pass -1, so that
they can later be told apart from requests with an I/O priority of 0.
No user visible change yet, as __BLK_TA_IOPRIO is not set on any event.
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
kernel/trace/blktrace.c | 50 ++++++++++++++++++++++++-----------------
1 file changed, 30 insertions(+), 20 deletions(-)
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 4d39edc6730d..c57df30750e9 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -95,7 +95,7 @@ static void record_blktrace_event2(struct blk_io_trace2 *t2, pid_t pid, int cpu,
sector_t sector, int bytes, u64 what,
dev_t dev, int error, u64 cgid,
ssize_t cgid_len, void *pdu_data,
- int pdu_len)
+ int pdu_len, u16 ioprio)
{
t2->pid = pid;
t2->cpu = cpu;
@@ -108,6 +108,7 @@ static void record_blktrace_event2(struct blk_io_trace2 *t2, pid_t pid, int cpu,
t2->pdu_len = pdu_len + cgid_len;
memset(t2->pad, 0, sizeof(t2->pad));
+ t2->ioprio = ioprio;
if (cgid_len)
memcpy((void *)t2 + sizeof(*t2), &cgid, cgid_len);
@@ -138,7 +139,8 @@ static void relay_blktrace_event1(struct blk_trace *bt, unsigned long sequence,
static void relay_blktrace_event2(struct blk_trace *bt, unsigned long sequence,
pid_t pid, int cpu, sector_t sector,
int bytes, u64 what, int error, u64 cgid,
- ssize_t cgid_len, void *pdu_data, int pdu_len)
+ ssize_t cgid_len, void *pdu_data, int pdu_len,
+ u16 ioprio)
{
struct blk_io_trace2 *t;
size_t trace_len = sizeof(struct blk_io_trace2) + pdu_len + cgid_len;
@@ -152,18 +154,19 @@ static void relay_blktrace_event2(struct blk_trace *bt, unsigned long sequence,
t->time = ktime_to_ns(ktime_get());
record_blktrace_event2(t, pid, cpu, sector, bytes, what, bt->dev, error,
- cgid, cgid_len, pdu_data, pdu_len);
+ cgid, cgid_len, pdu_data, pdu_len, ioprio);
}
static void relay_blktrace_event(struct blk_trace *bt, unsigned long sequence,
pid_t pid, int cpu, sector_t sector, int bytes,
u64 what, int error, u64 cgid,
- ssize_t cgid_len, void *pdu_data, int pdu_len)
+ ssize_t cgid_len, void *pdu_data, int pdu_len,
+ u16 ioprio)
{
if (bt->version == 2)
return relay_blktrace_event2(bt, sequence, pid, cpu, sector,
bytes, what, error, cgid, cgid_len,
- pdu_data, pdu_len);
+ pdu_data, pdu_len, ioprio);
return relay_blktrace_event1(bt, sequence, pid, cpu, sector, bytes,
what, error, cgid, cgid_len, pdu_data,
pdu_len);
@@ -196,7 +199,7 @@ static void trace_note(struct blk_trace *bt, pid_t pid, u64 action,
t = ring_buffer_event_data(event);
record_blktrace_event2(t, pid, cpu, 0, 0,
action, bt->dev, 0, cgid, cgid_len,
- (void *)data, len);
+ (void *)data, len, 0);
trace_buffer_unlock_commit(blk_tr, buffer, event, trace_ctx);
return;
}
@@ -205,7 +208,7 @@ static void trace_note(struct blk_trace *bt, pid_t pid, u64 action,
return;
relay_blktrace_event(bt, 0, pid, cpu, 0, 0, action, 0, cgid,
- cgid_len, (void *)data, len);
+ cgid_len, (void *)data, len, 0);
}
/*
@@ -311,7 +314,7 @@ static const u32 ddir_act[2] = { BLK_TC_ACT(BLK_TC_READ),
*/
static void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes,
const blk_opf_t opf, u64 what, int error,
- int pdu_len, void *pdu_data, u64 cgid)
+ int pdu_len, void *pdu_data, u64 cgid, int ioprio)
{
struct task_struct *tsk = current;
struct ring_buffer_event *event = NULL;
@@ -444,7 +447,7 @@ static void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes,
record_blktrace_event2(ring_buffer_event_data(event),
pid, cpu, sector, bytes,
what, bt->dev, error, cgid, cgid_len,
- pdu_data, pdu_len);
+ pdu_data, pdu_len, max(ioprio, 0));
break;
}
@@ -464,7 +467,8 @@ static void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes,
sequence = per_cpu_ptr(bt->sequence, cpu);
(*sequence)++;
relay_blktrace_event(bt, *sequence, pid, cpu, sector, bytes,
- what, error, cgid, cgid_len, pdu_data, pdu_len);
+ what, error, cgid, cgid_len, pdu_data, pdu_len,
+ max(ioprio, 0));
local_irq_restore(flags);
}
@@ -1038,7 +1042,8 @@ static void blk_add_trace_rq(struct request *rq, blk_status_t error,
what |= BLK_TC_ACT(BLK_TC_FS);
__blk_add_trace(bt, blk_rq_trace_sector(rq), nr_bytes, rq->cmd_flags,
- what, blk_status_to_errno(error), 0, NULL, cgid);
+ what, blk_status_to_errno(error), 0, NULL, cgid,
+ req_get_ioprio(rq));
rcu_read_unlock();
}
@@ -1114,7 +1119,7 @@ static void blk_add_trace_bio(struct request_queue *q, struct bio *bio,
__blk_add_trace(bt, bio->bi_iter.bi_sector, bio->bi_iter.bi_size,
bio->bi_opf, what, error, 0, NULL,
- blk_trace_bio_get_cgid(q, bio));
+ blk_trace_bio_get_cgid(q, bio), bio->bi_ioprio);
rcu_read_unlock();
}
@@ -1154,7 +1159,7 @@ static void blk_add_trace_plug(void *ignore, struct request_queue *q)
rcu_read_lock();
bt = rcu_dereference(q->blk_trace);
if (bt)
- __blk_add_trace(bt, 0, 0, 0, BLK_TA_PLUG, 0, 0, NULL, 0);
+ __blk_add_trace(bt, 0, 0, 0, BLK_TA_PLUG, 0, 0, NULL, 0, -1);
rcu_read_unlock();
}
@@ -1174,7 +1179,8 @@ static void blk_add_trace_unplug(void *ignore, struct request_queue *q,
else
what = BLK_TA_UNPLUG_TIMER;
- __blk_add_trace(bt, 0, 0, 0, what, 0, sizeof(rpdu), &rpdu, 0);
+ __blk_add_trace(bt, 0, 0, 0, what, 0, sizeof(rpdu), &rpdu, 0,
+ -1);
}
rcu_read_unlock();
}
@@ -1189,7 +1195,7 @@ static void blk_add_trace_zone_plug(void *ignore, struct request_queue *q,
bt = rcu_dereference(q->blk_trace);
if (bt && bt->version >= 2)
__blk_add_trace(bt, sector, sectors << SECTOR_SHIFT, 0,
- BLK_TA_ZONE_PLUG, 0, 0, NULL, 0);
+ BLK_TA_ZONE_PLUG, 0, 0, NULL, 0, -1);
rcu_read_unlock();
return;
@@ -1205,7 +1211,7 @@ static void blk_add_trace_zone_unplug(void *ignore, struct request_queue *q,
bt = rcu_dereference(q->blk_trace);
if (bt && bt->version >= 2)
__blk_add_trace(bt, sector, sectors << SECTOR_SHIFT, 0,
- BLK_TA_ZONE_UNPLUG, 0, 0, NULL, 0);
+ BLK_TA_ZONE_UNPLUG, 0, 0, NULL, 0, -1);
rcu_read_unlock();
return;
}
@@ -1224,7 +1230,8 @@ static void blk_add_trace_split(void *ignore, struct bio *bio, unsigned int pdu)
bio->bi_iter.bi_size, bio->bi_opf, BLK_TA_SPLIT,
blk_status_to_errno(bio->bi_status),
sizeof(rpdu), &rpdu,
- blk_trace_bio_get_cgid(q, bio));
+ blk_trace_bio_get_cgid(q, bio),
+ bio->bi_ioprio);
}
rcu_read_unlock();
}
@@ -1259,7 +1266,8 @@ static void blk_add_trace_bio_remap(void *ignore, struct bio *bio, dev_t dev,
__blk_add_trace(bt, bio->bi_iter.bi_sector, bio->bi_iter.bi_size,
bio->bi_opf, BLK_TA_REMAP,
blk_status_to_errno(bio->bi_status),
- sizeof(r), &r, blk_trace_bio_get_cgid(q, bio));
+ sizeof(r), &r, blk_trace_bio_get_cgid(q, bio),
+ bio->bi_ioprio);
rcu_read_unlock();
}
@@ -1294,7 +1302,8 @@ static void blk_add_trace_rq_remap(void *ignore, struct request *rq, dev_t dev,
__blk_add_trace(bt, blk_rq_pos(rq), blk_rq_bytes(rq),
rq->cmd_flags, BLK_TA_REMAP, 0,
- sizeof(r), &r, blk_trace_request_get_cgid(rq));
+ sizeof(r), &r, blk_trace_request_get_cgid(rq),
+ req_get_ioprio(rq));
rcu_read_unlock();
}
@@ -1321,7 +1330,8 @@ void blk_add_driver_data(struct request *rq, void *data, size_t len)
__blk_add_trace(bt, blk_rq_trace_sector(rq), blk_rq_bytes(rq), 0,
BLK_TA_DRV_DATA, 0, len, data,
- blk_trace_request_get_cgid(rq));
+ blk_trace_request_get_cgid(rq),
+ req_get_ioprio(rq));
rcu_read_unlock();
}
EXPORT_SYMBOL_GPL(blk_add_driver_data);
--
2.56.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 4/5] blktrace: decode ioprio on ftrace block tracer
2026-11-24 13:35 [PATCH 0/5] blktrace: add support for tracing I/O priorities Johannes Thumshirn
` (2 preceding siblings ...)
2026-11-24 13:35 ` [PATCH 3/5] blktrace: record I/O priorities if requested Johannes Thumshirn
@ 2026-11-24 13:35 ` Johannes Thumshirn
2026-11-24 13:35 ` [PATCH 5/5] block: add ioprio to the bio based tracepoints Johannes Thumshirn
4 siblings, 0 replies; 7+ messages in thread
From: Johannes Thumshirn @ 2026-11-24 13:35 UTC (permalink / raw)
To: axboe@kernel.dk
Cc: Christoph Hellwig, linux-block, Damien Le Moal, Hannes Reinecke,
Martin K. Petersen, Niklas Cassel, Shinichiro Kawasaki,
Chaitanya Kulkarni, Johannes Thumshirn
Add the blk_ioprio option to the ftrace blk tracer. If it is set, events
with an I/O priority are marked with __BLK_TA_IOPRIO and the I/O priority
is printed as "class,hint,level" after the RWBS column, in the same
format as the block_rq_* tracepoints use.
Mask __BLK_TA_IOPRIO when decoding the action, and when synthesizing v1
records for the 'bin' output, which has no room for the I/O priority.
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
kernel/trace/blktrace.c | 40 +++++++++++++++++++++++++++++++++++++---
1 file changed, 37 insertions(+), 3 deletions(-)
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index f1a3407d36c9..c779263d2937 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -49,6 +49,7 @@ static struct tracer_opt blk_tracer_opts[] = {
{ TRACER_OPT(blk_cgroup, TRACE_BLK_OPT_CGROUP) },
{ TRACER_OPT(blk_cgname, TRACE_BLK_OPT_CGNAME) },
#endif
+ { TRACER_OPT(blk_ioprio, TRACE_BLK_OPT_IOPRIO) },
{ }
};
@@ -1513,6 +1514,33 @@ static __u64 get_pdu_int(const struct trace_entry *ent, bool has_cg)
typedef void (blk_log_action_t) (struct trace_iterator *iter, const char *act,
bool has_cg);
+static const char *ioprio_class_name(u16 class)
+{
+ switch (class) {
+ case IOPRIO_CLASS_NONE:
+ return "none";
+ case IOPRIO_CLASS_RT:
+ return "rt";
+ case IOPRIO_CLASS_BE:
+ return "be";
+ case IOPRIO_CLASS_IDLE:
+ return "idle";
+ default:
+ return "invalid";
+ }
+}
+
+static void blk_log_ioprio(struct trace_seq *s, const struct blk_io_trace2 *t)
+{
+ if (!(t->action & __BLK_TA_IOPRIO))
+ return;
+
+ trace_seq_printf(s, "%s,%u,%u ",
+ ioprio_class_name(IOPRIO_PRIO_CLASS(t->ioprio)),
+ IOPRIO_PRIO_HINT(t->ioprio),
+ IOPRIO_PRIO_LEVEL(t->ioprio));
+}
+
static void blk_log_action_classic(struct trace_iterator *iter, const char *act,
bool has_cg)
{
@@ -1528,6 +1556,7 @@ static void blk_log_action_classic(struct trace_iterator *iter, const char *act,
"%3d,%-3d %2d %5d.%09lu %5u %2s %3s ",
MAJOR(t->device), MINOR(t->device), iter->cpu,
secs, nsec_rem, iter->ent->pid, act, rwbs);
+ blk_log_ioprio(&iter->seq, t);
}
static void blk_log_action(struct trace_iterator *iter, const char *act,
@@ -1548,6 +1577,7 @@ static void blk_log_action(struct trace_iterator *iter, const char *act,
trace_seq_printf(&iter->seq, "%3d,%-3d %s %2s %3s ",
MAJOR(t->device), MINOR(t->device),
blkcg_name_buf, act, rwbs);
+ blk_log_ioprio(&iter->seq, t);
} else {
/*
* The cgid portion used to be "INO,GEN". Userland
@@ -1566,10 +1596,13 @@ static void blk_log_action(struct trace_iterator *iter, const char *act,
"%3d,%-3d %llx,%-llx %2s %3s ",
MAJOR(t->device), MINOR(t->device),
id & U32_MAX, id >> 32, act, rwbs);
+ blk_log_ioprio(&iter->seq, t);
}
- } else
+ } else {
trace_seq_printf(&iter->seq, "%3d,%-3d %2s %3s ",
MAJOR(t->device), MINOR(t->device), act, rwbs);
+ blk_log_ioprio(&iter->seq, t);
+ }
}
static void blk_log_dump_pdu(struct trace_seq *s,
@@ -1762,7 +1795,8 @@ static enum print_line_t print_one_line(struct trace_iterator *iter,
bool has_cg;
t = te_blk_io_trace(iter->ent);
- what = (t->action & ((1 << BLK_TC_SHIFT) - 1)) & ~__BLK_TA_CGROUP;
+ what = (t->action & ((1 << BLK_TC_SHIFT) - 1)) &
+ ~(__BLK_TA_CGROUP | __BLK_TA_IOPRIO);
long_act = !!(tr->trace_flags & TRACE_ITER(VERBOSE));
log_action = classic ? &blk_log_action_classic : &blk_log_action;
has_cg = t->action & __BLK_TA_CGROUP;
@@ -1798,7 +1832,7 @@ static void blk_trace_synthesize_old_trace(struct trace_iterator *iter)
.time = iter->ts,
.sector = t->sector,
.bytes = t->bytes,
- .action = lower_32_bits(t->action),
+ .action = lower_32_bits(t->action) & ~__BLK_TA_IOPRIO,
.pid = t->pid,
.device = t->device,
.cpu = t->cpu,
--
2.56.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 5/5] block: add ioprio to the bio based tracepoints
2026-11-24 13:35 [PATCH 0/5] blktrace: add support for tracing I/O priorities Johannes Thumshirn
` (3 preceding siblings ...)
2026-11-24 13:35 ` [PATCH 4/5] blktrace: decode ioprio on ftrace block tracer Johannes Thumshirn
@ 2026-11-24 13:35 ` Johannes Thumshirn
4 siblings, 0 replies; 7+ messages in thread
From: Johannes Thumshirn @ 2026-11-24 13:35 UTC (permalink / raw)
To: axboe@kernel.dk
Cc: Christoph Hellwig, linux-block, Damien Le Moal, Hannes Reinecke,
Martin K. Petersen, Niklas Cassel, Shinichiro Kawasaki,
Chaitanya Kulkarni, Johannes Thumshirn
The request based block tracepoints already report the I/O priority
since commit aa6ff4eb7c10 ("block: Add ioprio to block_rq tracepoint").
Add it to block_bio_complete, the block_bio class (block_bio_backmerge,
block_bio_frontmerge, block_bio_queue and block_getrq), block_split,
block_bio_remap and block_rq_remap as well, so the I/O priority and with
it the CDL hint of an I/O can be followed through the whole block layer.
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
include/trace/events/block.h | 50 +++++++++++++++++++++++++++++-------
1 file changed, 41 insertions(+), 9 deletions(-)
diff --git a/include/trace/events/block.h b/include/trace/events/block.h
index 9c97a16850b9..5828ed5df872 100644
--- a/include/trace/events/block.h
+++ b/include/trace/events/block.h
@@ -373,6 +373,7 @@ TRACE_EVENT(block_bio_complete,
__field( dev_t, dev )
__field( sector_t, sector )
__field( unsigned, nr_sector )
+ __field( unsigned short, ioprio )
__field( int, error )
__array( char, rwbs, RWBS_LEN)
),
@@ -381,14 +382,20 @@ TRACE_EVENT(block_bio_complete,
__entry->dev = bio_dev(bio);
__entry->sector = bio->bi_iter.bi_sector;
__entry->nr_sector = bio_sectors(bio);
+ __entry->ioprio = bio->bi_ioprio;
__entry->error = blk_status_to_errno(bio->bi_status);
blk_fill_rwbs(__entry->rwbs, bio->bi_opf);
),
- TP_printk("%d,%d %s %llu + %u [%d]",
+ TP_printk("%d,%d %s %llu + %u %s,%u,%u [%d]",
MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs,
(unsigned long long)__entry->sector,
- __entry->nr_sector, __entry->error)
+ __entry->nr_sector,
+ __print_symbolic(IOPRIO_PRIO_CLASS(__entry->ioprio),
+ IOPRIO_CLASS_STRINGS),
+ IOPRIO_PRIO_HINT(__entry->ioprio),
+ IOPRIO_PRIO_LEVEL(__entry->ioprio),
+ __entry->error)
);
DECLARE_EVENT_CLASS(block_bio,
@@ -401,6 +408,7 @@ DECLARE_EVENT_CLASS(block_bio,
__field( dev_t, dev )
__field( sector_t, sector )
__field( unsigned int, nr_sector )
+ __field( unsigned short, ioprio )
__array( char, rwbs, RWBS_LEN )
__array( char, comm, TASK_COMM_LEN )
),
@@ -409,14 +417,20 @@ DECLARE_EVENT_CLASS(block_bio,
__entry->dev = bio_dev(bio);
__entry->sector = bio->bi_iter.bi_sector;
__entry->nr_sector = bio_sectors(bio);
+ __entry->ioprio = bio->bi_ioprio;
blk_fill_rwbs(__entry->rwbs, bio->bi_opf);
memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
),
- TP_printk("%d,%d %s %llu + %u [%s]",
+ TP_printk("%d,%d %s %llu + %u %s,%u,%u [%s]",
MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs,
(unsigned long long)__entry->sector,
- __entry->nr_sector, __entry->comm)
+ __entry->nr_sector,
+ __print_symbolic(IOPRIO_PRIO_CLASS(__entry->ioprio),
+ IOPRIO_CLASS_STRINGS),
+ IOPRIO_PRIO_HINT(__entry->ioprio),
+ IOPRIO_PRIO_LEVEL(__entry->ioprio),
+ __entry->comm)
);
/**
@@ -554,6 +568,7 @@ TRACE_EVENT(block_split,
__field( dev_t, dev )
__field( sector_t, sector )
__field( sector_t, new_sector )
+ __field( unsigned short, ioprio )
__array( char, rwbs, RWBS_LEN )
__array( char, comm, TASK_COMM_LEN )
),
@@ -562,14 +577,19 @@ TRACE_EVENT(block_split,
__entry->dev = bio_dev(bio);
__entry->sector = bio->bi_iter.bi_sector;
__entry->new_sector = new_sector;
+ __entry->ioprio = bio->bi_ioprio;
blk_fill_rwbs(__entry->rwbs, bio->bi_opf);
memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
),
- TP_printk("%d,%d %s %llu / %llu [%s]",
+ TP_printk("%d,%d %s %llu / %llu %s,%u,%u [%s]",
MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs,
(unsigned long long)__entry->sector,
(unsigned long long)__entry->new_sector,
+ __print_symbolic(IOPRIO_PRIO_CLASS(__entry->ioprio),
+ IOPRIO_CLASS_STRINGS),
+ IOPRIO_PRIO_HINT(__entry->ioprio),
+ IOPRIO_PRIO_LEVEL(__entry->ioprio),
__entry->comm)
);
@@ -594,6 +614,7 @@ TRACE_EVENT(block_bio_remap,
__field( unsigned int, nr_sector )
__field( dev_t, old_dev )
__field( sector_t, old_sector )
+ __field( unsigned short, ioprio )
__array( char, rwbs, RWBS_LEN)
),
@@ -603,15 +624,20 @@ TRACE_EVENT(block_bio_remap,
__entry->nr_sector = bio_sectors(bio);
__entry->old_dev = dev;
__entry->old_sector = from;
+ __entry->ioprio = bio->bi_ioprio;
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 %s,%u,%u",
MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs,
(unsigned long long)__entry->sector,
__entry->nr_sector,
MAJOR(__entry->old_dev), MINOR(__entry->old_dev),
- (unsigned long long)__entry->old_sector)
+ (unsigned long long)__entry->old_sector,
+ __print_symbolic(IOPRIO_PRIO_CLASS(__entry->ioprio),
+ IOPRIO_CLASS_STRINGS),
+ IOPRIO_PRIO_HINT(__entry->ioprio),
+ IOPRIO_PRIO_LEVEL(__entry->ioprio))
);
/**
@@ -637,6 +663,7 @@ TRACE_EVENT(block_rq_remap,
__field( dev_t, old_dev )
__field( sector_t, old_sector )
__field( unsigned int, nr_bios )
+ __field( unsigned short, ioprio )
__array( char, rwbs, RWBS_LEN)
),
@@ -647,15 +674,20 @@ TRACE_EVENT(block_rq_remap,
__entry->old_dev = dev;
__entry->old_sector = from;
__entry->nr_bios = blk_rq_count_bios(rq);
+ __entry->ioprio = req_get_ioprio(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 %s,%u,%u",
MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs,
(unsigned long long)__entry->sector,
__entry->nr_sector,
MAJOR(__entry->old_dev), MINOR(__entry->old_dev),
- (unsigned long long)__entry->old_sector, __entry->nr_bios)
+ (unsigned long long)__entry->old_sector, __entry->nr_bios,
+ __print_symbolic(IOPRIO_PRIO_CLASS(__entry->ioprio),
+ IOPRIO_CLASS_STRINGS),
+ IOPRIO_PRIO_HINT(__entry->ioprio),
+ IOPRIO_PRIO_LEVEL(__entry->ioprio))
);
/**
--
2.56.1
^ permalink raw reply related [flat|nested] 7+ messages in thread