linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tadao Uchiyama <Tadao.Uchiyama@uniadex.co.jp>
To: linux-ext4@vger.kernel.org
Subject: EXT3 file system with unsupported revision level can be mounted in R/W mode
Date: Tue, 22 Jul 2008 19:00:31 +0900	[thread overview]
Message-ID: <4885AFBF.2010409@uniadex.co.jp> (raw)

Hello, all

I found there’s a contradiction between contents of some kernel warning
messages and the succeeding results, when an unsupported revision level
for EXT3 file system was detected in mounting process. In this case, the
messages said “EXT3-fs warning: revision level too high, forcing
read-only mode”. However, the warned file system was mounted with
ordinary read and write enabled mode actually, rather than read only
mode. The operation sequence described below shows a way to reproduce
this problem easily.

I think the messages should be changed, if the resultant mount mode is
valid, or the related mount code should be changed so that the file
system would be mounted with read only mode according to the warning
message. What do you think?

Here is my quick observation of the related kernel code. The kernel
function ext3_setup_super() checks the revision level of the file system
to be mounted and return a status indicating read only mode (MS_RDONLY),
if the level is too high. However, the current ext3_fill_super(), which
calls ext3_setup_super(), is careless of this status. ext3_remount()
also seem to fail to handle the returned status appropriately. In
addition, the corresponding code for EXT2 file system has the same problem.

--------------------
# mkfs -t ext3 -r 2 /dev/sdb1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
8962048 inodes, 17920499 blocks
896024 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
547 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 34 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
# mount -t ext3 /dev/sdb1 /mnt/sdb1
# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/sdb1 on /mnt/sdb1 type ext3 (rw)
# cd /mnt/sdb1
# touch aaa.txt
# ls
aaa.txt lost+found

>From /var/log/messages:
Jul 17 15:45:54 kernel kernel: EXT3-fs warning: revision level too high,
forcing read-only mode
Jul 17 15:45:54 kernel kernel: EXT3 FS on sdb1, internal journal
Jul 17 15:45:54 kernel kernel: EXT3-fs: mounted filesystem with ordered
data mode.
--------------------

Thanks,
Tadao Uchiyama

             reply	other threads:[~2008-07-22 10:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-22 10:00 Tadao Uchiyama [this message]
2008-08-18  5:06 ` EXT3 file system with unsupported revision level can be mounted in R/W mode Tadao Uchiyama
2008-08-18  9:40   ` Tadao Uchiyama
2008-08-27 20:02     ` Eric Sandeen
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=4885AFBF.2010409@uniadex.co.jp \
    --to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).