Patch "ext4: short-cut orphan cleanup on error" has been added to the 4.4-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
ext4: short-cut orphan cleanup on error
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ext4-short-cut-orphan-cleanup-on-error.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
c65d5c6c81a1f27dec5f627f67840726fcd146deMon Sep 17 00:00:00 2001
From: Vegard Nossum <[email protected]>
Date: Thu, 14 Jul 2016 23:21:35 -0400
Subject: ext4: short-cut orphan cleanup on error
From: Vegard Nossum <[email protected]>
commit c65d5c6c81a1f27dec5f627f67840726fcd146de upstream.
If we encounter a filesystem error during orphan cleanup, we should stop. Otherwise, we may end up in an infinite loop where the same inode is processed again and again.
EXT4-fs (loop0): warning: checktime reached, running e2fsck is recommended
EXT4-fs error (device loop0): ext4_mb_generate_buddy:758: group 2, block bitmap and bg descriptor inconsistent: 6117 vs 0 free clusters Aborting journal on device loop0-8.
EXT4-fs (loop0): Remounting filesystem read-only
EXT4-fs error (device loop0) in ext4_free_blocks:4895: Journal has aborted
EXT4-fs error (device loop0) in ext4_do_update_inode:4893: Journal has aborted
EXT4-fs error (device loop0) in ext4_do_update_inode:4893: Journal has aborted
EXT4-fs error (device loop0) in ext4_ext_remove_space:3068: IO failure
EXT4-fs error (device loop0) in ext4_ext_truncate:4667: Journal has aborted
EXT4-fs error (device loop0) in ext4_orphan_del:2927: Journal has aborted
EXT4-fs error (device loop0) in ext4_do_update_inode:4893: Journal has aborted
EXT4-fs (loop0): Inode 16 (00000000618192a0): orphan list check failed!
[...]
EXT4-fs (loop0): Inode 16 (0000000061819748): orphan list check failed!
[...]
EXT4-fs (loop0): Inode 16 (0000000061819bf0): orphan list check failed!
[...]
See-also: c9eb13a9105 ("ext4: fix hang when processing corrupted orphaned inode list")
--- fs/ext4/super.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
fs/ext4/super.c +10 -0
@@ -2240,6 +2240,16 @@ static void ext4_orphan_cleanup(struct swhile (es->s_last_orphan) {struct inode *inode; +/* +* We may have encountered an error during cleanup; if +* so, skip the rest. +*/ +if (EXT4_SB (sb)->s_mount_state &EXT4_ERROR_FS ) { +jbd_debug (1 ,"Skipping orphan recovery on fs with errors.\n" ); + es->s_last_orphan =0 ; +break ; + } + inode =ext4_orphan_get (sb,le32_to_cpu (es->s_last_orphan));if (IS_ERR (inode)) { es->s_last_orphan =0 ;
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/ext4-short-cut-orphan-cleanup-on-error.patch queue-4.4/block-fix-use-after-free-in-seq-file.patch queue-4.4/ipv4-reject-rtnh_f_dead-and-rtnh_f_linkdown-from-user-space.patch queue-4.4/ext4-check-for-extents-that-wrap-around.patch queue-4.4/net-irda-fix-null-pointer-dereference-on-memory-allocation-failure.patch queue-4.4/ext4-validate-s_reserved_gdt_blocks-on-mount.patch queue-4.4/ext4-don-t-call-ext4_should_journal_data-on-the-journal-inode.patch