From mboxrd@z Thu Jan 1 00:00:00 1970 From: Evgeniy Polyakov Subject: Re: fanotify - overall design before I start sending patches Date: Mon, 27 Jul 2009 21:52:25 +0400 Message-ID: <20090727175225.GA27999@ioremap.net> References: <1248466429.3567.82.camel@localhost> <1248469278.3567.88.camel@localhost> <20090724214401.GJ27755@shareable.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Eric Paris , david@lang.hm, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, malware-list@dmesg.printk.net, Valdis.Kletnieks@vt.edu, greg@kroah.com, jcm@redhat.com, douglas.leeder@sophos.com, tytso@mit.edu, arjan@infradead.org, jengelh@medozas.de, aviro@redhat.com, mrkafk@gmail.com, alexl@redhat.com, jack@suse.cz, tvrtko.ursulin@sophos.com, a.p.zijlstra@chello.nl, hch@infradead.org, alan@lxorguk.ukuu.org.uk, mmorley@hcl.in To: Jamie Lokier Return-path: Received: from intermatrixgroup.ru ([195.178.208.66]:52299 "EHLO tservice.net.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750779AbZG0Rwe (ORCPT ); Mon, 27 Jul 2009 13:52:34 -0400 Content-Disposition: inline In-Reply-To: <20090724214401.GJ27755@shareable.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hi. On Fri, Jul 24, 2009 at 10:44:01PM +0100, Jamie Lokier (jamie@shareable.org) wrote: > > No, I will NOT EVER pass a pathname. Period. End of story. I stated > > the if userspace wants to deal with pathnames (and they understand the > > system setup well enough to know if pathnames even make sense to them) > > they can use readlink(2) on /proc/self/fd > > That makes sense. > > In most cases where events trigger userspace cache or index updates, > userspace already has enough information to calculate the path (and > any derived data) from the inode number (in the case of non-hard-link > files) or from the inode number of the parent directory and the name > (not full path). Except that rlimits may forbid to open new file descriptor while queue length is enough to put another event with the full or partial path name. I will read initial mail next, but if it is not described there, how rlimit problem is handled? -- Evgeniy Polyakov