bug-hurd
[Top][All Lists]
Advanced

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

Bug#190732: [PATCH] hurd/libdiskfs/dir-renamed.c


From: Marco Gerards
Subject: Bug#190732: [PATCH] hurd/libdiskfs/dir-renamed.c
Date: 21 Jul 2003 19:45:48 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Ognyan Kulev <ogi@fmi.uni-sofia.bg> writes:

> Marco Gerards wrote:
> > Ognyan Kulev <ogi@fmi.uni-sofia.bg> 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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]