Ognyan Kulev <[EMAIL PROTECTED]> writes:

> Marco Gerards wrote:
> > Ognyan Kulev <[EMAIL PROTECTED]> writes:
> >>$ mkdir d
> >>$ cd d
> >>$ mkdir x
> >>$ mv x y
> >>$ mv y x
> > I've tested this both with and without your patch. Nothing (weird)
> > happened.
> 
> (I suppose you are talking about your patch, not about mine.)  I tried
> your patch and, suprisingly for me, the assertion failure in
> ext2fs/dir.c:716 didn't trigger.  Anyway, by protocol[1]
> (diskfs.h:313), two diskfs_lookup in the same directory must have
> diskfs_drop_dirstat or diskfs_dir* between them.

I'm quite sure I've used your patch.
 
> [1] http://mail.gnu.org/archive/html/bug-hurd/2003-07/msg00092.html
> 
> BTW There is a possible deadlock in this function when source and
> destination parent directories are different.  Let's name them A and
> B. Moving A/x to B/x first locks A.  If in this moment another thread
> moves B/y to A/y, then it locks B and tries to lock A and then sleeps
> waiting A to be unlocked.  The first thread continues by trying to
> lock B, but it's already locked.  I'll try to address this and other
> problems (like reverting back st_nlink when error occurs) in a "final"
> patch soon.

I'm looking forward to your patch! :)

Thanks,
Marco




_______________________________________________
Bug-hurd mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-hurd

Reply via email to