diff options
| author | Theodore Ts'o <[email protected]> | 2025-08-07 13:35:20 +0000 |
|---|---|---|
| committer | Theodore Ts'o <[email protected]> | 2025-08-13 03:15:05 +0000 |
| commit | c5e104a91e7b6fa12c1dc2d8bf84abb7ef9b89ad (patch) | |
| tree | eecfccdcc26463c3747cd006d131e736ccb6ea0b /drivers/pci/controller/vmd.c | |
| parent | ext4: fix reserved gdt blocks handling in fsmap (diff) | |
| download | kernel-c5e104a91e7b6fa12c1dc2d8bf84abb7ef9b89ad.tar.gz kernel-c5e104a91e7b6fa12c1dc2d8bf84abb7ef9b89ad.zip | |
ext4: don't try to clear the orphan_present feature block device is r/o
When the file system is frozen in preparation for taking an LVM
snapshot, the journal is checkpointed and if the orphan_file feature
is enabled, and the orphan file is empty, we clear the orphan_present
feature flag. But if there are pending inodes that need to be removed
the orphan_present feature flag can't be cleared.
The problem comes if the block device is read-only. In that case, we
can't process the orphan inode list, so it is skipped in
ext4_orphan_cleanup(). But then in ext4_mark_recovery_complete(),
this results in the ext4 error "Orphan file not empty on read-only fs"
firing and the file system mount is aborted.
Fix this by clearing the needs_recovery flag in the block device is
read-only. We do this after the call to ext4_load_and_init-journal()
since there are some error checks need to be done in case the journal
needs to be replayed and the block device is read-only, or if the
block device containing the externa journal is read-only, etc.
Cc: [email protected]
Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1108271
Cc: [email protected]
Fixes: 02f310fcf47f ("ext4: Speedup ext4 orphan inode handling")
Signed-off-by: Theodore Ts'o <[email protected]>
Diffstat (limited to 'drivers/pci/controller/vmd.c')
0 files changed, 0 insertions, 0 deletions
