Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1218504
| From | "Darrick J. Wong" <darrick.wong@oracle.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [GIT PULL] Ext3 removal, quota & udf fixes |
| Date | 2015-09-03 20:40 +0200 |
| Message-ID | <q4HAu-3ib-25@gated-at.bofh.it> (permalink) |
| References | <q3qBH-7NY-7@gated-at.bofh.it> <q4HqO-37a-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Sep 03, 2015 at 06:22:25PM +0000, Richard Yao wrote:
> What happens with this patch if /dev/$DEVICE is ext4 formatted and someone runs
> `mount -t ext3 /dev/$DEVICE $MNT`?
>
> This should fail with the ext3 driver, but it looks like it will work fine with
> CONFIG_EXT4_USE_FOR_EXT23 because ext3_fs_type maps to ext4_mount. My system is
> not built with CONFIG_EXT4_USE_FOR_EXT23 (long story short: it uses a RHEL6
> derived config on Linux 4.1) and I do not have time to rebuild it to verify my
> suspicion, but I imagine there are others on the list that could trivially check
> this.
On 4.2 with CONFIG_EXT4_USE_FOR_EXT23:
# mke2fs -T ext4 /dev/sda
# mount /dev/sda /mnt -t ext3
mount: wrong fs type, bad option, bad superblock on /dev/sda,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
# lsmod|grep ext
ext4 630784 0
jbd2 126976 1 ext4
mbcache 20480 1 ext4
# dmesg
<snip>
[74559.632979] EXT4-fs (sda): couldn't mount as ext3 due to feature incompatibilities
> Also, new kernels are typically drop-in replacements on older userlands. An edge
> case that no one appears to have mentioned is the possibility of using a newer
> kernel on an older system where the initramfs generator might only include ext3,
> which this would break. It might not be terrible to write a small dummy ext3
> module whose only purpose is to depend on ext4 and load it into the kernel on
> those systems. That way initramfs software that properly grabs module
> dependencies will include the ext4 module and `modprobe ext3` will do what it
Well, if it goes looking for ext3.ko directly it will fail, but...
# modinfo ext3
filename: /lib/modules/4.2.0-mcsum/kernel/fs/ext4/ext4.ko
license: GPL
description: Fourth Extended Filesystem
author: Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others
alias: fs-ext4
alias: ext3
alias: fs-ext3
<snip>
I don't know about RHEL initrd scripts, but Ubuntu's use some modprobe trickery
which ensures that it picks up the correct ext4.ko. It does something similar
to this:
# modprobe --ignore-install --quiet --show-depends ext3 | sed -e 's/^insmod //g'
/lib/modules/4.2.0-mcsum/kernel/fs/mbcache.ko
/lib/modules/4.2.0-mcsum/kernel/fs/jbd2/jbd2.ko
/lib/modules/4.2.0-mcsum/kernel/fs/ext4/ext4.ko
to pick up the modules for the initramfs. Not sure what the other distros
do, though.
> always did in terms of making ext3 file systems mountable. I suppose that we
> could use aliases, but given that there is a compatibility shim for CONFIG_EXT3
> to avoid surprises, a dummy module seems reasonable.
>
> These are the only two things that I see preventing ext4 from being a drop-in
> replacement for ext3.
>
> That said, my only connection with ext3/ext4 is that I am one of the genkernel
> developers (Gentoo's Linux initramfs/kernel genreation framework/scripts), so
> my opinion might not matter much here, but I am also in favor of killing ext3 in
> favor of CONFIG_EXT4_USE_FOR_EXT23.
:)
--D
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL] Ext3 removal, quota & udf fixes Jan Kara <jack@suse.cz> - 2015-08-31 08:20 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-31 23:40 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Linus Torvalds <torvalds@linux-foundation.org> - 2015-09-01 00:40 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Raymond Jennings <shentino@gmail.com> - 2015-09-01 01:10 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Theodore Ts'o <tytso@mit.edu> - 2015-09-01 05:00 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Eric Sandeen <sandeen@redhat.com> - 2015-09-01 15:00 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Jeff Mahoney <jeffm@suse.com> - 2015-09-01 17:20 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Raymond Jennings <shentino@gmail.com> - 2015-09-01 00:40 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Raymond Jennings <shentino@gmail.com> - 2015-09-01 02:30 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Christoph Hellwig <hch@infradead.org> - 2015-09-01 08:50 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Albino B Neto <bino@riseup.net> - 2015-09-01 12:30 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Austin S Hemmelgarn <ahferroin7@gmail.com> - 2015-09-01 21:50 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Albino B Neto <bino@riseup.net> - 2015-09-02 05:40 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Raymond Jennings <shentino@gmail.com> - 2015-09-02 07:50 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Austin S Hemmelgarn <ahferroin7@gmail.com> - 2015-09-02 15:30 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Chuck Ebbert <cebbert.lkml@gmail.com> - 2015-09-02 14:00 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Austin S Hemmelgarn <ahferroin7@gmail.com> - 2015-09-02 15:40 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Theodore Ts'o <tytso@mit.edu> - 2015-09-02 18:30 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Austin S Hemmelgarn <ahferroin7@gmail.com> - 2015-09-02 19:00 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Andreas Dilger <adilger@dilger.ca> - 2015-09-01 02:30 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Mel Gorman <mgorman@techsingularity.net> - 2015-09-02 19:00 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes "Darrick J. Wong" <darrick.wong@oracle.com> - 2015-09-02 20:50 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Linus Torvalds <torvalds@linux-foundation.org> - 2015-09-03 01:50 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Albino B Neto <bino@riseup.net> - 2015-09-03 13:40 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes "Darrick J. Wong" <darrick.wong@oracle.com> - 2015-09-03 23:50 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Richard Yao <ryao@gentoo.org> - 2015-09-03 20:30 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes "Darrick J. Wong" <darrick.wong@oracle.com> - 2015-09-03 20:40 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Richard Yao <ryao@gentoo.org> - 2015-09-03 21:20 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes "Darrick J. Wong" <darrick.wong@oracle.com> - 2015-09-03 21:40 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Richard Yao <ryao@gentoo.org> - 2015-09-04 00:30 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Eric Sandeen <sandeen@redhat.com> - 2015-09-03 20:40 +0200
Re: [GIT PULL] Ext3 removal, quota & udf fixes Richard Yao <ryao@gentoo.org> - 2015-09-03 21:20 +0200
csiph-web