Hello,

It seems to me that modifying branch permissions (=rw or =ro) can
reorder the branches. I think this should not happen. Am I right?

Example commands attached (file log.txt)

At line 32, you can see current branch order:
/tmp/002=rw
/tmp/empty=rw
/tmp/001=ro

At line 39, remount(mod) is performed, which however reorders branches:
mount -o remount,mod:/tmp/empty=ro /tmp/union
/tmp/empty=ro
/tmp/002=rw
/tmp/001=ro


Also attached is sample script to reproduce the problem (reproduce.sh)

Am I doing anything wrong?
Thank you very much

Tomas M
+ UNION=/tmp/union
+ mkdir -p /tmp/empty
+ mount -t tmpfs tmpfs /tmp/empty
+ mkdir -p /tmp/union
+ modprobe aufs
+ mount -t aufs -o xino=/tmp/empty/xino,br:/tmp/empty=rw aufs /tmp/union

+ mkdir -p /tmp/001
+ mount -o remount,ins:0:/tmp/001=rw /tmp/union

+ cat /sys/fs/aufs/si_974147a266762f5e/br0 /sys/fs/aufs/si_974147a266762f5e/br1 
/sys/fs/aufs/si_974147a266762f5e/xi_path
/tmp/001=rw
/tmp/empty=rw
/tmp/empty/xino
---------------------

+ mount -o remount,mod:/tmp/empty=ro /tmp/union
+ cat /sys/fs/aufs/si_974147a266762f5e/br0 /sys/fs/aufs/si_974147a266762f5e/br1 
/sys/fs/aufs/si_974147a266762f5e/xi_path
/tmp/001=rw
/tmp/empty=ro
/tmp/empty/xino
---------------------
---------------------

+ touch /tmp/union/001
+ mount -o remount,del:/tmp/empty /tmp/union
+ mount -o remount,ins:0:/tmp/empty=rw /tmp/union
+ mount -o remount,mod:/tmp/001=ro /tmp/union
+ mkdir -p /tmp/002
+ mount -o remount,ins:0:/tmp/002=rw /tmp/union

+ cat /sys/fs/aufs/si_974147a266762f5e/br0 /sys/fs/aufs/si_974147a266762f5e/br1 
/sys/fs/aufs/si_974147a266762f5e/br2 /sys/fs/aufs/si_974147a266762f5e/xi_path
/tmp/002=rw
/tmp/empty=rw
/tmp/001=ro
/tmp/empty/xino
---------------------

+ mount -o remount,mod:/tmp/empty=ro /tmp/union
mount: warning: /tmp/union seems to be mounted read-only.
+ cat /sys/fs/aufs/si_974147a266762f5e/br0 /sys/fs/aufs/si_974147a266762f5e/br1 
/sys/fs/aufs/si_974147a266762f5e/br2 /sys/fs/aufs/si_974147a266762f5e/xi_path
/tmp/empty=ro
/tmp/002=rw
/tmp/001=ro
/tmp/empty/xino

+ touch /tmp/union/002
touch: cannot touch `/tmp/union/002': Read-only file system

Attachment: reproduce.sh
Description: Bourne shell script

------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1

Reply via email to