All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomas Hlavaty <tom@logand.com>
To: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Cc: linux-nilfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: BUG: NILFS error (device dm-0): nilfs_bmap_lookup_contig: broken bmap (inode number=4023271)
Date: Tue, 24 Jun 2025 22:27:18 +0200	[thread overview]
Message-ID: <87tt44lwbd.fsf@logand.com> (raw)

Hi Ryusuke,

I get the following error:

   NILFS error (device dm-0): nilfs_bmap_lookup_contig:
   broken bmap (inode number=4023271)

and the filesystem gets mounted read-only.

I can remount the filesystem read-write again manually, but after an
operation which touches the broken part of the filesystem, it gets
remounted read-only again.

I have identified the file of the inode:
sudo find / -inum 4023271
as
/root/.cache/mesa_shader_cache_db/index
but remounting rw and trying to
rm -r /root/.cache
puts the filesystem to ro mode again.
(not sure why there is .cache dir and mesa_shader_cache_db dir in the
/root dir, I never use root account for GUI)

I am in the process of upgrading the system from nixos24.11 to
nixos25.05 but this issue is preventing me from doing so.  Is there a
way to fix the filesystem so that it stays read-write?  Or do I have to
discard the whole filesystem?

Also I have noticed since long time ago, that reboot or shutdown says
something about nilfs discarding stuff, which seems strange and those
messages were not there a year or more ago.  Not sure if this is
related, but it should not be discarding anything I guess.  I see these
messages on many machines so it is not related to a particular hardware.

Log and stacktrace are bellow.
Please let me know if I can provide more info about the problem.

Any help would be appreciated.

Thank you,

Tomas

$ uname -a
Linux buta 6.6.87 #1-NixOS SMP PREEMPT_DYNAMIC Thu Apr 10 12:37:44 UTC 2025 x86_64 GNU/Linux

$ sudo dmesg | grep nilfs
[    1.087780] stage-1-init: [Tue Jun 24 19:32:16 UTC 2025] loading module nilfs2...
[   35.318251] NILFS error (device dm-0): nilfs_bmap_lookup_contig: broken bmap (inode number=4023271)
[   35.319235] NILFS error (device dm-0): nilfs_bmap_lookup_contig: broken bmap (inode number=4023271)
[...]
[   35.347872] NILFS error (device dm-0): nilfs_bmap_lookup_contig:
broken bmap (inode number=4023271)
[ 1733.401421]  nilfs_segctor_do_construct+0xdd/0x2630 [nilfs2]
[ 1733.401747]  ? nilfs_mdt_fetch_dirty+0x19/0x50 [nilfs2]
[ 1733.401899]  ? nilfs_test_metadata_dirty.isra.0+0x50/0xb0 [nilfs2]
[ 1733.402059]  nilfs_segctor_construct+0x170/0x2b0 [nilfs2]
[ 1733.402220]  nilfs_segctor_thread+0x155/0x3f0 [nilfs2]
[ 1733.402385]  ? __pfx_nilfs_segctor_thread+0x10/0x10 [nilfs2]
[ 1738.068626] NILFS error (device dm-0): nilfs_bmap_last_key: broken
bmap (inode number=4023271)

             reply	other threads:[~2025-06-24 20:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-24 20:27 Tomas Hlavaty [this message]
2025-06-25  2:27 ` BUG: NILFS error (device dm-0): nilfs_bmap_lookup_contig: broken bmap (inode number=4023271) 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=87tt44lwbd.fsf@logand.com \
    --to=tom@logand.com \
    --cc=konishi.ryusuke@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nilfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.