[Unionfs] Can't make branch read only
Herton Ronaldo Krzesinski
herton at mandriva.com.br
Tue Oct 23 16:21:22 EDT 2007
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);
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
More information about the unionfs
mailing list