From: Andrey Vagin <avagin@openvz.org>
To: linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Heinrich Schuchardt <xypron.debian@gmx.de>,
Jan Kara <jack@suse.cz>,
"Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Andrey Vagin <avagin@openvz.org>
Subject: [PATCH] inotify.7: describe ambiguous behaviour of IN_DELETE_SELF
Date: Fri, 19 Sep 2014 19:56:13 +0400 [thread overview]
Message-ID: <1411142173-3072-1-git-send-email-avagin@openvz.org> (raw)
In-Reply-To: <1411141516-1918-1-git-send-email-avagin@openvz.org>
Since kernel 3.18, IN_DELETE_SELF occurs only if nobody uses an object.
Before, if we have two hardlinks where one of them is opened and we
delete the opened file before the second one, we receive
IN_DELETE_SELF. It's wrong, because the file remains opened. If files
are deleted in another order, we don't receive IN_DELETE_SELF as expected.
This patch can be committed only after the kernel patch:
"[PATCH] fs: don't remove inotify watchers from alive inode-s (v2)"
Signed-off-by: Andrey Vagin <avagin@openvz.org>
---
man7/inotify.7 | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/man7/inotify.7 b/man7/inotify.7
index e1cabe2..b7a6e2f 100644
--- a/man7/inotify.7
+++ b/man7/inotify.7
@@ -504,6 +504,19 @@ if the older had not yet been read)
instead checked if the most recent event could be coalesced with the
.I oldest
unread event.
+
+Since kernel 3.18,
+.\" commit XXXXXX
+.B IN_DELETE_SELF
+occurs only if nobody uses an object. Before, if we have two hardlinks where
+one of them is opened and we delete the opened file before the second one, we
+receive
+.B IN_DELETE_SELF.
+It's wrong, because the file remains opened. If files are deleted in another
+order, we don't receive
+.B IN_DELETE_SELF
+as expected.
+
.SH SEE ALSO
.BR inotifywait (1),
.BR inotifywatch (1),
--
1.9.3
next prev parent reply other threads:[~2014-09-19 15:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-19 15:45 [PATCH] fs: don't remove inotify watchers from alive inode-s (v2) Andrey Vagin
2014-09-19 15:56 ` Andrey Vagin [this message]
2014-09-19 16:15 ` Cyrill Gorcunov
2014-09-24 10:51 ` Jan Kara
2014-09-24 20:19 ` Andrew Morton
2014-09-25 8:30 ` Jan Kara
2014-09-25 20:38 ` Cyrill Gorcunov
2014-10-02 10:45 ` Jan Kara
2014-10-02 19:44 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1411142173-3072-1-git-send-email-avagin@openvz.org \
--to=avagin@openvz.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=viro@zeniv.linux.org.uk \
--cc=xypron.debian@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®