From: Jeff Layton <jlayton@kernel.org>
To: Jan Harkes <jaharkes@cs.cmu.edu>, Jan Kara <jack@suse.cz>
Cc: NeilBrown <neil@brown.name>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>,
Chuck Lever <chuck.lever@oracle.com>,
Amir Goldstein <amir73il@gmail.com>,
David Howells <dhowells@redhat.com>,
Tyler Hicks <code@tyhicks.com>,
Miklos Szeredi <miklos@szeredi.hu>,
Carlos Maiolino <cem@kernel.org>,
linux-fsdevel@vger.kernel.org, coda@cs.cmu.edu,
linux-nfs@vger.kernel.org, netfs@lists.linux.dev,
ecryptfs@vger.kernel.org, linux-unionfs@vger.kernel.org,
linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] coda: use iterate_dir() in coda_readdir()
Date: Mon, 09 Jun 2025 09:21:20 -0400 [thread overview]
Message-ID: <33c80551bb7e0ac26ef00fe14aa9550df68ed120.camel@kernel.org> (raw)
In-Reply-To: <A70CCC08-E8BE-4655-9158-81754F4F6B35@cs.cmu.edu>
On Mon, 2025-06-09 at 09:12 -0400, Jan Harkes wrote:
> There are definitely still users of Coda at CMU, I don't track who else uses it, but it cannot be too many for sure.
>
> At this point it mostly keeps you honest about little locking details in the vfs. There are some tricky details in how the inode mappings are accessed and such. I think that is helpful for overlay and user filesystems like fuse, overlayfs, etc. but Coda is quite small so it is easy to reason about how it uses these features.
>
>
The reason I ask is that it's one of the places that we often have to
do odd fixups like this when making changes to core VFS APIs. It's also
not seen any non-collateral changes since 2021. I'm just wondering
whether it's worth it to keep coda in-tree for so few users.
IIRC, it's also the only fs in the kernel that changes its
inode->i_mapping pointer after inode instantiation. If not for coda, we
could probably replace the i_mapping pointer with some macro wizardry
and shrink struct inode by 8 bytes.
> On June 9, 2025 9:00:31 AM EDT, Jan Kara <jack@suse.cz> wrote:
> > On Mon 09-06-25 08:17:15, Jeff Layton wrote:
> > > On Mon, 2025-06-09 at 09:09 +1000, NeilBrown wrote:
> > > > The code in coda_readdir() is nearly identical to iterate_dir().
> > > > Differences are:
> > > > - iterate_dir() is killable
> > > > - iterate_dir() adds permission checking and accessing notifications
> > > >
> > > > I believe these are not harmful for coda so it is best to use
> > > > iterate_dir() directly. This will allow locking changes without
> > > > touching the code in coda.
> > > >
> > > > Signed-off-by: NeilBrown <neil@brown.name>
> > > > ---
> > > > fs/coda/dir.c | 12 ++----------
> > > > 1 file changed, 2 insertions(+), 10 deletions(-)
> > > >
> > > > diff --git a/fs/coda/dir.c b/fs/coda/dir.c
> > > > index ab69d8f0cec2..ca9990017265 100644
> > > > --- a/fs/coda/dir.c
> > > > +++ b/fs/coda/dir.c
> > > > @@ -429,17 +429,9 @@ static int coda_readdir(struct file *coda_file, struct dir_context *ctx)
> > > > cfi = coda_ftoc(coda_file);
> > > > host_file = cfi->cfi_container;
> > > >
> > > > - if (host_file->f_op->iterate_shared) {
> > > > - struct inode *host_inode = file_inode(host_file);
> > > > - ret = -ENOENT;
> > > > - if (!IS_DEADDIR(host_inode)) {
> > > > - inode_lock_shared(host_inode);
> > > > - ret = host_file->f_op->iterate_shared(host_file, ctx);
> > > > - file_accessed(host_file);
> > > > - inode_unlock_shared(host_inode);
> > > > - }
> > > > + ret = iterate_dir(host_file, ctx);
> > > > + if (ret != -ENOTDIR)
> > > > return ret;
> > > > - }
> > > > /* Venus: we must read Venus dirents from a file */
> > > > return coda_venus_readdir(coda_file, ctx);
> > > > }
> > >
> > >
> > > Is it already time for my annual ask of "Who the heck is using coda
> > > these days?" Anyway, this patch looks fine to me.
> > >
> > > Reviewed-by: Jeff Layton <jlayton@kernel.org>
> >
> > Send a patch proposing deprecating it and we might learn that :) Searching
> > the web seems to suggest it is indeed pretty close to dead.
> >
> > Honza
--
Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2025-06-09 13:21 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-08 23:09 [PATCH 0/5] Minor cleanup preparation for some dir-locking API changes NeilBrown
2025-06-08 23:09 ` [PATCH 1/5] VFS: merge lookup_one_qstr_excl_raw() back into lookup_one_qstr_excl() NeilBrown
2025-06-09 12:13 ` Jeff Layton
2025-06-08 23:09 ` [PATCH 2/5] VFS: Minor fixes for porting.rst NeilBrown
2025-06-09 12:13 ` Jeff Layton
2025-06-08 23:09 ` [PATCH 3/5] coda: use iterate_dir() in coda_readdir() NeilBrown
2025-06-09 12:17 ` Jeff Layton
2025-06-09 13:00 ` Jan Kara
2025-06-09 13:12 ` Jan Harkes
2025-06-09 13:21 ` Jeff Layton [this message]
2025-06-09 13:33 ` Jan Harkes
2025-06-09 14:02 ` Jeff Layton
2025-06-09 14:35 ` Jan Harkes
2025-06-08 23:09 ` [PATCH 4/5] exportfs: use lookup_one_unlocked() NeilBrown
2025-06-09 12:18 ` Jeff Layton
2025-06-09 14:01 ` Chuck Lever
2025-06-08 23:09 ` [PATCH 5/5] Change vfs_mkdir() to unlock on failure NeilBrown
2025-06-09 0:50 ` Al Viro
2025-06-09 5:22 ` NeilBrown
2025-06-09 5:34 ` Al Viro
2025-06-10 8:26 ` Al Viro
2025-06-09 12:23 ` Jeff Layton
2025-06-12 6:59 ` Amir Goldstein
2025-06-11 11:43 ` [PATCH 0/5] Minor cleanup preparation for some dir-locking API changes Christian Brauner
2025-06-11 22:35 ` NeilBrown
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=33c80551bb7e0ac26ef00fe14aa9550df68ed120.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=amir73il@gmail.com \
--cc=brauner@kernel.org \
--cc=cem@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=coda@cs.cmu.edu \
--cc=code@tyhicks.com \
--cc=dhowells@redhat.com \
--cc=ecryptfs@vger.kernel.org \
--cc=jack@suse.cz \
--cc=jaharkes@cs.cmu.edu \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=neil@brown.name \
--cc=netfs@lists.linux.dev \
--cc=viro@zeniv.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).