[Unionfs] Can't make branch read only
Erez Zadok
ezk at cs.sunysb.edu
Wed Oct 24 02:55:18 EDT 2007
In message <200710231821.22948.herton at mandriva.com.br>, Herton Ronaldo Krzesinski writes:
> Em Tuesday 23 October 2007 18:02:26 Herton Ronaldo Krzesinski escreveu:
> > Em Tuesday 23 October 2007 16:13:40 Olivier Blin escreveu:
> > > Actually, the "mount -t unionfs -o remount,mode=/live/foo=ro none
> > > /live/union" command succeeds, with no error message, and nothing in
> > > syslog.
> >
> > Yes. And debugging here what happens in this case is that
> > unionfs_remount_fs is called with options NULL, so the "goto out_error"
> > early in the function triggers, and do_remount_mode_option isn't even
> > executed.
>
> Confirmed, the problem is "mode" option, it falls in "VFS took care of it"
> case, doing this:
>
> --- fs/unionfs/super.c.orig 2007-10-23 18:10:15.000000000 -0200
> +++ fs/unionfs/super.c 2007-10-23 18:10:36.000000000 -0200
> @@ -626,7 +626,7 @@ static int unionfs_remount_fs(struct sup
> new_branches--;
> continue;
> }
> - if (!strcmp("mode", optname)) {
> + if (!strcmp("mode_", optname)) {
> err = do_remount_mode_option(optarg, new_branches,
> tmp_data,
> tmp_lower_paths);
Herton, what kernel are you using that refuses to pass the mode option to
unionfs? Is this a vanilla kernel or a modified one? if it's a modified
one (mandriva?), can you point me to kernel sources please so I can check
them out. I'm unable to reproduce your bug with my vanilla kernels: the
mode option is passed just fine to unionfs.
Note that many file systems use mode=XXX for an assortment of uses. if,
somehow, the VFS in your kernel takes over the mode option for some reason,
then it would break a bunch of other file systems: affs, devpts, iso9660,
and tmpfs.
> And using "mount -t unionfs -o remount,mode_=/live/foo=ro none /live/union" I
> can get now the error message:
> "unionfs: leftmost branch cannot be read-only (use "remount,ro" to create a
> read-only union)"
>
> --
> []'s
> Herton
Thanks,
Erez.
More information about the unionfs
mailing list