lkml.org 
[lkml]   [2004]   [May]   [10]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 10 May 2004 16:42:39 -0700 (PDT)
FromDavide Libenzi <>
SubjectRe: [RFC/PATCH] inotify -- a dnotify replacement
On Mon, 10 May 2004 Valdis.Kletnieks@vt.edu wrote:

> 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?".

It'd be from a file* not from an inode* (where you have a dentry and a 
vfsmount). So *one* path can be found.



> 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?

Yep, links are a problem to be implemented right. OTOH I don't think that 
an rmap-fs can be asked only to solve such problem ;)



- Davide

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:03    [from the cache]
©2003-2008