All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hugh Dickins <hughd@google.com>
To: Amir Goldstein <amir73il@gmail.com>, Jan Kara <jack@suse.cz>
Cc: Hugh Dickins <hughd@google.com>, Theodore Tso <tytso@mit.edu>,
	Damien Le Moal <damien.lemoal@wdc.com>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH 2/2] shmem: allow reporting fanotify events with file handles on tmpfs
Date: Fri, 16 Apr 2021 20:54:46 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LSU.2.11.2104162042130.26690@eggly.anvils> (raw)
In-Reply-To: <CAOQ4uxia0ETkPF7Af3YiYGb2QzD03UNEpvU2jyibf_+tajhe1A@mail.gmail.com>

On Fri, 16 Apr 2021, Amir Goldstein wrote:
> On Thu, Mar 25, 2021 at 5:00 PM Jan Kara <jack@suse.cz> wrote:
> >
> > On Mon 22-03-21 19:39:44, Amir Goldstein wrote:
> > > Since kernel v5.1, fanotify_init(2) supports the flag FAN_REPORT_FID
> > > for identifying objects using file handle and fsid in events.
> > >
> > > fanotify_mark(2) fails with -ENODEV when trying to set a mark on
> > > filesystems that report null f_fsid in stasfs(2).
> > >
> > > Use the digest of uuid as f_fsid for tmpfs to uniquely identify tmpfs
> > > objects as best as possible and allow setting an fanotify mark that
> > > reports events with file handles on tmpfs.
> > >
> > > Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> >
> > Hugh, any opinion on this patch?
> >
> >                                                                 Honza
> >
> > > ---
> > >  mm/shmem.c | 3 +++
> > >  1 file changed, 3 insertions(+)
> > >
> > > diff --git a/mm/shmem.c b/mm/shmem.c
> > > index b2db4ed0fbc7..162d8f8993bb 100644
> > > --- a/mm/shmem.c
> > > +++ b/mm/shmem.c
> > > @@ -2846,6 +2846,9 @@ static int shmem_statfs(struct dentry *dentry, struct kstatfs *buf)
> > >               buf->f_ffree = sbinfo->free_inodes;
> > >       }
> > >       /* else leave those fields 0 like simple_statfs */
> > > +
> > > +     buf->f_fsid = uuid_to_fsid(dentry->d_sb->s_uuid.b);
> > > +
> > >       return 0;
> > >  }
> > >
> 
> 
> Ping.
> 
> Hugh, are you ok with this change?
> 
> Thanks,
> Amir.

Yes, apologies for my delay to you, Amir and Jan:
sure I'm ok with this change, and thank you for taking care of tmpfs.

Acked-by: Hugh Dickins <hughd@google.com>

But you have more valuable acks on this little series already,
so don't bother rebasing some tree to add mine in now.  I don't yet
see the uuid_to_fsid() 1/2 which this depends on in linux-next, and
fear that's my fault for holding you back: sorry, please go ahead now.

Hugh

  reply	other threads:[~2021-04-17  3:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-22 17:39 [PATCH 0/2] Better fanotify support for tmpfs Amir Goldstein
2021-03-22 17:39 ` [PATCH 1/2] fs: introduce a wrapper uuid_to_fsid() Amir Goldstein
2021-03-23  5:19   ` Damien Le Moal
2021-03-23 14:09   ` Christian Brauner
2021-03-22 17:39 ` [PATCH 2/2] shmem: allow reporting fanotify events with file handles on tmpfs Amir Goldstein
2021-03-25 15:00   ` Jan Kara
2021-04-16  9:59     ` Amir Goldstein
2021-04-17  3:54       ` Hugh Dickins [this message]
2021-04-19  8:34         ` Jan Kara
2021-03-23 13:25 ` [PATCH 0/2] Better fanotify support for tmpfs Jan Kara
2021-03-23 14:13 ` Christian Brauner

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=alpine.LSU.2.11.2104162042130.26690@eggly.anvils \
    --to=hughd@google.com \
    --cc=amir73il@gmail.com \
    --cc=damien.lemoal@wdc.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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.