mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Patrick Puzik <p.puzik91@gmail.com>
To: Jan Kara <jack@suse.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Josef Bacik <jbacik@fb.com>, Dave Chinner <dchinner@redhat.com>,
	Nikolay Borisov <kernel@kyup.com>,
	Patrick Puzik <p.puzik91@gmail.com>,
	linux-kernel@vger.kernel.org
Cc: Patrick Puzik <p.puzi91@gmail.com>
Subject: [PATCH] Add FS_CLOSE_READ and FS_CLOSE_NOREAD flag to fsnotify
Date: Sun, 20 Sep 2015 23:07:35 +0200	[thread overview]
Message-ID: <1442783255-7457-1-git-send-email-p.puzi91@gmail.com> (raw)

Attached is a patch which is a preparation for the later support of an event notification,
when an unreadable or readable file was closed.

Signed-off-by: Patrick Puzik <p.puzik91@gmail.com>
---
 include/linux/fsnotify_backend.h | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h
index 533c440..7563679 100644
--- a/include/linux/fsnotify_backend.h
+++ b/include/linux/fsnotify_backend.h
@@ -28,6 +28,8 @@
 #define FS_ATTRIB		0x00000004	/* Metadata changed */
 #define FS_CLOSE_WRITE		0x00000008	/* Writtable file was closed */
 #define FS_CLOSE_NOWRITE	0x00000010	/* Unwrittable file closed */
+#define FS_CLOSE_READ           0x00000011      /* Unreadable file closed */
+#define FS_CLOSE_NOREAD         0x00000012      /* Readable file was closed */
 #define FS_OPEN			0x00000020	/* File was opened */
 #define FS_MOVED_FROM		0x00000040	/* File was moved from X */
 #define FS_MOVED_TO		0x00000080	/* File was moved to Y */
@@ -56,9 +58,10 @@
 
 /* This is a list of all events that may get sent to a parernt based on fs event
  * happening to inodes inside that directory */
-#define FS_EVENTS_POSS_ON_CHILD   (FS_ACCESS | FS_MODIFY | FS_ATTRIB |\
-				   FS_CLOSE_WRITE | FS_CLOSE_NOWRITE | FS_OPEN |\
-				   FS_MOVED_FROM | FS_MOVED_TO | FS_CREATE |\
+#define FS_EVENTS_POSS_ON_CHILD   (FS_ACCESS | FS_MODIFY | FS_ATTRIB | \
+				   FS_CLOSE_WRITE | FS_CLOSE_NOWRITE | \
+				   FS_CLOSE_READ | FS_CLOSE_NOREAD | FS_OPEN | \
+				   FS_MOVED_FROM | FS_MOVED_TO | FS_CREATE | \
 				   FS_DELETE | FS_OPEN_PERM | FS_ACCESS_PERM)
 
 #define FS_MOVE			(FS_MOVED_FROM | FS_MOVED_TO)
@@ -66,7 +69,8 @@
 #define ALL_FSNOTIFY_PERM_EVENTS (FS_OPEN_PERM | FS_ACCESS_PERM)
 
 #define ALL_FSNOTIFY_EVENTS (FS_ACCESS | FS_MODIFY | FS_ATTRIB | \
-			     FS_CLOSE_WRITE | FS_CLOSE_NOWRITE | FS_OPEN | \
+			     FS_CLOSE_WRITE | FS_CLOSE_NOWRITE | \
+			     FS_CLOSE_READ | FS_CLOSE_NOREAD | FS_OPEN | \
 			     FS_MOVED_FROM | FS_MOVED_TO | FS_CREATE | \
 			     FS_DELETE | FS_DELETE_SELF | FS_MOVE_SELF | \
 			     FS_UNMOUNT | FS_Q_OVERFLOW | FS_IN_IGNORED | \
-- 
2.4.3


             reply	other threads:[~2015-09-20 21:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-20 21:07 Patrick Puzik [this message]
2015-09-21 21:37 ` Andrew Morton
2015-09-22  9:06 ` Jan Kara
2015-09-23 18:32   ` Patrick Puzik
2015-09-24  8:00     ` Jan Kara

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=1442783255-7457-1-git-send-email-p.puzi91@gmail.com \
    --to=p.puzik91@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dchinner@redhat.com \
    --cc=jack@suse.com \
    --cc=jbacik@fb.com \
    --cc=kernel@kyup.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p.puzi91@gmail.com \
    /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

Powered by JetHome