Skip to contentSkip to conversation

block: show operation in error injection rules

PATCH Applied Jackie Liu 3 participants 3 messages Jul 15 – Jul 16 Block layer

lore
Share & tools
lore

Jackie Liu

author
#0 lore raw

PATCH 1/1 block: show operation in error injection rules

From: Jackie Liu <[email protected]>

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.

---
 block/error-injection.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
block/error-injection.c +4 -3
index cfb83138960c..e14bc4b723ef 100644
@@ -276,9 +276,10 @@ static int blk_error_injection_show(struct seq_file *s, void *private)
 
 	rcu_read_lock();
 	list_for_each_entry_rcu(inj, &disk->error_injection_list, entry) {
-		seq_printf(s, "%llu:%llu status=%s,chance=%u",
-			inj->start, inj->end,
-			blk_status_to_tag(inj->status), inj->chance);
+		seq_printf(s, "%llu:%llu op=%s,status=%s,chance=%u",
+			   inj->start, inj->end,
+			   blk_op_str(inj->op),
+			   blk_status_to_tag(inj->status), inj->chance);
 		seq_putc(s, '\n');
 	}
 	rcu_read_unlock();
Signature · 1 line
2.54.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Jackie Liu

From: Jackie Liu <[email protected]>

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.

Looks good:

maintainer Applied
#2 lore raw
In reply to Jackie Liu
Quoted 3 lines · Jackie Liu

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.

Applied, thanks!

[1/1] block: show operation in error injection rules

      commit: f94de432646ebec7857ba2624fe082e779b52572

Best regards,

Signature · 1 line
Jens Axboe