All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Jan Kara <jack@suse.cz>, Jeff Layton <jlayton@kernel.org>,
	Christian Brauner <brauner@kernel.org>,
	linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org,
	David Sterba <dsterba@suse.com>,
	Luis de Bethencourt <luisbg@kernel.org>,
	Salah Triki <salah.triki@gmail.com>, Gao Xiang <xiang@kernel.org>,
	Chao Yu <chao@kernel.org>, Theodore Ts'o <tytso@mit.edu>,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	Jaegeuk Kim <jaegeuk@kernel.org>,
	OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
	Dave Kleikamp <shaggy@kernel.org>,
	David Woodhouse <dwmw2@infradead.org>,
	Richard Weinberger <richard@nod.at>,
	Anton Altaparmakov <anton@tuxera.com>,
	Konstantin Komarov <almaz.alexandrovich@paragon-software.com>,
	Steve French <sfrench@samba.org>,
	Phillip Lougher <phillip@squashfs.org.uk>,
	Evgeniy Dushistov <dushistov@mail.ru>
Subject: Re: [PATCH 3/5] exportfs: make ->encode_fh() a mandatory method for NFS export
Date: Wed, 18 Oct 2023 11:36:29 -0400	[thread overview]
Message-ID: <ZS/7fQWxuwaUIt/O@tissot.1015granger.net> (raw)
In-Reply-To: <CAOQ4uxj4CQmVKvmLg0UdNJWZ14Dp6SjJUvwqFdO3u9--M4dH6g@mail.gmail.com>

On Wed, Oct 18, 2023 at 06:26:07PM +0300, Amir Goldstein wrote:
> On Wed, Oct 18, 2023 at 6:18 PM Chuck Lever <chuck.lever@oracle.com> wrote:
> >
> > On Wed, Oct 18, 2023 at 12:59:58PM +0300, Amir Goldstein wrote:
> > > export_operations ->encode_fh() no longer has a default implementation to
> > > encode FILEID_INO32_GEN* file handles.
> > >
> > > Rename the default helper for encoding FILEID_INO32_GEN* file handles to
> > > generic_encode_ino32_fh() and convert the filesystems that used the
> > > default implementation to use the generic helper explicitly.
> > >
> > > This is a step towards allowing filesystems to encode non-decodeable file
> > > handles for fanotify without having to implement any export_operations.
> > >
> > > Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> > > ---
> [...]
> 
> > > diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h
> > > index 5b3c9f30b422..6b6e01321405 100644
> > > --- a/include/linux/exportfs.h
> > > +++ b/include/linux/exportfs.h
> > > @@ -235,7 +235,7 @@ extern int exportfs_encode_fh(struct dentry *dentry, struct fid *fid,
> > >
> > >  static inline bool exportfs_can_encode_fid(const struct export_operations *nop)
> > >  {
> > > -     return nop;
> > > +     return nop && nop->encode_fh;
> >
> > The ->encode_fh() method returns an integer type, not a boolean. It
> > would be more clear if this were written
> >
> >         return nop && (nop->encode_fh != FILEID_ROOT);
> >
> > (I'm just guessing at what you might have intended).
> >
> 
> You must be pre-coffee ;)

More like pre-lunch.


> This checks if the method exists, it doesn't invoke the method.

OK, I was confused because I thought you were filling in all the
spots where the method doesn't already exist. My brain lept to
the conclusion that this is therefore calling the method, but I
failed to notice there are no call arguments.

I might understand it now. :-)

Since you want this series to go through the vfs tree:

Acked-by: Chuck Lever <chuck.lever@oracle.com>


-- 
Chuck Lever

  reply	other threads:[~2023-10-18 15:37 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-18  9:59 [PATCH 0/5] Support more filesystems with FAN_REPORT_FID Amir Goldstein
2023-10-18  9:59 ` [PATCH 1/5] fanotify: limit reporting of event with non-decodeable file handles Amir Goldstein
2023-10-19 14:22   ` Jan Kara
2023-10-18  9:59 ` [PATCH 2/5] exportfs: add helpers to check if filesystem can encode/decode " Amir Goldstein
2023-10-18 14:15   ` Jeff Layton
2023-10-19 14:23   ` Jan Kara
2023-10-18  9:59 ` [PATCH 3/5] exportfs: make ->encode_fh() a mandatory method for NFS export Amir Goldstein
2023-10-18 14:16   ` Jeff Layton
2023-10-18 14:53     ` Dave Kleikamp
2023-10-18 15:24       ` Amir Goldstein
2023-10-18 15:18   ` Chuck Lever
2023-10-18 15:26     ` Amir Goldstein
2023-10-18 15:36       ` Chuck Lever [this message]
2023-10-19 14:40   ` Jan Kara
2023-10-19 15:22     ` Amir Goldstein
2023-10-21 16:48   ` kernel test robot
2023-10-22  3:11   ` kernel test robot
2023-10-18  9:59 ` [PATCH 4/5] exportfs: define FILEID_INO64_GEN* file handle types Amir Goldstein
2023-10-18 14:18   ` Jeff Layton
2023-10-19 14:41   ` Jan Kara
2023-10-18 10:00 ` [PATCH 5/5] exportfs: support encoding non-decodeable file handles by default Amir Goldstein
2023-10-18 14:28   ` Jeff Layton
2023-10-18 15:11     ` Amir Goldstein
2023-10-18 15:27   ` Chuck Lever
2023-10-18 17:19     ` Amir Goldstein
2023-10-23 13:55   ` Amir Goldstein
2023-10-23 16:33     ` Jan Kara
2023-10-23 16:44       ` Amir Goldstein

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=ZS/7fQWxuwaUIt/O@tissot.1015granger.net \
    --to=chuck.lever@oracle.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=almaz.alexandrovich@paragon-software.com \
    --cc=amir73il@gmail.com \
    --cc=anton@tuxera.com \
    --cc=brauner@kernel.org \
    --cc=chao@kernel.org \
    --cc=dsterba@suse.com \
    --cc=dushistov@mail.ru \
    --cc=dwmw2@infradead.org \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=jack@suse.cz \
    --cc=jaegeuk@kernel.org \
    --cc=jlayton@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=luisbg@kernel.org \
    --cc=phillip@squashfs.org.uk \
    --cc=richard@nod.at \
    --cc=salah.triki@gmail.com \
    --cc=sfrench@samba.org \
    --cc=shaggy@kernel.org \
    --cc=tytso@mit.edu \
    --cc=xiang@kernel.org \
    /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.