mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: syzbot <syzbot+155b515977fecb686986@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Forwarded: [PATCH] nilfs2: add debug instrumentation to nilfs_clean_segments
Date: Thu, 18 Jun 2026 18:24:44 -0700	[thread overview]
Message-ID: <6a349a5c.d85dbdf7.1299fc.000d.GAE@google.com> (raw)
In-Reply-To: <6a32ab13.d1b4d54b.11ef78.0031.GAE@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.

***

Subject: [PATCH] nilfs2: add debug instrumentation to nilfs_clean_segments
Author: kartikey406@gmail.com

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master


Add temporary pr_err() calls to log ns_nsegments, nfreesegs, and
the first segment number on entry to nilfs_clean_segments(), and
to log the error code on each retry, to diagnose the hung task
reported by syzbot.

Link: https://syzkaller.appspot.com/bug?extid=155b515977fecb686986
Signed-off-by: Deepanshu Kartikey <kartikey406@gmail.com>
---
 fs/nilfs2/segment.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index 9332f5ac6083..219ae4ae0c03 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -2519,7 +2519,10 @@ int nilfs_clean_segments(struct super_block *sb, struct nilfs_argv *argv,
 		return -EROFS;
 
 	nilfs_transaction_lock(sb, &ti, 1);
-
+	pr_err("nilfs2: clean_segments: ns_nsegments=%lu nfreesegs=%zu segnums[0]=0x%llx\n",
+       nilfs->ns_nsegments,
+       nfreesegs,
+       nfreesegs > 0 ? segnumv[0] : 0ULL);
 	/*
 	 * Validate segment numbers under ns_segctor_sem (held for write
 	 * by nilfs_transaction_lock above) so the check is serialized
@@ -2559,7 +2562,7 @@ int nilfs_clean_segments(struct super_block *sb, struct nilfs_argv *argv,
 
 		if (likely(!err))
 			break;
-
+		pr_err("nilfs2: clean_segments retry: err=%d\n", err);
 		nilfs_warn(sb, "error %d cleaning segments", err);
 		set_current_state(TASK_INTERRUPTIBLE);
 		schedule_timeout(sci->sc_interval);
-- 
2.43.0


  reply	other threads:[~2026-06-19  1:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-17 14:11 [syzbot] [nilfs?] INFO: task hung in nilfs_segctor_thread (7) syzbot
2026-06-19  1:24 ` syzbot [this message]
2026-06-19  2:50 ` Ryusuke Konishi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6a349a5c.d85dbdf7.1299fc.000d.GAE@google.com \
    --to=syzbot+155b515977fecb686986@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®