From: Jan Kara <jack@suse.cz>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Jan Kara <jack@suse.cz>, Miklos Szeredi <miklos@szeredi.hu>,
Steve French <smfrench@gmail.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [RFC PATCH] network fs notification
Date: Thu, 2 May 2019 17:41:37 +0200 [thread overview]
Message-ID: <20190502154137.GC25032@quack2.suse.cz> (raw)
In-Reply-To: <CAOQ4uxiLwwmOG0gtNDXng3O=hq3o0jAx66aXnSYV+T7UHtr=8A@mail.gmail.com>
On Thu 02-05-19 11:08:41, Amir Goldstein wrote:
> On Thu, May 2, 2019 at 10:39 AM Jan Kara <jack@suse.cz> wrote:
> >
> > On Wed 01-05-19 16:55:41, Miklos Szeredi wrote:
> > > This is a really really trivial first iteration, but I think it's enough to
> > > try out CIFS notification support. Doesn't deal with mark deletion, but
> > > that's best effort anyway: fsnotify() will filter out unneeded events.
> > >
> > > Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
> > > ---
> > > fs/notify/fanotify/fanotify_user.c | 6 +++++-
> > > fs/notify/inotify/inotify_user.c | 2 ++
> > > include/linux/fs.h | 1 +
> > > 3 files changed, 8 insertions(+), 1 deletion(-)
> > >
> > > --- a/fs/notify/fanotify/fanotify_user.c
> > > +++ b/fs/notify/fanotify/fanotify_user.c
> > > @@ -1041,9 +1041,13 @@ static int do_fanotify_mark(int fanotify
> > > else if (mark_type == FAN_MARK_FILESYSTEM)
> > > ret = fanotify_add_sb_mark(group, mnt->mnt_sb, mask,
> > > flags, fsid);
> > > - else
> > > + else {
> > > ret = fanotify_add_inode_mark(group, inode, mask,
> > > flags, fsid);
> > > +
> > > + if (!ret && inode->i_op->notify_update)
> > > + inode->i_op->notify_update(inode);
> > > + }
> >
> > Yeah, so I had something like this in mind but I wanted to inform the
> > filesystem about superblock and mountpoint marks as well. And I'd pass the
> > 'mask' as well as presumably filesystem could behave differently depending
> > on whether we are looking for create vs unlink vs file change events etc...
> >
>
> It probably wouldn't hurt to update fs about mount marks,
> but in the context of "remote" fs, the changes are most certainly
> being done on a different mount, a different machine most likely...
I agree. I guess I'm missing your point :) What I understood from Steve is
that e.g. cifs could ask the server to provide the notifications. E.g. FUSE
could propagate this information to userspace daemon which could place
appropriate fsnotify marks on underlying objects and then transform the
events to events on the FUSE filesystem? At least that's what I was
imagining, didn't think too much about it.
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2019-05-02 15:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-01 20:55 [RFC PATCH] network fs notification Miklos Szeredi
2019-05-02 14:39 ` Jan Kara
2019-05-02 15:08 ` Amir Goldstein
2019-05-02 15:41 ` Jan Kara [this message]
2019-05-02 17:22 ` Miklos Szeredi
2019-05-07 8:57 ` Miklos Szeredi
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=20190502154137.GC25032@quack2.suse.cz \
--to=jack@suse.cz \
--cc=amir73il@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=smfrench@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