No, but you can have one for the directory it's in. Or for the filesystem
it's in: OS/2 does it that way, with a DosFSCtl() (IIRC) that asks the
filesystem to send a message on the supplied message queue when any file on
the specified drive (filesystem) changes.
The equivalent on Linux would be to open the mountpoint directory and pass it
to poll() with some POLL_XXX type. Although the file's directory would be a
better choice because then the name's readily available, and it's even sane
to just return a "something changed" indication and let userspace figure out
what; it's asking a bit much for the filesystem-level one to simply say
"something changed" and then have userspace rescan the whole filesystem to
find out what changed, so the message sent by the OS/2 FS layer includes the
path of the changed file.
Although, if poll() can return information about what changed (indirectly, by
making it available for read() on the directory file descriptor), it might be
good enough to return the inode number of the changed file and let userspace
map that to those items it cares about; in most if not all cases, it will
only care about files for which it's done a stat() (or an open(), in which
case it could do an fstat()).
-- brandon s. allbery [os/2][linux][solaris][japh] allbery@kf8nh.apk.net system administrator [WAY too many hats] allbery@ece.cmu.edu carnegie mellon / electrical and computer engineering KF8NH We are Linux. Resistance is an indication that you missed the point.- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/