Re: mount -o remount problems with ext3 and journal= options in /etc/fstab

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux