lkml.org 
[lkml]   [2004]   [May]   [10]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC/PATCH] inotify -- a dnotify replacement
From Valdis.Kletnieks@vt ...
DateMon, 10 May 2004 19:10:07 -0400
On Mon, 10 May 2004 15:52:58 PDT, Davide Libenzi said:

> And it should not even be that much hard to do, since you can just 
> backtrace the the point where the change happened to see if there are 
> watchers on the parent directories.

Umm.. can you?  That sounds suspiciously like "given an inode, how
do I find the pathname?".

How do you handle the case of a file that's hard-linked into 2 different
directories a "long way" apart in the heirarchy?  It's easy enough to
backtrack and find *A* path - the problem is if the watcher was on
some *other* directory:

mkdir -p /tmp/a/foo/bar/baz
mkdir -p /tmp/b/que/er/ty
touch /tmp/a/foo/bar/baz/flag
ln /tmp/a/foo/bar/baz/flag /tmp/b/qu/er/ty/flag

If you modify 'flag' again, how do you ensure that you find a watcher on
/tmp/a/foo or /tmp/b/qu, given that either or both might be there?

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:03    [from the cache]
©2003-2008