Re: [PATCH] fs: don't remove inotify watchers from alive inode-s (v3)

2014-10-28 Thread Andrew Vagin
Hi Al, Could you look at this patch once again? The first version changes behavior for all cases. And I agree that it's a reason to reject it. This version makes behaviour predictable and equal for all cases. Do you think it can't be accepted too? Thanks. On Fri, Oct 03, 2014 at 02:35:23PM +0400

[PATCH] fs: don't remove inotify watchers from alive inode-s (v3)

2014-10-03 Thread Andrey Vagin
Currently watchers are removed in dentry_iput(), if n_link is zero. But other detries can be linked with this inode. For example if we create two hard links, open the first one and set an inotify watcher on one of them. Then if we remove the opened file and then another file, the inotify watcher

Re: [PATCH] fs: don't remove inotify watchers from alive inode-s (v2)

2014-10-02 Thread Andrew Morton
On Thu, 2 Oct 2014 12:45:52 +0200 Jan Kara wrote: > > With the patch you'll always have the second case. So without the patch you > > don't receive some events if the file has at least 2 hardlinks and then > > gets unlinked. I think the risk that some application relies on *not* > > getting > >

Re: [PATCH] fs: don't remove inotify watchers from alive inode-s (v2)

2014-10-02 Thread Jan Kara
On Thu 25-09-14 10:30:10, Jan Kara wrote: > On Wed 24-09-14 13:19:47, Andrew Morton wrote: > > On Wed, 24 Sep 2014 12:51:55 +0200 Jan Kara wrote: > > > > > Hello, > > > > > > Andrew, what do you think about the patch below? Al objected that it > > > changes userspace visible behavior some ti

Re: [PATCH] fs: don't remove inotify watchers from alive inode-s (v2)

2014-09-25 Thread Cyrill Gorcunov
On Thu, Sep 25, 2014 at 10:30:10AM +0200, Jan Kara wrote: > On Wed 24-09-14 13:19:47, Andrew Morton wrote: > > On Wed, 24 Sep 2014 12:51:55 +0200 Jan Kara wrote: > > > > > Hello, > > > > > > Andrew, what do you think about the patch below? Al objected that it > > > changes userspace visible

Re: [PATCH] fs: don't remove inotify watchers from alive inode-s (v2)

2014-09-25 Thread Jan Kara
On Wed 24-09-14 13:19:47, Andrew Morton wrote: > On Wed, 24 Sep 2014 12:51:55 +0200 Jan Kara wrote: > > > Hello, > > > > Andrew, what do you think about the patch below? Al objected that it > > changes userspace visible behavior some time ago and then he didn't react > > to our explanations.

Re: [PATCH] fs: don't remove inotify watchers from alive inode-s (v2)

2014-09-24 Thread Andrew Morton
On Wed, 24 Sep 2014 12:51:55 +0200 Jan Kara wrote: > Hello, > > Andrew, what do you think about the patch below? Al objected that it > changes userspace visible behavior some time ago and then he didn't react > to our explanations... Difficult situation. There's some really important infor

Re: [PATCH] fs: don't remove inotify watchers from alive inode-s (v2)

2014-09-24 Thread Jan Kara
Hello, Andrew, what do you think about the patch below? Al objected that it changes userspace visible behavior some time ago and then he didn't react to our explanations... Honza On Fri 19-09-14 19:45:16, Andrey Vagin wrote: > Cu

Re: [PATCH] fs: don't remove inotify watchers from alive inode-s (v2)

2014-09-19 Thread Cyrill Gorcunov
On Fri, Sep 19, 2014 at 07:45:16PM +0400, Andrey Vagin wrote: > Currently watchers are removed in dentry_iput(), if n_link is zero. But > other detries can be linked with this inode. > ... > > v2: generate IN_DELETE_SELF when the last link to the file is removed > > Reviewed-by: Jan Kara Revie

[PATCH] fs: don't remove inotify watchers from alive inode-s (v2)

2014-09-19 Thread Andrey Vagin
Currently watchers are removed in dentry_iput(), if n_link is zero. But other detries can be linked with this inode. For example if we create two hard links, open the first one and set an inotify watcher on one of them. Then if we remove the opened file and then another file, the inotify watcher

