Bug 16296 - inotify keeps watching unlinked files
Summary: inotify keeps watching unlinked files
Status: RESOLVED CODE_FIX
Alias: None
Product: Other
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Eric Paris
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-25 21:34 UTC by Matthias Clasen
Modified: 2012-08-09 14:12 UTC (History)
3 users (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Matthias Clasen 2010-06-25 21:34:30 UTC
krb5-auth-dialog watches /tmp/krbcc_500 or whatever that file is called,
using gio, which puts a inotify watch on the directory

vte creates files backing its scrollback in /tmp and unlinks them right away

but there's a ton of activity on those files while I do some git --filter-branch things

and I see krb5-auth-dialog eat 10% cpu, handling inotify events for those unlinked vte files

should those unlinked files continue to create inotify traffic ?
I mean, unlinking explicitly unties them from the watched directory, no ?
Comment 1 Eric Paris 2010-07-13 20:23:29 UTC
http://lkml.org/lkml/2010/7/13/360
Comment 2 Eric Paris 2010-07-13 20:24:09 UTC
I'm going to force programs to use a new flag to ignore unlinked files.  I have no idea if some obscure program would break if I did it by default.....
Comment 3 David-Sarah Hopwood 2011-07-30 00:00:06 UTC
Shouldn't this be closed as fixed, since the http://www.kernel.org/doc/man-pages/online/pages/man7/inotify.7.html has "IN_EXCL_UNLINK (since Linux 2.6.36)"?

Note You need to log in before you can comment on or make changes to this bug.