Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jun 2006 16:37:18 +0400
From:      Stanislav Sedov <stas@310.ru>
To:        freebsd-fs@freebsd.org
Subject:   Re: ext2fs marked dirty when mounted read-only
Message-ID:  <20060620163718.26387be9.stas@310.ru>
In-Reply-To: <Pine.GSO.4.44.0606191755120.14911-100000@eesfc20.engr.ccny.cuny.edu>
References:  <Pine.GSO.4.44.0606191755120.14911-100000@eesfc20.engr.ccny.cuny.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
--Signature=_Tue__20_Jun_2006_16_37_18_+0400_9zT__xfgwWD+j4rE
Content-Type: text/plain; charset=KOI8-R
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, 19 Jun 2006 18:11:38 -0400 (EDT)
hardware@ee.ccny.cuny.edu wrote:

> Dear FreeBSD Filesystem List,
>=20
> When I uncleanly unmount an ext2fs filesystem that is mounted read-only
> it needs to be fsck'ed before the kernel will allow it to remounted.
>=20
> kernel: 6.1-RC1 FreeBSD 6.1-RC1
> disk: da0 at umass-sim0 bus 0 target 0 lun 0
>       da0: <ST350084 1A 3.AA> Fixed Direct Access SCSI-0 device
>       da0: 40.000MB/s transfers
>       da0: 476940MB (976773168 512 byte sectors: 255H 63S/T 60801C)
>=20
> When I try to mount the ext2fs filesystem in read-only mode, I get this:
>=20
>       WARNING: R/W mount denied.  Filesystem is not clean - run fsck
>=20
> This problem can be reproduced on my system by the following steps
>=20
> 	1) mount -t ext2fs -o ro /dev/da0 /mnt # da0 is external USB
> 	2) ls /mnt
> 	3) UNPLUG THE EXTERNAL USB DISK
> 	4) reboot
> 	5) mount -t ext2fs -o ro /dev/da0 /mnt
>=20

There is a small bug in ext2fs code. I'd experienced the same problem
some time ago.

Unfortunately, I have lost the patch.

Try to change the line
"if (fs->s_rd_only && !vfs_flagopt(opts, "ro", NULL, 0)) {"

in ext2_vfsops.c

to
"if (fs->s_rd_only && !(mp->mnt_flag & MNT_RDONLY)) {"

I suppose it will help.


--=20
Stanislav Sedov         MBSD labs, Inc.         <ssedov@mbsd.msk.ru>
=F2=CF=D3=D3=C9=D1, =ED=CF=D3=CB=D7=C1		http://mbsd.msk.ru

--------------------------------------------------------------------
If the facts don't fit the theory, change the facts.  -- A. Einstein
--------------------------------------------------------------------
PGP fingerprint:  F21E D6CC 5626 9609 6CE2  A385 2BF5 5993 EB26 9581

--Signature=_Tue__20_Jun_2006_16_37_18_+0400_9zT__xfgwWD+j4rE
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (FreeBSD)

iD8DBQFEl+wGK/VZk+smlYERAkbYAJwJdh8bHPx+tJmGOz2yQa0Xn01k6gCfQiYi
bGCKZ5yrO+jEozsjqIYjJQU=
=Ohuh
-----END PGP SIGNATURE-----

--Signature=_Tue__20_Jun_2006_16_37_18_+0400_9zT__xfgwWD+j4rE--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060620163718.26387be9.stas>