Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1229994
| Path | csiph.com!goblin2!goblin.stu.neva.ru!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Jan Kara <jack@suse.cz> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] Add FS_CLOSE_READ and FS_CLOSE_NOREAD flag to fsnotify |
| Date | Tue, 22 Sep 2015 11:10:02 +0200 |
| Message-ID | <qbrKi-Rt-15@gated-at.bofh.it> (permalink) |
| References | <qaU1X-2Yi-3@gated-at.bofh.it> |
| X-Original-To | Patrick Puzik <p.puzik91@gmail.com> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.21 (2010-09-15) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 70 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | 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>, linux-kernel@vger.kernel.org, Patrick Puzik <p.puzi91@gmail.com> |
| X-Original-Date | Tue, 22 Sep 2015 11:06:52 +0200 |
| X-Original-Message-ID | <20150922090652.GG9028@quack.suse.cz> |
| X-Original-References | <1442783255-7457-1-git-send-email-p.puzi91@gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1229994 |
Show key headers only | View raw
On Sun 20-09-15 23:07:35, Patrick Puzik wrote: > Attached is a patch which is a preparation for the later support of an > event notification, when an unreadable or readable file was closed. So I'm missing two things in this patch (or rather changelog): 1) When should these events be generated? I can kind of infer this from the comment and event name but for example FS_CLOSE_WRITE and FS_CLOSE_NOWRITE are exclusive. I suppose we will generate FS_CLOSE_READ or FS_CLOSE_NOREAD in addition to that? 2) What is the use case? I.e. what is your application doing that current notification events are not enough? Honza > > 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 > > -- Jan Kara <jack@suse.com> SUSE Labs, CR -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] Add FS_CLOSE_READ and FS_CLOSE_NOREAD flag to fsnotify Patrick Puzik <p.puzik91@gmail.com> - 2015-09-20 23:10 +0200
Re: [PATCH] Add FS_CLOSE_READ and FS_CLOSE_NOREAD flag to fsnotify Andrew Morton <akpm@linux-foundation.org> - 2015-09-21 23:40 +0200
Re: [PATCH] Add FS_CLOSE_READ and FS_CLOSE_NOREAD flag to fsnotify Jan Kara <jack@suse.cz> - 2015-09-22 11:10 +0200
Re: [PATCH] Add FS_CLOSE_READ and FS_CLOSE_NOREAD flag to fsnotify Patrick Puzik <p.puzik91@gmail.com> - 2015-09-23 20:40 +0200
Re: [PATCH] Add FS_CLOSE_READ and FS_CLOSE_NOREAD flag to fsnotify Jan Kara <jack@suse.cz> - 2015-09-24 10:40 +0200
csiph-web