* How SHOULD inotify and hardlinks play together?
@ 2009-04-15 21:49 Eric Paris
0 siblings, 0 replies; only message in thread
From: Eric Paris @ 2009-04-15 21:49 UTC (permalink / raw)
To: linux-kernel, linux-fsdevel; +Cc: akpm, john, rlove, viro
touch /tmp/file1 /tmp/file2
ln /tmp/file2 /tmp/hardlinktofile2
[A] Set up one inotify watch on /tmp/file2
[B] Set up another inotify watch on /tmp/hardlinktofile2
(they are both watching the same inode/data)
mv /tmp/file1 /tmp/file2
Right now, today, both [A] and [B] are going to get DELETE_SELF and
IGNORED messages and are not going to get any more notifications.
That might be fine for [A] since the pathname it ask to watch doesn't
exist any more (although I argue the inode still does), but that isn't
right for [B] since /tmp/hardlinktofile2 is still there, still it's own
inode, and still able to receive events, be modified, be read, be
deleted, whatever. But after that mv operation neither [A] nor [B] will
get any more events what-so-ever.
So the question is, should inotify continue to clear all watches on an
inode when something else is moved on top if it even if i_nlink isn't
going to 0? If not, should inotify continue to send a DELETE_SELF like
it does today? Should it instead send an ATTRIB like it does when you
add a hard link?
-Eric
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-04-15 21:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-15 21:49 How SHOULD inotify and hardlinks play together? Eric Paris
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).