Re: [PATCH v2 1/1] ftruncate, truncate: create fanotify events

2014-11-14 Thread Heinrich Schuchardt
Hello Jan, thank you for the review. On 14.11.2014 11:01, Jan Kara wrote: We only want to create FAN_MODIFY events for ATTR_SIZE. So only for these events we need a path. To my knowledge notify_change is called with ATTR_SIZE from do_truncate(), ecryptfs_truncate() and will be called with

Re: [PATCH v2 1/1] ftruncate, truncate: create fanotify events

2014-11-14 Thread Jan Kara
On Tue 11-11-14 20:55:26, Heinrich Schuchardt wrote: > On 11.11.2014 12:09, Jan Kara wrote: > >On Mon 10-11-14 23:34:15, Christoph Hellwig wrote: > >>On Mon, Nov 10, 2014 at 09:30:29PM +0100, Jan Kara wrote: > >>> So what I somewhat dislike about this patch is that notify_change() is >

Re: [PATCH v2 1/1] ftruncate, truncate: create fanotify events

2014-11-14 Thread Jan Kara
On Tue 11-11-14 20:55:26, Heinrich Schuchardt wrote: On 11.11.2014 12:09, Jan Kara wrote: On Mon 10-11-14 23:34:15, Christoph Hellwig wrote: On Mon, Nov 10, 2014 at 09:30:29PM +0100, Jan Kara wrote: So what I somewhat dislike about this patch is that notify_change() is sometimes called

Re: [PATCH v2 1/1] ftruncate, truncate: create fanotify events

2014-11-14 Thread Heinrich Schuchardt
Hello Jan, thank you for the review. On 14.11.2014 11:01, Jan Kara wrote: We only want to create FAN_MODIFY events for ATTR_SIZE. So only for these events we need a path. To my knowledge notify_change is called with ATTR_SIZE from do_truncate(), ecryptfs_truncate() and will be called with

Re: [PATCH v2 1/1] ftruncate, truncate: create fanotify events

2014-11-11 Thread Heinrich Schuchardt
On 11.11.2014 12:09, Jan Kara wrote: On Mon 10-11-14 23:34:15, Christoph Hellwig wrote: On Mon, Nov 10, 2014 at 09:30:29PM +0100, Jan Kara wrote: So what I somewhat dislike about this patch is that notify_change() is sometimes called with dentry and sometimes with path. That way it's not

Re: [PATCH v2 1/1] ftruncate, truncate: create fanotify events

2014-11-11 Thread Jan Kara
On Mon 10-11-14 23:34:15, Christoph Hellwig wrote: > On Mon, Nov 10, 2014 at 09:30:29PM +0100, Jan Kara wrote: > > So what I somewhat dislike about this patch is that notify_change() is > > sometimes called with dentry and sometimes with path. That way it's not > > completely clear when fanotify

Re: [PATCH v2 1/1] ftruncate, truncate: create fanotify events

2014-11-11 Thread Jan Kara
On Mon 10-11-14 23:34:15, Christoph Hellwig wrote: On Mon, Nov 10, 2014 at 09:30:29PM +0100, Jan Kara wrote: So what I somewhat dislike about this patch is that notify_change() is sometimes called with dentry and sometimes with path. That way it's not completely clear when fanotify events

Re: [PATCH v2 1/1] ftruncate, truncate: create fanotify events

2014-11-11 Thread Heinrich Schuchardt
On 11.11.2014 12:09, Jan Kara wrote: On Mon 10-11-14 23:34:15, Christoph Hellwig wrote: On Mon, Nov 10, 2014 at 09:30:29PM +0100, Jan Kara wrote: So what I somewhat dislike about this patch is that notify_change() is sometimes called with dentry and sometimes with path. That way it's not

Re: [PATCH v2 1/1] ftruncate, truncate: create fanotify events

2014-11-10 Thread Christoph Hellwig
On Mon, Nov 10, 2014 at 09:30:29PM +0100, Jan Kara wrote: > So what I somewhat dislike about this patch is that notify_change() is > sometimes called with dentry and sometimes with path. That way it's not > completely clear when fanotify events will be generated and when not. > Sadly it isn't

Re: [PATCH v2 1/1] ftruncate, truncate: create fanotify events

2014-11-10 Thread Heinrich Schuchardt
Hello Andrew, please, consider the patch in https://lkml.org/lkml/2014/10/23/611 for inclusion in the MM tree. It will ensure that FAN_MODIFY events are created for truncate() and ftruncate(). To my knowledge these are the last two system calls changing files directly that are not creating

Re: [PATCH v2 1/1] ftruncate, truncate: create fanotify events

2014-11-10 Thread Jan Kara
On Thu 23-10-14 23:35:07, Heinrich Schuchardt wrote: > :: On Tue, 7 Oct 2014 21:23:30 Jan Kara wrote: > :: > :: Yeah, so the reason why we don't generate FSNOTIFY_EVENT_PATH in > :: notify_change() is because we have only dentry available there. OTOH from a > :: quick look it doesn't look

Re: [PATCH v2 1/1] ftruncate, truncate: create fanotify events

2014-11-10 Thread Jan Kara
On Thu 23-10-14 23:35:07, Heinrich Schuchardt wrote: :: On Tue, 7 Oct 2014 21:23:30 Jan Kara wrote: :: :: Yeah, so the reason why we don't generate FSNOTIFY_EVENT_PATH in :: notify_change() is because we have only dentry available there. OTOH from a :: quick look it doesn't look impossible

Re: [PATCH v2 1/1] ftruncate, truncate: create fanotify events

2014-11-10 Thread Heinrich Schuchardt
Hello Andrew, please, consider the patch in https://lkml.org/lkml/2014/10/23/611 for inclusion in the MM tree. It will ensure that FAN_MODIFY events are created for truncate() and ftruncate(). To my knowledge these are the last two system calls changing files directly that are not creating

Re: [PATCH v2 1/1] ftruncate, truncate: create fanotify events

2014-11-10 Thread Christoph Hellwig
On Mon, Nov 10, 2014 at 09:30:29PM +0100, Jan Kara wrote: So what I somewhat dislike about this patch is that notify_change() is sometimes called with dentry and sometimes with path. That way it's not completely clear when fanotify events will be generated and when not. Sadly it isn't easy

[PATCH v2 1/1] ftruncate, truncate: create fanotify events

2014-10-23 Thread Heinrich Schuchardt
:: On Tue, 7 Oct 2014 21:23:30 Jan Kara wrote: :: :: Yeah, so the reason why we don't generate FSNOTIFY_EVENT_PATH in :: notify_change() is because we have only dentry available there. OTOH from a :: quick look it doesn't look impossible to pass path there from the callers. :: So I'd rather

[PATCH v2 1/1] ftruncate, truncate: create fanotify events

2014-10-23 Thread Heinrich Schuchardt
:: On Tue, 7 Oct 2014 21:23:30 Jan Kara wrote: :: :: Yeah, so the reason why we don't generate FSNOTIFY_EVENT_PATH in :: notify_change() is because we have only dentry available there. OTOH from a :: quick look it doesn't look impossible to pass path there from the callers. :: So I'd rather