Re: [PATCH] nfsd: lockdep annotation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday August 24, [email protected] wrote:
> On Thu, 2006-08-24 at 16:12 +1000, Neil Brown wrote:
> > 
> > I had flags the fh_lock in nfsd_setattr a I_MUTEX_CHILD which you
> > didn't however I see that isn't needed (Why do we have PARENT and
> > CHILD and NORMAL.... you would think that any two would do ??)
> 
> for cross directory renames 3 are needed ;(

I see....
If one of the source/dest directories is an ancestor to the other
it gets _PARENT while the descendent gets _CHILD,
otherwise the destination gets _PARENT and the source gets _CHILD.
I guess the terms 'PARENT' and 'CHILD' refer more to the relationship
of the locks than the relationship of the directories.

(If the destination name exists, it gets locked with _NORMAL)

I still find the terminology a bit confusing.
 _GRANDPARENT -> _PARENT -> _NORMAL

would make more sense to me, but maybe it isn't that important.

Thanks for the explanation.

NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux