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.


[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.

Regards
--
Ognyan Kulev <[EMAIL PROTECTED],fsa-bg.org}>
7D9F 66E6 68B7 A62B 0FCF  EB04 80BF 3A8C A252 9782




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

Reply via email to