forked from luck/tmp_suning_uos_patched
docs: filesystems: convert inotify.txt to ReST
- Add a SPDX header; - Add a document title; - Adjust document title; - Fix list markups; - Some whitespace fixes and new line breaks; - Add it to filesystems/index.rst. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Acked-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/8f846843ecf1914988feb4d001e3a53d27dc1a65.1581955849.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
parent
a1ef4bcd16
commit
de389cf08d
|
@ -70,6 +70,7 @@ Documentation for filesystem implementations.
|
|||
hfs
|
||||
hfsplus
|
||||
hpfs
|
||||
inotify
|
||||
fuse
|
||||
overlayfs
|
||||
virtiofs
|
||||
|
|
|
@ -1,27 +1,36 @@
|
|||
inotify
|
||||
a powerful yet simple file change notification system
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
===============================================================
|
||||
Inotify - A Powerful yet Simple File Change Notification System
|
||||
===============================================================
|
||||
|
||||
|
||||
|
||||
Document started 15 Mar 2005 by Robert Love <rml@novell.com>
|
||||
|
||||
Document updated 4 Jan 2015 by Zhang Zhen <zhenzhang.zhang@huawei.com>
|
||||
--Deleted obsoleted interface, just refer to manpages for user interface.
|
||||
|
||||
- Deleted obsoleted interface, just refer to manpages for user interface.
|
||||
|
||||
(i) Rationale
|
||||
|
||||
Q: What is the design decision behind not tying the watch to the open fd of
|
||||
Q:
|
||||
What is the design decision behind not tying the watch to the open fd of
|
||||
the watched object?
|
||||
|
||||
A: Watches are associated with an open inotify device, not an open file.
|
||||
A:
|
||||
Watches are associated with an open inotify device, not an open file.
|
||||
This solves the primary problem with dnotify: keeping the file open pins
|
||||
the file and thus, worse, pins the mount. Dnotify is therefore infeasible
|
||||
for use on a desktop system with removable media as the media cannot be
|
||||
unmounted. Watching a file should not require that it be open.
|
||||
|
||||
Q: What is the design decision behind using an-fd-per-instance as opposed to
|
||||
Q:
|
||||
What is the design decision behind using an-fd-per-instance as opposed to
|
||||
an fd-per-watch?
|
||||
|
||||
A: An fd-per-watch quickly consumes more file descriptors than are allowed,
|
||||
A:
|
||||
An fd-per-watch quickly consumes more file descriptors than are allowed,
|
||||
more fd's than are feasible to manage, and more fd's than are optimally
|
||||
select()-able. Yes, root can bump the per-process fd limit and yes, users
|
||||
can use epoll, but requiring both is a silly and extraneous requirement.
|
||||
|
@ -65,9 +74,11 @@ A: An fd-per-watch quickly consumes more file descriptors than are allowed,
|
|||
need not be a one-fd-per-process mapping; it is one-fd-per-queue and a
|
||||
process can easily want more than one queue.
|
||||
|
||||
Q: Why the system call approach?
|
||||
Q:
|
||||
Why the system call approach?
|
||||
|
||||
A: The poor user-space interface is the second biggest problem with dnotify.
|
||||
A:
|
||||
The poor user-space interface is the second biggest problem with dnotify.
|
||||
Signals are a terrible, terrible interface for file notification. Or for
|
||||
anything, for that matter. The ideal solution, from all perspectives, is a
|
||||
file descriptor-based one that allows basic file I/O and poll/select.
|
Loading…
Reference in New Issue
Block a user