Re: [PATCH 1/7] shared subtree

2005-07-31 Thread Miklos Szeredi
> > Do you still believe that your idea is simpler? > > Well, you have bundled do_make_slave(), pnode_member_to_slave() and > empty_pnode() all into one function. I think your original split is > quite nice. If you'd split this function up like that, I think you'd > agree, that the end result i

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 do

Re: [PATCH 1/7] shared subtree

2005-07-30 Thread Ram Pai
On Fri, 2005-07-29 at 22:39, Miklos Szeredi wrote: > > > static struct vfsmount *propagation_next(struct vfsmount *p, > > >struct vfsmount *base) > > > { > > > /* first iterate over the slaves */ > > > if (!list_empty(&p->mnt_slave_list)) > > > retu

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 >

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 distr

Re: [PATCH 1/7] shared subtree

2005-07-28 Thread Miklos Szeredi
> > 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 > the pnode functionality in the vfsmount structure

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 pn

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 (IS_M