> I think you can. But I have never tried actually.
> Also you need to change the type of aufs_bindex_t, which is also defined
> in aufs_type.h, such like this.
> 
> typedef short aufs_bindex_t;

I believe the max amount of branches shouldn't be such small.
I suggest at least 256.

> But I am afraid you may meet another problem.
> Since mount(2) and /proc/mounts has a limited space, too long mount
> options may cause an error.

This is probably my case.

> Currently I guess that your another bug report "bug on remount,ro" is
> related to mount(2) limit.
> Aufs should return an error in this case.

Well, I believe that aufs should be made so it can handle branches 
differently, bypassing these limitations. Here is my suggestion. Would 
you please consider branch manipulation through /proc? The /proc/mounts 
would show only aufs is mounted somewhere and xino path and mount 
options, but nothing more.

The rest would be in /proc/fs/aufs/{0-999x}/branches. If you cat this 
file you'll get infos about branches. Moreover if you

     echo add:1:/mnt/path > /proc/fs/aufs/0/branches

for example, then it would add the branch to the union 0. The same for 
del, etc. Similarly, there could be /proc/fs/aufs/{0-999x}/info which 
would contain some basic infos about the union, for example the mountpoint.

It is just a suggestion, I have no idea if this could even work, or if 
there is a better way to do that. But I believe that aufs must bypass 
the limitations of remount. It's pretty common to have 10 branches, with 
250 characters-long paths each.

> Will you show me your /etc/mtab just before calling
> "mount -o remount,ro ."?

I'll show you, few hours later,
now I have to care about my little son :)

> And you didn't install /sbin/mount.aufs, did you?

No I didn't. I am using unionctl so maybe I should ... I will try it and 
let you know.


Tomas M
slax.org

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

Reply via email to