Am Freitag, 16. Dezember 2005 17:09 schrieb [EMAIL PROTECTED]: > Wilhelm Meier: > > Thanks for the patch, I'll try it asap. And if it works, it meets my > > actual requirements. > > This patch does not solve your problem. It will need more modification > in inode operations, if you keep unionfs nested. eg. unionfs both on nfs > server and client.
Oh, my understanding was that your new meaning of the ro-option was to completely suppress the whiteout-lookup in the ro-branch. For me it is sufficient to disable the is_validname()-funktion: if the unionfs with this function disabled is only used in a read-only fashion from the above layer (nfs-ro-exported or ro-branch of another unionfs-layer) all is well for me, since the lookup of the whiteouts from the above layer won't generate an EPERM anymore by the lower layer. But in this case you can't stack a union rw-branch onto another unionfs, because the whiteout would be created on the lowest layer rw-branch an then interpreted on the lowest layer, which is wrong, because the view of each layer should be consistent. > > For example, > - /unionfs = /rw + /ro > - /ro/dir exists > - /rw/dir does not exist > > When you 'touch /unionfs/dir/file', unionfs will lookup > /ro/dir/.wh.file in unionfs_create(). > > > But, what do you think about the other option to define a filesystem-id, > > which > > Unfortunately, I could not understand your idea and could not get the > ideal behaviour of unionfs. The problem arises in a stack of two unionfs-layers, when the above layer wants to lookup a whiteout in a branch, which is rejected by the lower layer with EPERM due to the check in is_validname(), because of the common prefix .wh. of the whiteouts. That was your hint. But the whiteout-name should only be valid for a specific layer of all the unionfs layers in the stack. If we attribute each unionfs-layer with a filesystem-id <fsid> and require the whiteout-prefix for this layer to be .wh.<fsid>. this layer would lookup or create whiteouts with names like .wh.<fsid>.foo The top layer unionfs would then lookup whiteouts with prefix .wh.<fsid1>. and the lower layer would use whiteouts with prefix .wh.<fsid2>., but would not block the lookup or creation with a prefix .wh.<fsid1>. So the whiteouts for each layer of all the unionfs in the stack are seperated. I hope it was clearer now. > > > Junjiro Okajima > _______________________________________________ > unionfs mailing list > [email protected] > http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs -- -- Wilhelm Meier email: [EMAIL PROTECTED] _______________________________________________ unionfs mailing list [email protected] http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs
