From: Eric Sandeen <sandeen@redhat.com>
To: Tadao Uchiyama <Tadao.Uchiyama@uniadex.co.jp>
Cc: linux-ext4@vger.kernel.org
Subject: Re: EXT3 file system with unsupported revision level can be mounted in R/W mode
Date: Wed, 27 Aug 2008 15:02:04 -0500 [thread overview]
Message-ID: <48B5B2BC.4050303@redhat.com> (raw)
In-Reply-To: <48A9439C.4010007@uniadex.co.jp>
> Since the patch described in my previous response was formatted inappropriately with no indents, let
> me please send it here again.
>
> Thanks.
> Signed-off-by :Tadao Uchiyama <Tadao.Uchiyama@uniadex.co.jp>
>
> ----------
> diff -up linux-2.6.26.2/fs/ext3/super.c.orig linux-2.6.26.2/fs/ext3/super.c
For what it's worth, ext2 and ext4 have the same problems...
> --- linux-2.6.26.2/fs/ext3/super.c.orig 2008-08-18 11:01:02.000000000 +0900
> +++ linux-2.6.26.2/fs/ext3/super.c 2008-08-18 11:06:29.000000000 +0900
> @@ -1898,7 +1898,8 @@ static int ext3_fill_super (struct super
> goto failed_mount4;
> }
>
> - ext3_setup_super (sb, es, sb->s_flags & MS_RDONLY);
> + if (ext3_setup_super (sb, es, sb->s_flags & MS_RDONLY))
> + sb->s_flags |= MS_RDONLY;
> /*
> * akpm: core read_super() calls in here with the superblock locked.
> * That deadlocks, because orphan cleanup needs to lock the superblock
> @@ -2506,8 +2507,8 @@ static int ext3_remount (struct super_bl
> sbi->s_mount_state = le16_to_cpu(es->s_state);
> if ((err = ext3_group_extend(sb, es, n_blocks_count)))
One other thing I worry about; we are doing group_extend before we check
the revision. Is that safe? We also still do things like replay the
journal and process orphan inodes before checking the revision.
Should we even worry about this, or is the revision level never going to
change again, and we can almost just ignore it now? (or assume that for
recent kernels, a too-high rev level indicates corruption and fail the
mount?)
-Eric
> goto restore_opts;
> - if (!ext3_setup_super (sb, es, 0))
> - sb->s_flags &= ~MS_RDONLY;
> + if (ext3_setup_super (sb, es, 0))
> + *flags &= ~MS_RDONLY;
> }
> }
> #ifdef CONFIG_QUOTA
> ----------
> --
> 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
next prev parent reply other threads:[~2008-08-27 20:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-22 10:00 EXT3 file system with unsupported revision level can be mounted in R/W mode Tadao Uchiyama
2008-08-18 5:06 ` Tadao Uchiyama
2008-08-18 9:40 ` Tadao Uchiyama
2008-08-27 20:02 ` Eric Sandeen [this message]
2008-08-29 11:34 ` tadao.uchiyama
[not found] ` <D457AE0D137B9143B30CDD9EB9B2F8D509FDD525@ZZ01X1MB24.ixas.unisys.co.jp>
2009-02-17 8:50 ` Tadao Uchiyama
2009-02-17 20:36 ` Theodore Tso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48B5B2BC.4050303@redhat.com \
--to=sandeen@redhat.com \
--cc=Tadao.Uchiyama@uniadex.co.jp \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.