Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756209AbYLVXUw (ORCPT ); Mon, 22 Dec 2008 18:20:52 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754804AbYLVXUn (ORCPT ); Mon, 22 Dec 2008 18:20:43 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:54088 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754739AbYLVXUm (ORCPT ); Mon, 22 Dec 2008 18:20:42 -0500 Date: Mon, 22 Dec 2008 23:20:40 +0000 From: Al Viro To: "C. Scott Ananian" Cc: Eric Paris , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH -v4 00/14] fsnotify, dnotify, and inotify Message-ID: <20081222232040.GP28946@ZenIV.linux.org.uk> References: <20081212213915.27112.57526.stgit@paris.rdu.redhat.com> <1229916126.29604.47.camel@localhost.localdomain> <20081222210410.GL28946@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1639 Lines: 34 On Mon, Dec 22, 2008 at 06:08:08PM -0500, C. Scott Ananian wrote: > That's not correct, as /proc/self/fd/ and the getcwd syscall make > clear. struct inode has a i_dentry member, and via its d_parent links > you can reconstruct the path, as __d_path in fs/dcache.c does. Think for a minute a) you might have any number of links to given inode, *including* *zero* b) any subset of these links may be in dcache (including empty) c) any number of bindings might exist to file in question *or* to its ancestors (again, including zero). d) none of the relative paths from fs root to file has to be visible as a path leading to file in question from anywhere (again, think of bindings) e) all of that can change before information reaches userland. > inotify *almost* lets us do that last thing (though the code > duplication pains me) but is too racy for reliable use. Give me a > kernel interface without races and I'll call it a good start. If you > can save me the trouble of duplicating all of the filesystem's > directory information in my userspace database in order to handle > directory moves, I'll actually grin a little. _WHAT_ interface without races? Anything along the lines of "somebody had done something to " is racy by definition. Simply because the next operation might have changed the mapping from pathnames to files. What are you actually trying to do? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/