From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Subject: Re: mount -o remount problems with ext3 and journal= options in /etc/fstab Date: Fri, 28 Nov 2008 17:03:10 -0500 Message-ID: <200811281703.12669.vapier@gentoo.org> References: <200811271447.44837.vapier@gentoo.org> <20081127230227.GR2961@nb.net.home> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart8026361.UsCfk5Q1cK"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Cc: util-linux-ng-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Karel Zak Return-path: In-Reply-To: <20081127230227.GR2961-sHeGUpI7y9L/9pzu0YdTqQ@public.gmane.org> Sender: util-linux-ng-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org --nextPart8026361.UsCfk5Q1cK Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 27 November 2008 18:02:27 Karel Zak wrote: > On Thu, Nov 27, 2008 at 02:47:44PM -0500, Mike Frysinger wrote: > > if you specify journal=3Dupdate in /etc/fstab, then attempts to remount > > that point can be a bit painful > > > > for example: > > dd if=3D/dev/zero of=3Dfoo count=3D10000 > > mke2fs -F -j foo > > mkdir foo-mount > > echo $PWD/foo $PWD/foo-mount ext3 defaults,loop,journal=3Dupdate >> > > /etc/fstab mount foo-mount > > mount foo-mount -o remount,ro > > > > the last command will result in: > > mount: /root/foo-mount not mounted already, or bad option > > this is a generic remount EINVAL error message > > > and the dmesg output will show us: > > EXT3-fs: cannot specify journal on remount > > > > so should mount be handling this ? > > How do you want to handle this in mount(8)? It's fs-depend option and > all is this behaviour is managed by kernel. just fishing for ideas atm to see what others think > > or should we update ext3 to only abort if the journal=3D option given > > at remount is different from the initial mount ? > > ... CC: linux-fs or linux-ext4 list ? well, i guess the first question to ask is, does it make sense to have thes= e=20 journal options in /etc/fstab ? handling journal=3Dupdate is easy, but journal=3Dinum and journal_dev=3D do= esnt seem=20 to be as easy since the value isnt retained afaict =2D-- a/fs/ext3/super.c +++ b/fs/ext3/super.c @@ -961,7 +961,7 @@ static int parse_options (char *options, struct=20 super_block *sb, a journal file here. For now, only allow the user to specify an existing inode to be the journal file. */ =2D if (is_remount) { + if (is_remount && !test_opt(sb, UPDATE_JOURNAL)) { printk(KERN_ERR "EXT3-fs: cannot specify " "journal on remount\n"); return 0; =2Dmike --nextPart8026361.UsCfk5Q1cK Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iQIcBAABAgAGBQJJMGqgAAoJEEFjO5/oN/WByicQAOT2w5FVOxGOyxAI+7jIuXNj I3Wyebo4/do2/U9ZLniY4N1EHXu17bF4sa9Pu1TQYNR00sJ+6KH74og6TnuMdkcg KWKJW/hG9TH4Q78qOnB/PIq0yMntvS6Md2quew7HLw+kzGkWncM9aXz5GwbIJ37H Fk3YEhMuc33fOnpeaNzkyQl/bzgWbPpdIYl1AFrqeFNJBi7WdPyoYuirpA5RQ2GT 0CNldEt0EkI0cnHQenyoNCptJfc+ZaSsniYUOlosjqOvUmh5tsYdX2PEKde/naHa B2A/AjFan2P7UWSPZUIQOThyGODMvnktQpI3Nt0SaGRGZ+Yhy5RfSSuoS78R4WdE pEBE/KVAnt2FC0E2yOegLgVo4AdCE8mShvjHcIoOp417sTCDWHyIeGOdCtQzv7nV wBYT/pqG/mxzhEVu229hVpIln+R0zejF/TEdp8Wzz1XWRejlvPeX7BF36rb7jRQ2 kcJX6iNT4bECdePvGmUTwG8vKWgfd7lAHWQ0ih2OMgEbIpfCGSUXvrDver48pmnT cbo+5B0MY6RS6okQVFxM0UbSYj2a5yWzBJ3ODTwyRfGa/OAgN0pO35DL7ngd1ibt 1TF7Z1qvHVsZ08oxGwl8L9oKiJl20CX81z/tUjmx3RpkteEJFRlWIOd7AX/Fpgou mRK1ynZplt3nvmW+LlE6 =tGKI -----END PGP SIGNATURE----- --nextPart8026361.UsCfk5Q1cK-- -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html