Linux block layer
 help / color / mirror / Atom feed
* [PATCH] block: show operation in error injection rules
@ 2026-07-15  7:33 Jackie Liu
  2026-07-16  9:20 ` Christoph Hellwig
  2026-07-16 12:12 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Jackie Liu @ 2026-07-15  7:33 UTC (permalink / raw)
  To: xboe; +Cc: linux-block

From: Jackie Liu <liuyun01@kylinos.cn>

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>
---
 block/error-injection.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/block/error-injection.c b/block/error-injection.c
index cfb83138960c..e14bc4b723ef 100644
--- a/block/error-injection.c
+++ b/block/error-injection.c
@@ -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();
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: show operation in error injection rules
  2026-07-15  7:33 [PATCH] block: show operation in error injection rules Jackie Liu
@ 2026-07-16  9:20 ` Christoph Hellwig
  2026-07-16 12:12 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2026-07-16  9:20 UTC (permalink / raw)
  To: Jackie Liu; +Cc: xboe, linux-block

On Wed, Jul 15, 2026 at 03:33:41PM +0800, Jackie Liu wrote:
> From: Jackie Liu <liuyun01@kylinos.cn>
> 
> 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:

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: show operation in error injection rules
  2026-07-15  7:33 [PATCH] block: show operation in error injection rules Jackie Liu
  2026-07-16  9:20 ` Christoph Hellwig
@ 2026-07-16 12:12 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2026-07-16 12:12 UTC (permalink / raw)
  To: xboe, Jackie Liu; +Cc: linux-block


On Wed, 15 Jul 2026 15:33:41 +0800, Jackie Liu wrote:
> 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,
-- 
Jens Axboe




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-16 12:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-15  7:33 [PATCH] block: show operation in error injection rules Jackie Liu
2026-07-16  9:20 ` Christoph Hellwig
2026-07-16 12:12 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox