All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: ksummit-discuss@lists.linuxfoundation.org
Subject: Re: [Ksummit-discuss] [TECH TOPIC] Linux kernel SMB server (CIFSD)
Date: Wed, 24 Jul 2019 13:50:57 +0300	[thread overview]
Message-ID: <CAOQ4uxhdJDnTiANsC4Cv42A5ooeYaTphtGvZgP9Wvp+LCCh1NA@mail.gmail.com> (raw)
In-Reply-To: <20190724080347.GA12744@jagdpanzerIV>

On Wed, Jul 24, 2019 at 11:03 AM Sergey Senozhatsky
<sergey.senozhatsky.work@gmail.com> wrote:
>
> On (07/24/19 14:52), Sergey Senozhatsky wrote:
> > On (05/30/19 01:59), Theodore Ts'o wrote:
> > > From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> [..]
> > To extend the topic with some discussion points:
> >
> > - We are facing a rather familiar problem. Basically, SMB2 CHANGE_NOTIFY
> >   [1] is something what fsnotify normally does, except that we can't use
> >   it in cifsd kernel module. I see that NFS guys had [2] same issues some
> >   time ago.
> >
> >   So the question is - how to do fs notify style monitoring in a kernel
> >   module (nfsd, cifsd)? Any chance the kernel can start exporting fsnotify
> >   symbols?

I don't see a problem with exporting those symbols.
As a matter of fact, I have a plan to use them also from overlayfs.
At the time that Jeff posted his patches, there was no active fsnotify
maintainer.
Jeff, did you abandon this effort for nfsd?

>
> I even looked at LSM hooks, because they do what we need - invoke
> creat, open, truncate, chmod, chown, unlink, callbacks. But, first,
> I do realize that LSM was not meant to be used as some sort of fsnotify
> replacement, and, second, LSM symbols are not exported anyway :)
>

fsnotify could actually be called from LSM hooks, see:
https://github.com/amir73il/linux/commits/fsnotify_dirent_perm

It may or may not be clear to you, but what you get extra from fsnotify
compared to using bare LSM hooks is:
- Minimal performance overhead for a non-marked object
- Ability to subscribe/unsubscribe to certain events dynamically
- Manage multiple subscriber instances (groups), like one per SMB session
- Queuing infrastructure for async events if you need it

Thanks,
Amir.

  reply	other threads:[~2019-07-24 10:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-30  5:59 [Ksummit-discuss] [TECH TOPIC] Linux kernel SMB server (CIFSD) Theodore Ts'o
2019-07-24  5:52 ` Sergey Senozhatsky
2019-07-24  8:03   ` Sergey Senozhatsky
2019-07-24 10:50     ` Amir Goldstein [this message]
2019-07-24 10:55       ` Jeff Layton
2019-07-25  5:00         ` Sergey Senozhatsky
2019-07-30 17:01           ` Jan Kara
2019-07-31  3:09             ` Sergey Senozhatsky
2019-07-30 16:55         ` Jan Kara
2019-07-24 11:28       ` Sergey Senozhatsky
2019-07-24 16:42       ` Al Viro

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=CAOQ4uxhdJDnTiANsC4Cv42A5ooeYaTphtGvZgP9Wvp+LCCh1NA@mail.gmail.com \
    --to=amir73il@gmail.com \
    --cc=ksummit-discuss@lists.linuxfoundation.org \
    --cc=sergey.senozhatsky.work@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.