From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 13 01:26:24 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84B51C66; Fri, 13 Mar 2015 01:26:24 +0000 (UTC) Received: from ipmail07.adl2.internode.on.net (ipmail07.adl2.internode.on.net [150.101.137.131]) by mx1.freebsd.org (Postfix) with ESMTP id E15F4D9C; Fri, 13 Mar 2015 01:26:23 +0000 (UTC) Received: from ppp118-210-187-121.lns20.adl6.internode.on.net (HELO midget.dons.net.au) ([118.210.187.121]) by ipmail07.adl2.internode.on.net with ESMTP; 13 Mar 2015 11:51:12 +1030 Received: from [10.0.2.26] ([10.0.2.26]) (authenticated bits=0) by midget.dons.net.au (8.15.1/8.14.9) with ESMTPSA id t2D1KrJR067027 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 Mar 2015 11:50:59 +1030 (CST) (envelope-from darius@dons.net.au) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: file system change notifications From: "O'Connor, Daniel" In-Reply-To: <20150312143814.GA9153@dft-labs.eu> Date: Fri, 13 Mar 2015 11:50:53 +1030 Content-Transfer-Encoding: quoted-printable Message-Id: <3C95016C-23D4-4827-A70D-803FD441255F@dons.net.au> References: <20150311224831.GB18699@dft-labs.eu> <201503112318.t2BNIboU092815@gw.catspoiler.org> <20150312143814.GA9153@dft-labs.eu> To: Mateusz Guzik X-Mailer: Apple Mail (2.2070.6) X-Spam-Score: -2.9 () ALL_TRUSTED,BAYES_00 X-Scanned-By: MIMEDefang 2.75 on 10.0.2.1 Cc: freebsd-hackers@FreeBSD.org, Don Lewis , int0dster@gmail.com, oliver.pinter@hardenedbsd.org, shawn.webb@hardenedbsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2015 01:26:24 -0000 > On 13 Mar 2015, at 01:08, Mateusz Guzik wrote: >> I seem to recall reading a long time ago that DragonFly pins = directories >> in the cache, or something like that. >>=20 >=20 > Just refing is quite insufficient and may not work at all. >=20 > Due to hardlinks files can have more than one name. >=20 > So preferably we would stop tossing vnodes around and create an > intermediate object which would keep name component and a pointer to = an > inode. And that's what we would keep in struct file. >=20 > Then a namecache would just be a hash of such objects. >=20 > That's quite a lot of work though and unfortunately is likely too > complicated for gsoc. I did some testing and neither Linux inotify or OS X FSEvents handle = hard links so I think it's somewhat out of scope. i.e. if you create /tmp/a and /tmp/b and have 2 separate processes = watching /tmp/a and /tmp/b then do.. 1) echo foo >/tmp/a/foo 2) ln /tmp/a/foo /tmp/b/foo 3) echo bar >/tmp/b/foo Step 1 shows a notification for /tmp/a/foo Step 2 shows a notification for /tmp/b/foo (and /tmp/a in OS X) Step 3 shows a notification for /tmp/b/foo (even though /tmp/a has = changed too) -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C