ext3-2.4-0.9.10
An ext3 patch against linux 2.4.10 is at
http://www.uow.edu.au/~andrewm/linux/ext3/
This patch is *lightly tested* - ie, it boots and does stuff. The changes to ext3 are small, but the kernel which it patches has recently changed a lot. If you're cautious, please wait a couple of days.
The patch retains the buffer-tracing code. This will soon be broken out into a separate patch to make ext3 suitable for submission for the mainstream kernel.
Changelog:
- Fix an oops which could occur at unmount time due to non-empty orphan list. This could be triggered by an earlier error during a truncate.
- Merge Ted's directory scan speedup heuristic.
- Remove the abort_write() address_space_operation by ensuring that all prepare_write() callers always call commit_write().
- A number of changes to suit the new 2.4.10 VM and buffer-layer design.
-
Hi!
After testing this new patch on 2.4.10 I have detected a problem when trying to convert mounted partitions to ext3.
The problem is that on umounting the partition, with 2.4.10 kernel, the has_journal feature mark is removed, so the device is not detected as having journal on next mount.
Creating journals (converting to ext3) on partitions that are not mounted works ok.
Following is a practical demonstration of this in case I didn't explain myself well...
pul:/# grep var /etc/fstab /dev/hda7 /var auto rw 0 2 pul:/# mount|grep var /dev/hda7 on /var type ext2 (rw) pul:~# tune2fs -l /dev/hda7|grep -i journal pul:~# ls -l /var/.journal ls: /var/.journal: No such file or directory pul:~# tune2fs -j /dev/hda7 tune2fs 1.24a (02-Sep-2001) Creating journal inode: done This filesystem will be automatically checked every 20 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. pul:~# tune2fs -l /dev/hda7|grep -i journal Filesystem features: has_journal filetype sparse_super Journal UUID: <none> Journal inode: 12 Journal device: 0x0000 pul:~# ls -l /var/.journal -rw------- 1 root root 8388608 sep 24 13:39 /var/.journal pul:/# umount /var pul:/# tune2fs -l /dev/hda7|grep -i journal pul:/# mount /var pul:/# mount|grep var /dev/hda7 on /var type ext2 (rw) pul:/# ls -l /var/.journal -rw------- 1 root root 8388608 Sep 24 13:39 /var/.journal
Regards...
Signature · 1 line
Manty/BestiaTester -> http://manty.net
Quoted 1 line · Andrew Morton
An ext3 patch against linux 2.4.10 is at
Any chance of a patch for Alan's tree?
I have a patch for 2.4.9-ac15 that is ext 0.9.9 + ted's speedup, but I wouldn't feel comfortable trying to diff that against a patch for Linus's tree.
Let me know if I can help. Maybe Alan can merge 0.9.9 -- its been running solid here since release.
Signature · 3 lines
Robert M. Love rml at ufl.edu rml at tech9.net
Quoted 8 lines · Andrew Morton
An ext3 patch against linux 2.4.10 is at
http://www.uow.edu.au/~andrewm/linux/ext3/This patch is *lightly tested* - ie, it boots and does stuff. The changes to ext3 are small, but the kernel which it patches has recently changed a lot. If you're cautious, please wait a couple of days.
This doesn't compile for me:
gcc -D__KERNEL__ -I/home/trini/work/kernel/testing/linuxppc_2_4_devel/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -D__powerpc__ -fsigned-char -msoft-float -pipe -ffixed-r2 -Wno-uninitialized -mmultiple -mstring -DEXPORT_SYMTAB -c jbd-kernel.cjbd-kernel.c: In function `b_list_to_string':
jbd-kernel.c:209: `BUF_PROTECTED' undeclared (first use in this function) jbd-kernel.c:209: (Each undeclared identifier is reported only once jbd-kernel.c:209: for each function it appears in.)
make[3]: *** [jbd-kernel.o] Error 1
make[3]: Leaving directory `/home/trini/work/kernel/testing/linuxppc_2_4_devel/fs' make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/home/trini/work/kernel/testing/linuxppc_2_4_devel/fs' make[1]: *** [_dir_fs] Error 2
make[1]: Leaving directory `/home/trini/work/kernel/testing/linuxppc_2_4_devel'
$ grep BUF_PROTECTED ext3-2.4-0.9.10-2410 + case BUF_PROTECTED: return "BUF_PROTECTED"; $ less .config ... CONFIG_EXT3_FS=y CONFIG_JBD=y CONFIG_JBD_DEBUG=y CONFIG_BUFFER_DEBUG=y
Signature · 2 lines
Tom Rini (TR1265) http://gate.crashing.org/~trini/
Quoted 12 lines · Tom Rini
Quoted 8 lines · Andrew Morton
An ext3 patch against linux 2.4.10 is at
http://www.uow.edu.au/~andrewm/linux/ext3/This patch is *lightly tested* - ie, it boots and does stuff. The changes to ext3 are small, but the kernel which it patches has recently changed a lot. If you're cautious, please wait a couple of days.
Quoted 4 lines
This doesn't compile for me:
gcc -D__KERNEL__ -I/home/trini/work/kernel/testing/linuxppc_2_4_devel/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -D__powerpc__ -fsigned-char -msoft-float -pipe -ffixed-r2 -Wno-uninitialized -mmultiple -mstring -DEXPORT_SYMTAB -cjbd-kernel.cjbd-kernel.c: In function `b_list_to_string':
jbd-kernel.c:209: `BUF_PROTECTED' undeclared (first use in this function)
Yes, sorry. Delete line 209 of jdb-kernel.c, or don't compile with buffer-debug.
Hi,
Quoted 5 lines · Tom Rini
Quoted 3 lines
The changes to ext3 are small, but the kernel which it patches has recently changed a lot. If you're cautious, please wait a couple of days.
This doesn't compile for me:
I just checked in a fix.
Quoted 1 line
jbd-kernel.c:209: `BUF_PROTECTED' undeclared (first use in this function)
Simply remove that line, or undefine the CONFIG_BUFFER_DEBUG.
Cheers,
Stephen
Quoted 13 lines · Andrew Morton
Quoted 12 lines · Tom Rini
Quoted 8 lines · Andrew Morton
An ext3 patch against linux 2.4.10 is at
http://www.uow.edu.au/~andrewm/linux/ext3/This patch is *lightly tested* - ie, it boots and does stuff. The changes to ext3 are small, but the kernel which it patches has recently changed a lot. If you're cautious, please wait a couple of days.
Quoted 7 lines
Quoted 4 lines
This doesn't compile for me:
gcc -D__KERNEL__ -I/home/trini/work/kernel/testing/linuxppc_2_4_devel/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -D__powerpc__ -fsigned-char -msoft-float -pipe -ffixed-r2 -Wno-uninitialized -mmultiple -mstring -DEXPORT_SYMTAB -cjbd-kernel.cjbd-kernel.c: In function `b_list_to_string':
jbd-kernel.c:209: `BUF_PROTECTED' undeclared (first use in this function)Yes, sorry. Delete line 209 of
jdb-kernel.c, or don't compile with buffer-debug.
Okay. BTW, my ppc box is at 26 days with ext3-0.9.6-2.4.9 right now, so hopefully all the endian bugs are gone.
Signature · 2 lines
Tom Rini (TR1265) http://gate.crashing.org/~trini/
Quoted 31 lines · Santiago Garcia Mantinan
After testing this new patch on 2.4.10 I have detected a problem when trying to convert mounted partitions to ext3.
The problem is that on umounting the partition, with 2.4.10 kernel, the
has_journalfeature mark is removed, so the device is not detected as having journal on next mount.Creating journals (converting to ext3) on partitions that are not mounted works ok.
Following is a practical demonstration of this in case I didn't explain myself well...
pul:/# grep var /etc/fstab /dev/hda7 /var auto rw 0 2 pul:/# mount|grep var /dev/hda7 on /var type ext2 (rw) pul:~# tune2fs -l /dev/hda7|grep -i journal pul:~# ls -l /var/.journal ls: /var/.journal: No such file or directory pul:~# tune2fs -j /dev/hda7 tune2fs 1.24a (02-Sep-2001) Creating journal inode: done This filesystem will be automatically checked every 20 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. pul:~# tune2fs -l /dev/hda7|grep -i journal Filesystem features: has_journal filetype sparse_super Journal UUID: <none> Journal inode: 12 Journal device: 0x0000 pul:~# ls -l /var/.journal
Quoted 8 lines
-rw------- 1 root root 8388608 sep 24 13:39 /var/.journal pul:/# umount /var pul:/# tune2fs -l /dev/hda7|grep -i journal pul:/# mount /var pul:/# mount|grep var /dev/hda7 on /var type ext2 (rw) pul:/# ls -l /var/.journal -rw------- 1 root root 8388608 Sep 24 13:39 /var/.journal
This is because the block devices have moved to page cache, but the internal filesystem code is still using the buffer cache - this means that changes from user space are not seen in the kernel, and are lost the next time that the superblock is written by the kernel.
When the block-devices-in-pagecache issue came up last, I had advocated waiting for 2.5 to do this so that we can move ext2/ext3 into pagecache as well (the superblock at least). This could be done by changing the bread/getblk stuff to be backed by pagecache as well, but nobody has has time to do this yet.
For now, you need to do the tune2fs on an unmounted filesystem. Since this does not immediately "convert" the mounted filesystem to ext3 right away (you need to remount it as ext3 to get journaling to start), then you need to unmount the fs at some time anyways. It _does_ pose a bit of a problem for converting the root fs, however - you will need to boot from a rescue disk to run tune2fs on the unmounted filesystem, but it is a one-time effort for the root fs, and it also ensures that you have a rescue disk you can use in case of problems ;-).
The presence or absence of the ".journal" file does not indicate whether or not the filesystem is journaled. It is "tune2fs -l" which matters.
Cheers, Andreas
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert