Re: [PATCH 1/7] shared subtree

2005-07-31 Thread Miklos Szeredi
Ok. I have started implementing your idea. But the implementation is no simple. Its becomes a complex mess. Atleast in the case of pnode datastructure implementation, the propogation was all abstracted and concentrated in the pnode datastructure. Here is a sample implementation of

Re: [PATCH 1/7] shared subtree

2005-07-29 Thread Ram Pai
On Thu, 2005-07-28 at 02:57, Miklos Szeredi wrote: This is an example, where having struct pnode just complicates things. If there was no struct pnode, this function would be just one line: setting the shared flag. So your comment is mostly about getting rid of pnode and distributing

Re: [PATCH 1/7] shared subtree

2005-07-29 Thread Miklos Szeredi
static struct vfsmount *propagation_next(struct vfsmount *p, struct vfsmount *base) { /* first iterate over the slaves */ if (!list_empty(p-mnt_slave_list)) return first_slave(p); I think this code should be if

Re: [PATCH 1/7] shared subtree

2005-07-27 Thread Miklos Szeredi
+static int do_make_shared(struct vfsmount *mnt) +{ + int err=0; + struct vfspnode *old_pnode = NULL; + /* + * if the mount is already a slave mount, + * allocate a new pnode and make it + * a slave pnode of the original pnode. + */ + if

Re: [PATCH 1/7] shared subtree

2005-07-27 Thread Ram Pai
On Wed, 2005-07-27 at 12:54, Miklos Szeredi wrote: +static int do_make_shared(struct vfsmount *mnt) +{ + int err=0; + struct vfspnode *old_pnode = NULL; + /* +* if the mount is already a slave mount, +* allocate a new pnode and make it +* a slave pnode of the