Skip to content

Commit f94de43

Browse files
JackieLiu1axboe
authored andcommitted
block: show operation in error injection rules
Rules listed through the error_injection debugfs file omit the block operation they match. As a result, rules that differ only in operation are indistinguishable even though op is mandatory when adding a rule. Signed-off-by: Jackie Liu <liuyun01@kylinos.cn> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://patch.msgid.link/20260715073341.95129-1-liu.yun@linux.dev Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 4ff58d6 commit f94de43

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

block/error-injection.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,10 @@ static int blk_error_injection_show(struct seq_file *s, void *private)
276276

277277
rcu_read_lock();
278278
list_for_each_entry_rcu(inj, &disk->error_injection_list, entry) {
279-
seq_printf(s, "%llu:%llu status=%s,chance=%u",
280-
inj->start, inj->end,
281-
blk_status_to_tag(inj->status), inj->chance);
279+
seq_printf(s, "%llu:%llu op=%s,status=%s,chance=%u",
280+
inj->start, inj->end,
281+
blk_op_str(inj->op),
282+
blk_status_to_tag(inj->status), inj->chance);
282283
seq_putc(s, '\n');
283284
}
284285
rcu_read_unlock();

0 commit comments

Comments
 (0)