ext4 fails on ext2 filesystems
Hi,
I've an ext2 filesystem as root filesystem, because it's mounted readonly for the most part. I've built in the support for ext[234] in the kernel. Ext4 takes precedence over ext2 and it mounts the root filesystem:
[ 6.184751] EXT4-fs: delayed allocation enabled [ 6.191487] EXT4-fs: mballoc enabled [ 6.197710] EXT4-fs: mounted filesystem hda3 without journal [ 6.203948] VFS: Mounted root (ext4 filesystem) readonly on device 3:3.
% mount | grep root
rootfs on / type rootfs (rw)/dev/root on / type ext4 (ro,noatime,errors=remount-ro,barrier=1,data=writeback)
But when remounting the filesystem read/write and changing a file, the changes are written to the filesystem, but it's remounted readonly immediatly. I've set the mount option remount-ro.
[ 203.082300] EXT4 FS on hda3, no journal [ 205.746713] EXT4-fs error (device hda3): ext4_free_data: circular indirect block detected, inode=165056, block=184476
% cat /proc/cpuinfo
processor : 0
cpu : 7455, altivec supported
clock : 606.000000MHz
revision : 3.3 (pvr 8001 0303)
bogomips : 36.73
timebase : 18432000
platform : PowerMac
model : PowerBook6,3
machine : PowerBook6,3
motherboard : PowerBook6,3 MacRISC3 Power Macintosh
detected as : 287 (iBook G4)
pmac flags : 0000001b
L2 cache : 256K unified
pmac-generation : NewWorld
Memory : 640 MB
% uname -a
Linux ibook 2.6.29-rc2 #1 Sat Jan 17 18:04:20 CET 2009 ppc GNU/Linux
% tune2fs -l /dev/root
tune2fs 1.41.3 (12-Oct-2008)
Filesystem volume name: Linux Root Last mounted on: <not available> Filesystem UUID: 2a16f78b-dde3-4224-bb23-6303c0d69c92 Filesystem magic number: 0xEF53 Filesystem revision #: 1 (dynamic) Filesystem features: ext_attr resize_inode dir_index filetype sparse_super large_file Filesystem flags: unsigned_directory_hash Default mount options: (none) Filesystem state: clean Errors behavior: Continue Filesystem OS type: Linux Inode count: 327680 Block count: 1310520 Reserved block count: 65526 Free blocks: 294862 Free inodes: 152729 First block: 0 Block size: 4096 Fragment size: 4096 Reserved GDT blocks: 319 Blocks per group: 32768 Fragments per group: 32768 Inodes per group: 8192 Inode blocks per group: 512 Filesystem created: Tue Aug 12 19:22:53 2008 Last mount time: Sun Jan 18 01:59:11 2009 Last write time: Sun Jan 18 01:59:27 2009 Mount count: 2 Maximum mount count: 32 Last checked: Sat Jan 17 19:33:26 2009 Check interval: 15552000 (6 months) Next check after: Thu Jul 16 20:33:26 2009 Reserved blocks uid: 0 (user root) Reserved blocks gid: 0 (group root) First inode: 11 Inode size: 256 Required extra isize: 28 Desired extra isize: 28 Default directory hash: tea Directory Hash Seed: ba7cdd48-9bce-4d4c-afdc-cff8b4008f11
Bye, Jörg.
Signature · 2 lines
Objektivität ist die Wahnvorstellung, Beobachtungen könnten ohne Beobachter gemacht werden – Heinz v. Foerster
Theodore Tso
maintainerQuoted 8 lines · Jörg Sommer
But when remounting the filesystem read/write and changing a file, the changes are written to the filesystem, but it's remounted readonly immediatly. I've set the mount option remount-ro.
[ 203.082300] EXT4 FS on hda3, no journal [ 205.746713] EXT4-fs error (device hda3): ext4_free_data: circular indirect block detected, inode=165056, block=184476
Can you do me a favor? Can you run debugfs /dev/hda3, and then run the debugfs command: "stat <165056>"?
Any thanks!!
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Theodore,
Theodore Tso schrieb am Sat 17. Jan, 21:38 (-0500):
Quoted 6 lines · Jörg Sommer
Quoted 5 lines
But when remounting the filesystem read/write and changing a file, the changes are written to the filesystem, but it's remounted readonly immediatly. I've set the mount option remount-ro.
Quoted 6 lines
Quoted 3 lines
[ 203.082300] EXT4 FS on hda3, no journal [ 205.746713] EXT4-fs error (device hda3): ext4_free_data: circular indirect block detected, inode=165056, block=184476Can you do me a favor? Can you run debugfs
/dev/hda3, and then run the debugfs command: "stat <165056>"?
I've reproduced the error, because I've ran a fsck in the meantime:
% dmesg |tail G -F EXT
[24648.457402] EXT4 FS on hda3, no journal [25253.227881] EXT4-fs error (device hda3): ext4_free_data: circular indirect block detected, inode=165056, block=184476
# debugfs /dev/hda3 <<<$'stat <165056>\ntestb 184476\nquit' debugfs 1.41.3 (12-Oct-2008) debugfs: stat <165056> Inode: 165056 Type: regular Mode: 0644 Flags: 0x0 Generation: 2419652156 Version: 0x00000000:00000001 User: 0 Group: 0 Size: 0 File ACL: 0 Directory ACL: 0 Links: 0 Blockcount: 0 Fragment: Address: 0 Number: 0 Size: 0 ctime: 0x4972fd07:7463285e -- Sun Jan 18 10:57:27 2009 atime: 0x4972fd06:acc79ebb -- Sun Jan 18 10:57:26 2009 mtime: 0x4972fd07:7463285e -- Sun Jan 18 10:57:27 2009 crtime: 0x06fd7249:acc79ebb -- Wed Sep 19 08:52:41 1973 dtime: 0x4972fd07 -- Sun Jan 18 10:57:27 2009 Size of extra inode fields: 28 BLOCKS:
debugfs: testb 184476
Block 184476 not in use
debugfs: quit
Bye, Jörg.
Signature · 3 lines
Treffen sich zwei Funktionen. Sagt die eine: „Verschwinde oder ich differenzier' dich!“ Erwidert die andere: „Ätsch, ich bin exponentiell!“
Theodore Tso
maintainerQuoted 3 lines · Jörg Sommer
Quoted 3 lines
Quoted 3 lines
[ 203.082300] EXT4 FS on hda3, no journal [ 205.746713] EXT4-fs error (device hda3): ext4_free_data: circular indirect block detected, inode=165056, block=184476
Hi, this patch should fix your problem.
- Ted
commit bf3baec2b4529dcf47ee422a48b8c0e83df7f0a0
Author: Theodore Ts'o <[email protected]> Date: Tue Jan 20 09:50:19 2009 -0500
ext4: Fix ext4_free_blocks() w/o a journal when files have indirect blocks
When trying to unlink a file with indirect blocks on a filesystem without a journal, the "circular indirect block" sanity test was getting falsely triggered.
fs/ext4/inode.c +1 -1
@@ -3622,7 +3622,7 @@ static void ext4_free_data(handle_t *handle, struct inode *inode,* block pointed to itself, it would have been detached when * the block was cleared. Check for this instead of OOPSing. */ -if (bh2jh (this_bh)) +if ((EXT4_JOURNAL (inode) ==NULL ) ||bh2jh (this_bh))ext4_handle_dirty_metadata (handle, inode, this_bh);else ext4_error(inode->i_sb, __func__,
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Jörg Sommer
Tested-byHi Theodore,
Theodore Tso schrieb am Tue 20. Jan, 09:51 (-0500):
Quoted 6 lines · Jörg Sommer
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
[ 203.082300] EXT4 FS on hda3, no journal [ 205.746713] EXT4-fs error (device hda3): ext4_free_data: circular indirect block detected, inode=165056, block=184476Hi, this patch should fix your problem.
Yes, this patch fixes the problem. Thanks.
Quoted 11 lines
commit
bf3baec2b4529dcf47ee422a48b8c0e83df7f0a0Author: Theodore Ts'o <[email protected]> Date: Tue Jan 20 09:50:19 2009 -0500ext4: Fix
ext4_free_blocks()w/o a journal when files have indirect blocksWhen trying to unlink a file with indirect blocks on a filesystem without a journal, the "circular indirect block" sanity test was getting falsely triggered.
Signed-off-by "Theodore Ts'o" <[email protected]>
Quoted 6 lines
fs/ext4/inode.c +0
-0
fs/ext4/inode.c static void ext4_free_data(handle_t *handle, struct inode *inode, · line 3628
Quoted 8 lines
fs/ext4/inode.c +1
-1@@ -3622,7 +3622,7 @@ static void ext4_free_data(handle_t *handle, struct inode *inode,* block pointed to itself, it would have been detached when * the block was cleared. Check for this instead of OOPSing. */ -if (bh2jh (this_bh)) +if ((EXT4_JOURNAL (inode) ==NULL ) ||bh2jh (this_bh))ext4_handle_dirty_metadata (handle, inode, this_bh);else ext4_error(inode->i_sb, __func__,
Bye, Jörg.
Signature · 1 line
Freiheit heißt, die Wahl zu haben, wessen Sklave man ist.
Theodore Tso
maintainerQuoted 2 lines · Jörg Sommer
Yes, this patch fixes the problem. Thanks.
Great, thanks for the confirmation.
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · J�rg Sommer
I've an ext2 filesystem as root filesystem, because it's mounted readonly for the most part. I've built in the support for ext[234] in the kernel. Ext4 takes precedence over ext2 and it mounts the root filesystem:
Hmm, probably an unintended consequence of the newly-added patch to allow ext4 to mount ext2 filesystems.
Quoted 8 lines
But when remounting the filesystem read/write and changing a file, the changes are written to the filesystem, but it's remounted readonly immediatly. I've set the mount option remount-ro.
[ 203.082300] EXT4 FS on hda3, no journal [ 205.746713] EXT4-fs error (device hda3): ext4_free_data: circular indirect block detected, inode=165056, block=184476motherboard : PowerBook6,3 MacRISC3 Power Macintosh
Hmm, looks like it might be a bug in the endian conversion?
Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hello Andreas,
Andreas Dilger schrieb am Tue 20. Jan, 07:30 (+0800):
Quoted 12 lines · J�rg Sommer
Quoted 3 lines
I've an ext2 filesystem as root filesystem, because it's mounted readonly for the most part. I've built in the support for ext[234] in the kernel. Ext4 takes precedence over ext2 and it mounts the root filesystem:
Hmm, probably an unintended consequence of the newly-added patch to allow ext4 to mount ext2 filesystems.
Quoted 4 lines
But when remounting the filesystem read/write and changing a file, the changes are written to the filesystem, but it's remounted readonly immediatly. I've set the mount option remount-ro.
Quoted 6 lines
Quoted 4 lines
[ 203.082300] EXT4 FS on hda3, no journal [ 205.746713] EXT4-fs error (device hda3): ext4_free_data: circular indirect block detected, inode=165056, block=184476motherboard : PowerBook6,3 MacRISC3 Power Macintosh
Hmm, looks like it might be a bug in the endian conversion?
Or an unsigned vs. signed char bug? Can I somehow help you hunting the bug? How can I mount my rootfs with ext4 on 2.6.28. Maybe this bug isn't in this version.
Bye, Jörg.
Signature · 3 lines
$ cat /dev/random #!/usr/bin/perl -WT print "hello world\n";