diff options
author | Pádraig Brady <P@draigBrady.com> | 2015-07-02 08:41:25 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2015-10-03 03:03:24 +0100 |
commit | 3ba68f9e64fa2eb8af22d510437a0c6441feb5e0 (patch) | |
tree | 54bffbe83b7b6e16b3e2cfe249ce2dbdc69f1e8d /src/extent-scan.h | |
parent | 00ac17889345fe48f6fa4eb2e9457319199e0fe2 (diff) | |
download | coreutils-3ba68f9e64fa2eb8af22d510437a0c6441feb5e0.tar.xz |
tail: handle kernel dentry unlink race
Avoid the intermittent loss of "... has become inaccessible" messages.
That would cause tests/tail-2/assert.sh to fail sometimes,
mainly on uniprocessor systems.
* src/tail.c (tail_forever_inotify): Also monitor IN_DELETE
events on the directory, to avoid a dentry unlink()..open() race,
where the open() on the deleted file was seen to succeed after an,
unlink() and a subsequent IN_ATTRIB, was sent to tail. Note an
IN_ATTRIB is sent on the monitored file to indicate the change in
number of links, and we can't just use a decrease in the number of
links to determine the file being unlinked, due to the possibility
of the file having multiple links.
Reported by Assaf Gordon and Ludovic Courtès.
Fixes http://bugs.gnu.org/21460
Diffstat (limited to 'src/extent-scan.h')
0 files changed, 0 insertions, 0 deletions