All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
To: Karel Zak <kzak-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: util-linux-ng-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: mount -o remount problems with ext3 and journal= options in /etc/fstab
Date: Fri, 28 Nov 2008 17:03:10 -0500	[thread overview]
Message-ID: <200811281703.12669.vapier@gentoo.org> (raw)
In-Reply-To: <20081127230227.GR2961-sHeGUpI7y9L/9pzu0YdTqQ@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1834 bytes --]

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=update in /etc/fstab, then attempts to remount
> > that point can be a bit painful
> >
> > for example:
> > dd if=/dev/zero of=foo count=10000
> > mke2fs -F -j foo
> > mkdir foo-mount
> > echo $PWD/foo $PWD/foo-mount ext3 defaults,loop,journal=update >>
> > /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= 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 these 
journal options in /etc/fstab ?

handling journal=update is easy, but journal=inum and journal_dev= doesnt seem 
to be as easy since the value isnt retained afaict

--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -961,7 +961,7 @@ static int parse_options (char *options, struct 
super_block *sb,
 			   a journal file here.  For now, only allow the
 			   user to specify an existing inode to be the
 			   journal file. */
-			if (is_remount) {
+			if (is_remount && !test_opt(sb, UPDATE_JOURNAL)) {
 				printk(KERN_ERR "EXT3-fs: cannot specify "
 				       "journal on remount\n");
 				return 0;
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 835 bytes --]

       reply	other threads:[~2008-11-28 22:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200811271447.44837.vapier@gentoo.org>
     [not found] ` <20081127230227.GR2961@nb.net.home>
     [not found]   ` <20081127230227.GR2961-sHeGUpI7y9L/9pzu0YdTqQ@public.gmane.org>
2008-11-28 22:03     ` Mike Frysinger [this message]
     [not found]       ` <200811281703.12669.vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2008-11-29  5:06         ` mount -o remount problems with ext3 and journal= options in /etc/fstab Theodore Tso
2008-11-29  6:16           ` Mike Frysinger

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=200811281703.12669.vapier@gentoo.org \
    --to=vapier-abrp7r+bbdudnm+yrofe0a@public.gmane.org \
    --cc=kzak-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=util-linux-ng-u79uwXL29TY76Z2rM5mHXA@public.gmane.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.