[PATCH v2 05/34] jfs: don't set SB_RDONLY after filesystem errors
Christian Brauner
brauner at kernel.org
Tue Nov 10 13:59:08 PST 2026
On Fri, Oct 30, 2026 at 04:09:51PM +0000, sashiko-bot at kernel.org wrote:
> With COMMIT_Dirty never set on ip (and jfs_freeze() skipping txQuiesce() once
> sb_emergency_ro() is set), could evicting the inode trigger
> BUG_ON(!list_empty(&ji->anon_inode_list)) in jfs_evict_inode()?
No for extAlloc(). dquot_free_block() in its failure path marks the
inode dirty and jfs_dirty_inode() sets COMMIT_Dirty because atlhead is
set by then. extRecord() doesn't mark the inode dirty on failure without
this patch either and it only runs for XAD_NOTRECORDED extents which
Linux never creates.
> sb_rdonly(sb) is still false, so won't jfs_extendfs() proceed on a filesystem
> that just entered emergency read-only mode during sync_filesystem(sb)?
Right, I'll check sb_emergency_ro() there too.
> What happens if userspace requests a read-write remount (for example, mount -o
> remount,rw) after a runtime filesystem error without having remounted
> read-only first?
It succeeds and the filesystem stays read-only. That's how ext4 behaves.
> won't updateSuper() take the JFS_NOINTEGRITY branch instead of returning early
> at sbi->state == FM_DIRTY, and overwrite the on-disk FM_DIRTY error state with
> FM_CLEAN?
Pre-existing.
> Wouldn't jfs_evict_inode() hit BUG_ON(!list_empty(&ji->anon_inode_list))
> because nothing commits the inode after jfs_reconfigure() sets SB_RDONLY?
No.
> If the filesystem was mounted with JFS_NOINTEGRITY and an error occurs while it
> is frozen, does calling updateSuper(sb, FM_MOUNT) in jfs_unfreeze() clobber the
> FM_DIRTY state?
Yes, I'll make jfs_unfreeze() record FM_DIRTY again in that state.
--
More information about the linux-mtd
mailing list