From: Filipe Brandenburger Subject: rename works? (was: open O_EXCL works?) Date: Tue, 22 Mar 2005 11:10:29 -0300 Message-ID: <20050322110316.BE9C.BRANDEN@terra.com.br> References: <20050322101843.BE94.BRANDEN@terra.com.br> <1111498903.24016.17.camel@lade.trondhjem.org> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.11] helo=sc8-sf-mx1.sourceforge.net) by sc8-sf-list2.sourceforge.net with esmtp (Exim 4.30) id 1DDk4Y-0004Ay-Kt for nfs@lists.sourceforge.net; Tue, 22 Mar 2005 06:09:30 -0800 Received: from loncoche.terra.com.br ([200.154.55.229]) by sc8-sf-mx1.sourceforge.net with esmtp (Exim 4.41) id 1DDk4W-0006GM-NM for nfs@lists.sourceforge.net; Tue, 22 Mar 2005 06:09:30 -0800 Received: from arica.terra.com.br (arica.terra.com.br [200.154.55.128]) by loncoche.terra.com.br (Postfix) with ESMTP id 70D10E78B34 for ; Tue, 22 Mar 2005 11:09:25 -0300 (BRT) Received: from [200.176.1.176] (branden.terra.com.br [200.176.1.176]) (authenticated user branden) by arica.terra.com.br (Postfix) with ESMTP id 5E4603C0EC for ; Tue, 22 Mar 2005 11:09:25 -0300 (BRT) To: nfs@lists.sourceforge.net In-Reply-To: <1111498903.24016.17.camel@lade.trondhjem.org> Sender: nfs-admin@lists.sourceforge.net Errors-To: nfs-admin@lists.sourceforge.net List-Unsubscribe: , List-Id: Discussion of NFS under Linux development, interoperability, and testing. List-Post: List-Help: List-Subscribe: , List-Archive: Hi, there. I found another problem just now. I have two processes calling "rename" to move all files from one directory to another, they're both calling the same actions, for example, if process 1 on client 1 calls rename("a/x","b/x"), process 2 on client 2 will call rename("a/x","b/x"). Apparently, somehow, I had one process trying to move 120 files (all that were on directory "a"). It said it managed to move 112 files, 8 of them failed. The second process entered the directory when there were 17 files, it tried to move them, and reported that moved successfully 16 of them, 1 of them failed. But that means that both together moved 112 + 16 = 128 files! That "8" files are reflected in my other accounting, that says there are 8 files more than there really are. What I mean is, is it possible that both processes called the rename for the same file, and that both of them succeeded? Is it that the success of the rename operation depends on the destination file being there instead of the success of the rename operation itself? If that's it, is there a way to circumvent this restriction? If I use, for example, hardlink and unlink, it would solve the concurrency problems? I can provide more information on the problem upon request. Thanks again, Filipe ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ NFS maillist - NFS@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfs