📑 Table of Contents

dnotify is a file system event monitor for the Linux kernel, one of the subfeatures of the fcntl call. It was introduced in the 2.4 kernel series.[1] It has been obsoleted by inotify, but will be retained for compatibility reasons.

Its function is essentially an extension to filesystems to notice changes to the filesystem, and report those changes to applications. Instead of application checking for changes to filesystem, application can register to be notified by kernel when changes to filesystem occur. Application can select directories to monitor and types of changes to be notified for.

One major use is in desktop search utilities like Beagle, where its functionality permits reindexing of changed files without scanning the filesystem for changes every few minutes, which would be very inefficient. By being told that a file has changed directly by the kernel, rather than actively looking, Beagle and such utilities can achieve change-to-reindexing times of only about a second, with very small performance hits (dnotify therefore enables the use of such programs in a sensible manner; daemons are generally not accepted by distributors if they drain system performance noticeably to provide userland functionality).

Limitations

edit
  • dnotify can only watch directories.
  • dnotify requires maintaining an open file descriptor to the directory that the user wants to watch. First, the directory is open, hence disallowing the device on which it resides from being unmounted. Second, watchlist is limited by open file limit of the process.[2]

See also

edit

Footnotes

edit
  1. ^ Namely, in 2.4.0-test9.
  2. ^ "Kernel Korner - Intro to inotify". Linux Journal. Retrieved 25 April 2012.


📚 Artikel Terkait di Wikipedia

Inotify

which would be very inefficient. inotify replaced an earlier facility, dnotify, which had similar goals. Inotify was merged into the Linux kernel mainline

Rust for Linux

POSIX ioctl select open read close sync … Linux-only futex epoll splice dnotify inotify readahead … In-kernel ALSA Crypto API io_uring DRM kernfs Memory

Linux kernel interfaces

specifications The system calls futex (fast userspace mutex), epoll, splice, dnotify, fanotify, and inotify have been exclusive to the Linux kernel so far.

GFS2

(cluster) lock module, but they are supported when used as a local filesystem dnotify will work on a "same node" basis, but its use with GFS/GFS2 is not recommended

File Alteration Monitor

using many CPU cycles.[citation needed] kqueue (FreeBSD) inotify (Linux) dnotify (Linux; predecessor of inotify) FSEvents (Mac OS) portmap (SunOS) TCP Wrapper/libwrap