Re: [PATCH] fs: don't remove inotify watchers from alive inode-s

2014-09-18 Thread Jan Kara
On Thu 18-09-14 01:01:22, Andrew Vagin wrote: > From c7a79bccca1aac70f5e50fb145942b932eca79ba Mon Sep 17 00:00:00 2001 > From: Andrey Vagin > Date: Sat, 6 Sep 2014 08:35:24 +0400 > Subject: [PATCH] fs: don't remove inotify watchers from alive inode-s (v2) > > Currently

Re: [PATCH] fs: don't remove inotify watchers from alive inode-s

2014-09-17 Thread Andrew Vagin
differences of behaviours for two equivalent cases. And the resulting behavior is equal for one of these case. If it looks good for you, I will send this patch together with the patch for the man page. Thank you and Heinrich for the comments and advices. Thanks, Andrey > >

Re: [PATCH] fs: don't remove inotify watchers from alive inode-s

2014-09-16 Thread Jan Kara
On Sat 13-09-14 18:15:09, Heinrich Schuchardt wrote: > On Tue 09-09-14 02:27:12, Al Viro wrote: > http://lkml.org/lkml/2014/9/8/762 > > I agree that it changes user-visible ABI and I agree the behavior > > isn't really specified in the manpage. > > Shouldn't we start with putting the expected beha

Re: [PATCH] fs: don't remove inotify watchers from alive inode-s

2014-09-13 Thread Heinrich Schuchardt
On Tue 09-09-14 02:27:12, Al Viro wrote: http://lkml.org/lkml/2014/9/8/762 > I agree that it changes user-visible ABI and I agree the behavior > isn't really specified in the manpage. Shouldn't we start with putting the expected behavior into the manpage before patching the code? I am missing a

Re: [PATCH] fs: don't remove inotify watchers from alive inode-s

2014-09-10 Thread Andrew Vagin
On Tue, Sep 09, 2014 at 10:54:39AM +0200, Jan Kara wrote: > On Tue 09-09-14 02:27:12, Al Viro wrote: > > On Mon, Sep 08, 2014 at 04:01:56PM +0400, Andrey Vagin wrote: > > > Currently watchers are removed in dentry_iput(), if n_link is zero. > > > But other detries can be linked with this inode. For

Re: [PATCH] fs: don't remove inotify watchers from alive inode-s

2014-09-09 Thread Jan Kara
On Tue 09-09-14 02:27:12, Al Viro wrote: > On Mon, Sep 08, 2014 at 04:01:56PM +0400, Andrey Vagin wrote: > > Currently watchers are removed in dentry_iput(), if n_link is zero. > > But other detries can be linked with this inode. For example if we > > create two hard links, open the first one and s

Re: [PATCH] fs: don't remove inotify watchers from alive inode-s

2014-09-08 Thread Al Viro
On Mon, Sep 08, 2014 at 04:01:56PM +0400, Andrey Vagin wrote: > Currently watchers are removed in dentry_iput(), if n_link is zero. > But other detries can be linked with this inode. For example if we > create two hard links, open the first one and set a watcher on the > second one. Then if we remo

Re: [PATCH] fs: don't remove inotify watchers from alive inode-s

2014-09-08 Thread Jan Kara
On Mon 08-09-14 16:01:56, Andrey Vagin wrote: > Currently watchers are removed in dentry_iput(), if n_link is zero. > But other detries can be linked with this inode. For example if we > create two hard links, open the first one and set a watcher on the > second one. Then if we remove both links, t

Re: [PATCH] fs: don't remove inotify watchers from alive inode-s

2014-09-08 Thread Cyrill Gorcunov
On Mon, Sep 08, 2014 at 04:01:56PM +0400, Andrey Vagin wrote: > Currently watchers are removed in dentry_iput(), if n_link is zero. > But other detries can be linked with this inode. For example if we > create two hard links, open the first one and set a watcher on the > second one. Then if we remo

[PATCH] fs: don't remove inotify watchers from alive inode-s

2014-09-08 Thread Andrey Vagin
Currently watchers are removed in dentry_iput(), if n_link is zero. But other detries can be linked with this inode. For example if we create two hard links, open the first one and set a watcher on the second one. Then if we remove both links, the watcher will be removed. But we will have the alive