Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1462376
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4.4 48/49] ext4: short-cut orphan cleanup on error |
| Date | 2016-08-14 22:30 +0200 |
| Message-ID | <s6acH-4ts-87@gated-at.bofh.it> (permalink) |
| References | <s6acF-4ts-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vegard Nossum <vegard.nossum@oracle.com>
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")
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/ext4/super.c | 10 ++++++++++
1 file changed, 10 insertions(+)
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2240,6 +2240,16 @@ static void ext4_orphan_cleanup(struct s
while (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;
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4.4 00/49] 4.4.18-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 33/49] mm: memcontrol: fix swap counter leak on swapout from offline cgroup Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 05/49] net: bgmac: Fix infinite loop in bgmac_dma_tx_add() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 26/49] x86/mtrr: Fix Xorg crashes in Qemu sessions Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 28/49] x86/xen, pat: Remove PAT table init code from Xen Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 01/49] tcp: make challenge acks less predictable Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 03/49] ipv4: reject RTNH_F_DEAD and RTNH_F_LINKDOWN from user space Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 12/49] PNP: Add Broadwell to Intel MCH size workaround Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 23/49] x86/mm/pat: Add support of non-default PAT MSR setting Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 24/49] x86/mm/pat: Add pat_disable() interface Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 10/49] scsi: ignore errors from scsi_dh_add_device() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 20/49] apparmor: fix ref count leak when profile sha1 hash is read Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 41/49] fs/dcache.c: avoid soft-lockup in dput() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 49/49] ext4: fix reference counting bug on block allocation error Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 07/49] qed: Fix setting/clearing bit in completion bitmap Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 38/49] fuse: fsync() did not return IO errors Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 46/49] ext4: dont call ext4_should_journal_data() on the journal inode Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 43/49] crypto: scatterwalk - Fix test in scatterwalk_done Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 19/49] Revert "s390/kdump: Clear subchannel ID to signal non-CCW/SCSI IPL" Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 45/49] ext4: fix deadlock during page writeback Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 22/49] devpts: clean up interface to pty drivers Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 48/49] ext4: short-cut orphan cleanup on error Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 32/49] mm: memcontrol: fix cgroup creation failure after many small jobs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 06/49] net/irda: fix NULL pointer dereference on memory allocation failure Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 27/49] x86/mtrr: Fix PAT init handling when MTRR is disabled Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 44/49] ext4: check for extents that wrap around Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 29/49] x86/pat: Document the PAT initialization sequence Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 36/49] block: fix use-after-free in seq file Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:30 +0200 [PATCH 4.4 37/49] sysv, ipc: fix security-layer leaking Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:40 +0200 [PATCH 4.4 09/49] ipath: Restrict use of the write() interface Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:40 +0200 [PATCH 4.4 35/49] x86/syscalls/64: Add compat_sys_keyctl for 32-bit userspace Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:40 +0200 [PATCH 4.4 21/49] random: strengthen input validation for RNDADDTOENTCNT Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:40 +0200 [PATCH 4.4 04/49] bonding: set carrier off for devices created through netlink Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:40 +0200 [PATCH 4.4 11/49] PNP: Add Haswell-ULT to Intel MCH size workaround Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:40 +0200 Re: [PATCH 4.4 00/49] 4.4.18-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-15 10:00 +0200 Re: [PATCH 4.4 00/49] 4.4.18-stable review Guenter Roeck <linux@roeck-us.net> - 2016-08-15 15:10 +0200 Re: [PATCH 4.4 00/49] 4.4.18-stable review Shuah Khan <shuah.kh@samsung.com> - 2016-08-16 06:10 +0200
csiph-web