NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/60621 (panic: ufs_inactive: dirty filesystem?)



On Tue, Nov 17, 2026 at 09:18:02PM +0000, Taylor R Campbell wrote:
> > Date: Tue, 17 Nov 2026 20:58:53 +0000
> > From: "J. Hannken-Illjes" <hannken%netbsd.org@localhost>
> > 
> > On Tue, Nov 17, 2026 at 07:13:19PM +0000, Taylor R Campbell wrote:
> > > This suggests a (purely speculative, unconfirmed) hypothesis about the
> > > `ufs_inactive: dirty filesystem?' panic, that the fast path of writing
> > > to unlinked internal snapshots doesn't work with wapbl because it
> > > allocates blocks and updates i_blocks without grouping them into a
> > > single atomic transaction.
> > 
> > I suppose it is ffs_snapblkfree() claiming the freed block.  The
> > block moves to the snapshot and its i_blocks increases.  Don't know
> > how to group the snapshot inode update into this transaction yet.
> 
> Perhaps, if that's not convenient to do, a cheap alternative would be
> relax the panic so it doesn't apply to snapshots?
> 
> -	if (ip->i_mode == 0 && (DIP(ip, size) != 0 || DIP(ip, blocks) != 0)) {
> +	if (ip->i_mode == 0 &&
> +	    (DIP(ip, size) != 0 ||
> +		(DIP(ip, blocks) != 0 &&
> +		    (ip->i_flags & (SF_SNAPSHOT|SF_SNAPINVAL)) != 0))) {

Sorry, cannot work as the snapshot flags got cleared by ffs_snapremove()
before we reach ufs_inactive().  Maybe allow negative block count if
mounted with wapbl or "fix" negative block count in ffs_snapremove() --
at least until the problem gets fixed.

-- 
J. Hannken-Illjes - hannken%netbsd.org@localhost



Home | Main Index | Thread Index | Old Index