public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rüdiger Klaehn" <rudi@gamemakers.de>
To: Mike Waychison <Michael.Waychison@Sun.COM>
Cc: linux-kernel@vger.kernel.org
Subject: Re: File change notification (enhanced dnotify)
Date: Mon, 22 Mar 2004 17:55:31 +0100	[thread overview]
Message-ID: <405F1A83.5030807@gamemakers.de> (raw)
In-Reply-To: <405F174A.3090706@sun.com>

Mike Waychison wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Rüdiger Klaehn wrote:
> 
> |
> | My original approach assumed that inode numbers were unique, and it
> | would have worked with hard links. But I think it is much more important
> | to have a mechanism that works for all file systems than to solve the
> | problem of hard links.
> |
> 
> Inode numbers are guaranteed to be unique on a given filesystem other
> than for hard links..  Where is this assumption broken otherwise?
> 
To quote jan harkes, who repiled to my original proposal:

"Inode number are not necessarily unique per filesystem. Any filesystem
that uses iget4 can have several objects that have the same inode
number. For instance, Coda uses 128-bit file-identifiers and the i_ino
number is a simple hash that is 'typically' unique. There are also
filesystems that invent inode numbers whenever inodes are brought into
the cache, but which have no persistency when the inode_cache is pruned.
So the next time you see the same object, it could have a different
(unique) inode number."

But I think the current approach is much better anyway since it does 
work for a single directory and its subdirectories instead of globally 
like my initial attempt. If you want to catch hard link issues you will 
have to watch the root of the file system, but that is still not that 
expensive. And on "sane" file systems that use unique inode numbers in 
userspace to solve the hard link problem.

best regards,

Rüdiger

  reply	other threads:[~2004-03-22 16:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <405ECB77.9080803@gamemakers.de>
2004-03-22 15:00 ` File change notification (enhanced dnotify) Horst von Brand
2004-03-22 16:02   ` Rüdiger Klaehn
2004-03-22 16:41     ` Mike Waychison
2004-03-22 16:55       ` Rüdiger Klaehn [this message]
2004-03-22 17:19       ` Horst von Brand
2004-03-22  1:36 Rüdiger Klaehn
2004-03-22  2:16 ` Horst von Brand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=405F1A83.5030807@gamemakers.de \
    --to=rudi@gamemakers.de \
    --cc=Michael.Waychison@Sun.COM \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rudi@lambda-computing.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox