]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man7/inotify.7
inotify.7: Add text on dealing with rename() events
[thirdparty/man-pages.git] / man7 / inotify.7
CommitLineData
4d2b74dd 1'\" t
415f63be 2.\" Copyright (C) 2006, 2014 Michael Kerrisk <mtk.manpages@gmail.com>
4d2b74dd 3.\"
93015253 4.\" %%%LICENSE_START(VERBATIM)
4d2b74dd
MK
5.\" Permission is granted to make and distribute verbatim copies of this
6.\" manual provided the copyright notice and this permission notice are
7.\" preserved on all copies.
8.\"
9.\" Permission is granted to copy and distribute modified versions of this
10.\" manual under the conditions for verbatim copying, provided that the
11.\" entire resulting derived work is distributed under the terms of a
12.\" permission notice identical to this one.
c13182ef 13.\"
4d2b74dd
MK
14.\" Since the Linux kernel and libraries are constantly changing, this
15.\" manual page may be incorrect or out-of-date. The author(s) assume no
16.\" responsibility for errors or omissions, or for damages resulting from
10d76543
MK
17.\" the use of the information contained herein. The author(s) may not
18.\" have taken the same level of care in the production of this manual,
19.\" which is licensed free of charge, as they might when working
20.\" professionally.
c13182ef 21.\"
4d2b74dd
MK
22.\" Formatted or processed versions of this manual, if unaccompanied by
23.\" the source, must acknowledge the copyright and authors of this work.
4b72fb64 24.\" %%%LICENSE_END
4d2b74dd 25.\"
356911f6 26.TH INOTIFY 7 2014-04-01 "Linux" "Linux Programmer's Manual"
4d2b74dd 27.SH NAME
9ee4a2b6 28inotify \- monitoring filesystem events
4d2b74dd
MK
29.SH DESCRIPTION
30The
c13182ef 31.I inotify
9ee4a2b6 32API provides a mechanism for monitoring filesystem events.
4d2b74dd
MK
33Inotify can be used to monitor individual files,
34or to monitor directories.
35When a directory is monitored, inotify will return events
36for the directory itself, and for files inside the directory.
37
c13182ef 38The following system calls are used with this API:
356911f6 39.IP * 3
4d2b74dd 40.BR inotify_init (2)
c13182ef 41creates an inotify instance and returns a file descriptor
a2cc46ca 42referring to the inotify instance.
43bb5faf
MK
43The more recent
44.BR inotify_init1 (2)
45is like
46.BR inotify_init (2),
356911f6
MK
47but has a
48.IR flags
49argument that provides access to some extra functionality.
50.IP *
4d2b74dd 51.BR inotify_add_watch (2)
a2cc46ca 52manipulates the "watch list" associated with an inotify instance.
3a065ac0 53Each item ("watch") in the watch list specifies the pathname of
c13182ef 54a file or directory,
4d2b74dd
MK
55along with some set of events that the kernel should monitor for the
56file referred to by that pathname.
63f6a20a 57.BR inotify_add_watch (2)
4d2b74dd
MK
58either creates a new watch item, or modifies an existing watch.
59Each watch has a unique "watch descriptor", an integer
60returned by
63f6a20a 61.BR inotify_add_watch (2)
4d2b74dd 62when the watch is created.
356911f6
MK
63.IP *
64When events occur for monitored files and directories,
65those events are made available to the application as structured data that
66can be read from the inotify file descriptor using
67.BR read (2)
68(see below).
69.IP *
4d2b74dd
MK
70.BR inotify_rm_watch (2)
71removes an item from an inotify watch list.
356911f6 72.IP *
c13182ef 73When all file descriptors referring to an inotify
356911f6
MK
74instance have been closed (using
75.BR close (2)),
c13182ef 76the underlying object and its resources are
3b777aff 77freed for reuse by the kernel;
4d2b74dd 78all associated watches are automatically freed.
ff6e2397 79.SS Reading events from an inotify file descriptor
4d2b74dd
MK
80To determine what events have occurred, an application
81.BR read (2)s
82from the inotify file descriptor.
c13182ef 83If no events have so far occurred, then,
11da88fb 84assuming a blocking file descriptor,
63f6a20a 85.BR read (2)
01538d0d
MK
86will block until at least one event occurs
87(unless interrupted by a signal,
88in which case the call fails with the error
89.BR EINTR ;
90see
91.BR signal (7)).
4d2b74dd
MK
92
93Each successful
63f6a20a 94.BR read (2)
4d2b74dd 95returns a buffer containing one or more of the following structures:
a08ea57c 96.in +4n
4d2b74dd
MK
97.nf
98
99struct inotify_event {
100 int wd; /* Watch descriptor */
24bbe02c
MK
101.\" FIXME . The type of the 'wd' field should probably be "int32_t".
102.\" I submitted a patch to fix this. See the LKML thread
103.\" "[patch] Fix type errors in inotify interfaces", 18 Nov 2008
6e6231c1 104.\" Glibc bug filed: http://sources.redhat.com/bugzilla/show_bug.cgi?id=7040
4d2b74dd 105 uint32_t mask; /* Mask of events */
c13182ef 106 uint32_t cookie; /* Unique cookie associating related
4d2b74dd 107 events (for rename(2)) */
84c517a4 108 uint32_t len; /* Size of \fIname\fP field */
4d2b74dd
MK
109 char name[]; /* Optional null-terminated name */
110};
111.fi
a08ea57c 112.in
4d2b74dd
MK
113
114.I wd
115identifies the watch for which this event occurs.
c13182ef 116It is one of the watch descriptors returned by a previous call to
63f6a20a 117.BR inotify_add_watch (2).
4d2b74dd
MK
118
119.I mask
120contains bits that describe the event that occurred (see below).
121
122.I cookie
123is a unique integer that connects related events.
33a0ccb2 124Currently this is used only for rename events, and
4d2b74dd 125allows the resulting pair of
bc636d8a 126.B IN_MOVED_FROM
c13182ef 127and
bc636d8a 128.B IN_MOVED_TO
4d2b74dd 129events to be connected by the application.
591b7a5f
MK
130For all other event types,
131.I cookie
132is set to 0.
4d2b74dd 133
c13182ef 134The
4d2b74dd 135.I name
33a0ccb2 136field is present only when an event is returned
c13182ef 137for a file inside a watched directory;
4d2b74dd 138it identifies the file pathname relative to the watched directory.
c13182ef 139This pathname is null-terminated,
1aff5804 140and may include further null bytes (\(aq\\0\(aq) to align subsequent reads to a
4d2b74dd
MK
141suitable address boundary.
142
143The
144.I len
c13182ef 145field counts all of the bytes in
4d2b74dd 146.IR name ,
c13182ef 147including the null bytes;
4d2b74dd
MK
148the length of each
149.I inotify_event
150structure is thus
655684a9 151.IR "sizeof(struct inotify_event)+len" .
c7e3ee6f 152
988db661 153The behavior when the buffer given to
c7e3ee6f 154.BR read (2)
988db661 155is too small to return information about the next event depends
c7e3ee6f
MK
156on the kernel version: in kernels before 2.6.21,
157.BR read (2)
158returns 0; since kernel 2.6.21,
159.BR read (2)
160fails with the error
161.BR EINVAL .
4ba272b3
MK
162Specifying a buffer of size
163
164 sizeof(struct inotify_event) + NAME_MAX + 1
165
166will be sufficient to read at least one event.
4d2b74dd 167.SS inotify events
c13182ef 168The
4d2b74dd
MK
169.BR inotify_add_watch (2)
170.I mask
c13182ef 171argument and the
4d2b74dd
MK
172.I mask
173field of the
174.I inotify_event
175structure returned when
176.BR read (2)ing
177an inotify file descriptor are both bit masks identifying
178inotify events.
179The following bits can be specified in
180.I mask
181when calling
63f6a20a 182.BR inotify_add_watch (2)
c13182ef 183and may be returned in the
4d2b74dd
MK
184.I mask
185field returned by
63f6a20a 186.BR read (2):
64aa9bcb 187.RS 4
c577b95c 188.TP
f23fc716 189.BR IN_ACCESS " (*)"
70f70c9d
MK
190File was accessed (e.g.,
191.BR read (2),
f23fc716 192.BR execve (2)).
3f174f7d 193.TP
f23fc716 194.BR IN_ATTRIB " (*)"
b0e1ac43
MK
195Metadata changed\(emfor example, permissions (e.g.,
196.BR chmod (2)),
197timestamps (e.g.,
198.BR utimensat (2)),
199extended attributes
200.RB ( setxattr (2)),
201link count (since Linux 2.6.25; e.g.,
202for the target of
203.BR link (2)
204and for
205.BR unlink (2)),
206and user/group ID (e.g.,
207.BR chown (2)).
3f174f7d 208.TP
f23fc716
MK
209.BR IN_CLOSE_WRITE " (*)"
210File opened for writing was closed.
3f174f7d 211.TP
f23fc716
MK
212.BR IN_CLOSE_NOWRITE " (*)"
213File not opened for writing was closed.
3f174f7d 214.TP
f23fc716 215.BR IN_CREATE " (*)"
7a64793b
MK
216File/directory created in watched directory (e.g.,
217.BR open (2)
218.BR O_CREAT ,
219.BR mkdir (2),
220.BR link (2),
1a737afd 221.BR symlink (2),
7a64793b
MK
222.BR bind (2)
223on a UNIX domain socket).
3f174f7d 224.TP
f23fc716
MK
225.BR IN_DELETE " (*)"
226File/directory deleted from watched directory.
3f174f7d
MK
227.TP
228.B IN_DELETE_SELF
229Watched file/directory was itself deleted.
4a1e4cca
MK
230(This event also occurs if an object is moved to another filesystem,
231since
232.BR mv (1)
233in effect copies the file to the other filesystem and
49b07b8f 234then deletes it from the original filesystem.)
39f43968
MK
235In addition, an
236.B IN_IGNORED
237event will subsequently be generated for the watch descriptor.
3f174f7d 238.TP
f23fc716 239.BR IN_MODIFY " (*)"
f54a1255
MK
240File was modified (e.g.,
241.BR write (2),
242.BR truncate (2)).
3f174f7d
MK
243.TP
244.B IN_MOVE_SELF
245Watched file/directory was itself moved.
246.TP
f23fc716 247.BR IN_MOVED_FROM " (*)"
107375cf 248Generated for the directory containing the old filename
f23fc716 249when a file is renamed.
3f174f7d 250.TP
f23fc716 251.BR IN_MOVED_TO " (*)"
107375cf 252Generated for the directory containing the new filename
f23fc716 253when a file is renamed.
3f174f7d 254.TP
f23fc716
MK
255.BR IN_OPEN " (*)"
256File was opened.
64aa9bcb 257.RE
4d2b74dd 258.PP
c13182ef
MK
259When monitoring a directory,
260the events marked with an asterisk (*) above can occur for
4d2b74dd
MK
261files in the directory, in which case the
262.I name
263field in the returned
264.I inotify_event
265structure identifies the name of the file within the directory.
266.PP
267The
268.B IN_ALL_EVENTS
269macro is defined as a bit mask of all of the above events.
270This macro can be used as the
271.I mask
272argument when calling
63f6a20a 273.BR inotify_add_watch (2).
4d2b74dd 274
dede00fe 275Two additional convenience macros are defined:
64aa9bcb 276.RS 4
dede00fe
MK
277.TP
278.BR IN_MOVE
279Equates to
280.BR "IN_MOVED_FROM | IN_MOVED_TO" .
281.TP
282.BR IN_CLOSE
283Equates to
284.BR "IN_CLOSE_WRITE | IN_CLOSE_NOWRITE" .
64aa9bcb 285.RE
4d2b74dd 286.PP
c13182ef 287The following further bits can be specified in
4d2b74dd
MK
288.I mask
289when calling
63f6a20a 290.BR inotify_add_watch (2):
64aa9bcb 291.RS 4
c577b95c 292.TP
31daf529 293.BR IN_DONT_FOLLOW " (since Linux 2.6.15)"
aeb9b6a6
MK
294Don't dereference
295.I pathname
296if it is a symbolic link.
dda869a4 297.TP
0ff2cc88 298.BR IN_EXCL_UNLINK " (since Linux 2.6.36)"
b3ad7609
MK
299.\" commit 8c1934c8d70b22ca8333b216aec6c7d09fdbd6a6
300By default, when watching events on the children of a directory,
301events are generated for children even after they have been unlinked
302from the directory.
303This can result in large numbers of uninteresting events for
304some applications (e.g., if watching
305.IR /tmp ,
306in which many applications create temporary files whose
307names are immediately unlinked).
308Specifying
309.B IN_EXCL_UNLINK
310changes the default behavior,
311so that events are not generated for children after
312they have been unlinked from the watched directory.
313.TP
dda869a4
MK
314.B IN_MASK_ADD
315Add (OR) events to watch mask for this pathname if
316it already exists (instead of replacing mask).
317.TP
318.B IN_ONESHOT
aeb9b6a6
MK
319Monitor
320.I pathname
321for one event, then remove from
dda869a4
MK
322watch list.
323.TP
31daf529 324.BR IN_ONLYDIR " (since Linux 2.6.15)"
aeb9b6a6
MK
325Only watch
326.I pathname
327if it is a directory.
64aa9bcb 328.RE
4d2b74dd
MK
329.PP
330The following bits may be set in the
331.I mask
332field returned by
63f6a20a 333.BR read (2):
64aa9bcb 334.RS 4
c577b95c 335.TP
dda869a4 336.B IN_IGNORED
aeb9b6a6
MK
337Watch was removed explicitly
338.RB ( inotify_rm_watch (2))
9ee4a2b6 339or automatically (file was deleted, or filesystem was unmounted).
7b5151b7 340See also BUGS.
dda869a4
MK
341.TP
342.B IN_ISDIR
343Subject of this event is a directory.
344.TP
345.B IN_Q_OVERFLOW
aeb9b6a6
MK
346Event queue overflowed
347.RI ( wd
348is \-1 for this event).
dda869a4
MK
349.TP
350.B IN_UNMOUNT
9ee4a2b6 351Filesystem containing watched object was unmounted.
b01c936e
MK
352In addition, an
353.B IN_IGNORED
354event will subsequently be generated for the watch descriptor.
64aa9bcb 355.RE
415f63be
MK
356.SS Examples
357Suppose an application is watching the directory
358.I dir
359and the file
360.IR dir/myfile
361for all events.
362The examples below show some events that will be generated
363for these two objects.
364.RS 4
365.TP
366fd = open("dir/myfile", O_RDWR);
367Generates
368.B IN_OPEN
369events for both
370.I dir
371and
372.IR dir/myfile .
373.TP
374read(fd, buf, count);
375Generates
376.B IN_ACCESS
377events for both
378.I dir
379and
380.IR dir/myfile .
381.TP
382write(fd, buf, count);
383Generates
384.B IN_MODIFY
385events for both
386.I dir
387and
388.IR dir/myfile .
389.TP
390fchmod(fd, mode);
391Generates
392.B IN_ATTRIB
393events for both
394.I dir
395and
396.IR dir/myfile .
397.TP
398close(fd);
399Generates
400.B IN_CLOSE_WRITE
401events for both
402.I dir
403and
404.IR dir/myfile .
405.RE
406.PP
407Suppose an application is watching the directories
408.I dir1
409and
410.IR dir ,
411and the file
412.IR dir1/myfile .
413The following examples show some events that may be generated.
414.RS 4
415.TP
416link("dir/myfile", "dir2/new");
417Generates an
418.B IN_ATTRIB
419event for
420.IR myfile
421and an
422.B IN_CREATE
423event for
424.IR dir2 .
425.TP
426rename("dir1/myfile", "dir2/myfile");
427Generates an
428.B IN_MOVED_FROM
429event for
430.IR dir1 ,
431an
432.B IN_MOVED_TO
433event for
434.IR dir2 ,
435and an
436.B IN_MOVE_SELF
437event for
438.IR myfile .
439The
440.B IN_MOVED_FROM
441and
442.B IN_MOVED_TO
443events will have the same
444.I cookie
445value.
446.RE
447.PP
448Suppose that
449.IR dir1/xx
450and
451.IR dir2/yy
452are (the only) links to the same file, and an application is watching
453.IR dir1 ,
454.IR dir2 ,
455.IR dir1/xx ,
456and
457.IR dir2/yy .
458Executing the following calls in the order given below will generate
459the following events:
460.RS 4
461.TP
462unlink("dir2/yy");
463Generates
464.BR IN_ATTRIB
465event for
466.IR xx
467(because its link count changes)
468and an
469.B IN_DELETE
470event for
471.IR dir2 .
472.TP
473unlink("dir1/xx");
474Generates
475.BR IN_ATTRIB ,
476.BR IN_DELETE_SELF ,
477and
478.BR IN_IGNORED
479events for
480.IR xx ,
481and an
482.BR IN_DELETE
483for
484.IR dir1 .
485.RE
486.PP
487Suppose an application is watching the directory
488.IR dir
489and (the empty) directory
490.IR dir/subdir .
491The following examples show some events that may be generated.
492.RS 4
493.TP
494mkdir("dir/new", mode);
495Generates an
496.B "IN_CREATE | IN_ISDIR"
497event for
498.IR dir .
499.TP
500rmdir("dir/sub");
501Generates
502.B IN_DELETE_SELF
503and
504.B IN_IGNORED
505events for
506.IR subdir ,
507and an
508.B "IN_DELETE | IN_ISDIR"
509event for
510.IR dir .
511.RE
4d2b74dd 512.SS /proc interfaces
c13182ef 513The following interfaces can be used to limit the amount of
4d2b74dd
MK
514kernel memory consumed by inotify:
515.TP
0daa9e92 516.I /proc/sys/fs/inotify/max_queued_events
4d2b74dd
MK
517The value in this file is used when an application calls
518.BR inotify_init (2)
c13182ef 519to set an upper limit on the number of events that can be
4d2b74dd
MK
520queued to the corresponding inotify instance.
521Events in excess of this limit are dropped, but an
522.B IN_Q_OVERFLOW
523event is always generated.
524.TP
0daa9e92 525.I /proc/sys/fs/inotify/max_user_instances
c13182ef 526This specifies an upper limit on the number of inotify instances
4d2b74dd
MK
527that can be created per real user ID.
528.TP
0daa9e92 529.I /proc/sys/fs/inotify/max_user_watches
31546b46
VN
530This specifies an upper limit on the number of watches
531that can be created per real user ID.
47297adb 532.SH VERSIONS
2b2581ee
MK
533Inotify was merged into the 2.6.13 Linux kernel.
534The required library interfaces were added to glibc in version 2.4.
535.RB ( IN_DONT_FOLLOW ,
536.BR IN_MASK_ADD ,
537and
538.B IN_ONLYDIR
64aa9bcb 539were added in glibc version 2.5.)
47297adb 540.SH CONFORMING TO
8382f16d 541The inotify API is Linux-specific.
47297adb 542.SH NOTES
4d2b74dd
MK
543Inotify file descriptors can be monitored using
544.BR select (2),
545.BR poll (2),
c13182ef 546and
2315114c 547.BR epoll (7).
0000daa5
MK
548When an event is available, the file descriptor indicates as readable.
549
550Since Linux 2.6.25,
551signal-driven I/O notification is available for inotify file descriptors;
552see the discussion of
553.B F_SETFL
554(for setting the
555.B O_ASYNC
556flag),
557.BR F_SETOWN ,
558and
559.B F_SETSIG
560in
561.BR fcntl (2).
562The
563.I siginfo_t
564structure (described in
565.BR sigaction (2))
566that is passed to the signal handler has the following fields set:
567.IR si_fd
568is set to the inotify file descriptor number;
569.IR si_signo
570is set to the signal number;
571.IR si_code
572is set to
573.BR POLL_IN ;
574and
575.B POLLIN
576is set in
577.IR si_band .
4d2b74dd 578
c13182ef
MK
579If successive output inotify events produced on the
580inotify file descriptor are identical (same
581.IR wd ,
582.IR mask ,
4d2b74dd
MK
583.IR cookie ,
584and
3f3698d8 585.IR name ),
6f0ab035
MK
586then they are coalesced into a single event if the
587older event has not yet been read (but see BUGS).
8856aab8
MK
588This reduces the amount of kernel memory required for the event queue,
589but also means that an application can't use inotify to reliably count
590file events.
4d2b74dd 591
c13182ef
MK
592The events returned by reading from an inotify file descriptor
593form an ordered queue.
594Thus, for example, it is guaranteed that when renaming from
595one directory to another, events will be produced in the
4d2b74dd
MK
596correct order on the inotify file descriptor.
597
598The
599.B FIONREAD
63f6a20a 600.BR ioctl (2)
c13182ef 601returns the number of bytes available to read from an
4d2b74dd 602inotify file descriptor.
613836aa 603.SS Limitations and caveats
264276c6
MK
604The inotify applications identifies events via watch descriptors.
605It is the application's responsibility to cache a mapping
606(if one is needed) between watch descriptors and pathnames.
607Be aware that directory renamings may affect multiple cached pathnames.
608
4d2b74dd
MK
609Inotify monitoring of directories is not recursive:
610to monitor subdirectories under a directory,
611additional watches must be created.
613836aa
MK
612This can take a significant amount time for large directory trees.
613
a79d28b2
MK
614If monitoring an entire directory subtree,
615and a new subdirectory is created in that tree or an existing directory
616is renamed into that tree,
617be aware that by the time you create a watch for the new subdirectory,
618new files (and subdirectories) may already exist inside the subdirectory.
619Therefore, you may want to scan the contents of the subdirectory
620immediately after adding the watch (and, if desired,
621recursively add watches for any subdirectories that it contains).
622
4d2ddb4e
MK
623The inotify API provides no information about the user or process that
624triggered the inotify event.
99e603bd
MK
625In particular, there is no easy
626way for a process that is monitoring events via inotify
627to distinguish events that it triggers
628itself from those that are triggered by other processes.
4d2ddb4e 629
613836aa
MK
630Note that the event queue can overflow.
631In this case, events are lost.
09fa72fa 632Robust applications should handle the possibility of
613836aa 633lost events gracefully.
94d52c15
MK
634For example, it may be necessary to rebuild part or all of
635the application cache.
636(One simple, but possibly expensive,
637approach is to close the inotify file descriptor, empty the cache,
85e179c5 638create a new inotify file descriptor,
94d52c15
MK
639and then re-create watches and cache entries
640for the objects to be monitored.)
613836aa
MK
641
642The inotify API identifies affected files by filename.
643However, by the time an application processes an inotify event,
644the filename may already have been deleted or renamed.
85e179c5
MK
645.SS Dealing with rename() events
646The
647.B IN_MOVED_FROM
648and
649.B IN_MOVED_TO
650events that are generated by
651.BR rename (2)
652are usually available as consecutive events when reading
653from the inotify file descriptor.
654However, this is not guaranteed.
655If multiple processes are triggering events for monitored objects,
656then (on rare occasions) an arbitrary number of
657other events may appear between the
658.B IN_MOVED_FROM
659and
660.B IN_MOVED_TO
661events.
662
663Matching up the
664.B IN_MOVED_FROM
665and
666.B IN_MOVED_TO
667event pair generated by
668.BR rename (2)
669is thus inherently racy.
670(Don't forget that if an object is renamed outside of a monitored directory,
671there may not even be an
672.BR IN_MOVED_TO
673event.)
674Heuristic approaches (e.g., assume the events are always consecutive)
675can be used to ensure a match in most cases,
676but will inevitably miss some cases,
677causing the application to perceive the
678.B IN_MOVED_FROM
679and
680.B IN_MOVED_TO
681events as being unrelated.
682If watch descriptors are destroyed and re-created as a result,
683then those watch descriptors will be inconsistent with
684the watch descriptors in any pending events.
685(Rebuilding the cache and re-creating the inotify file descriptor may
686be useful to deal with this scenario.)
687
688Applications should also allow for the possibility that the
689.B IN_MOVED_FROM
690event was the last event that could fit in the buffer
691returned by the current call to
692.BR read (2),
693and the accompanying
694.B IN_MOVED_TO
695event might be fetched only on the next
696.BR read (2).
47297adb 697.SH BUGS
a15ead5e
MK
698.\" FIXME kernel commit 611da04f7a31b2208e838be55a42c7a1310ae321
699.\" implies that unmount events were buggy 2.6.11 to 2.6.36
700.\"
ed7b0235
MK
701In kernels before 2.6.16, the
702.B IN_ONESHOT
c13182ef 703.I mask
ed7b0235 704flag does not work.
6f0ab035 705
7b5151b7
MK
706As originally designed and implemented, the
707.B IN_ONESHOT
708flag did not cause an
709.B IN_IGNORED
710event to be generated when the watch was dropped after one event.
711However, as an unintended effect of other changes,
712since Linux 2.6.36, an
713.B IN_IGNORED
714event is generated in this case.
715
6f0ab035 716Before kernel 2.6.25,
22129aa9 717.\" commit 1c17d18e3775485bf1e0ce79575eb637a94494a2
9ed6b517 718the kernel code that was intended to coalesce successive identical events
6f0ab035
MK
719(i.e., the two most recent events could potentially be coalesced
720if the older had not yet been read)
721instead checked if the most recent event could be coalesced with the
722.I oldest
723unread event.
47297adb 724.SH SEE ALSO
f0afb16a
MK
725.BR inotifywait (1),
726.BR inotifywatch (1),
4d2b74dd
MK
727.BR inotify_add_watch (2),
728.BR inotify_init (2),
43bb5faf 729.BR inotify_init1 (2),
4d2b74dd
MK
730.BR inotify_rm_watch (2),
731.BR read (2),
173fe7e7
DP
732.BR stat (2)
733
734.IR Documentation/filesystems/inotify.txt
735in the Linux kernel source tree