Re: [LSF/MM TOPIC] Making pseudo file systems inodes/dentries more like normal file systems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2024-01-27 at 18:06 +0000, Matthew Wilcox wrote:
> On Sat, Jan 27, 2024 at 09:59:10AM -0500, James Bottomley wrote:
> > On Sat, 2024-01-27 at 12:15 +0200, Amir Goldstein wrote:
> > > I would like to attend the talk about what happened since we
> > > suggested that you use kernfs in LSFMM 2022 and what has happened
> > > since. I am being serious, I am not being sarcastic and I am not
> > > claiming that you did anything wrong :)
> > 
> > Actually, could we do the reverse and use this session to
> > investigate what's wrong with the VFS for new coders?  I had a
> > somewhat similar experience when I did shiftfs way back in 2017. 
> > There's a huge amount of VFS knowledge you simply can't pick up
> > reading the VFS API.  The way I did it was to look at existing
> > filesystems (for me overlayfs was the closes to my use case) as
> > well (and of course configfs which proved to be too narrow for the
> > use case).  I'd say it took a good six months before I understood
> > the subtleties enough to propose a new filesystem and be capable of
> > answering technical questions about it.  And remember, like Steve,
> > I'm a fairly competent kernel programmer.  Six months plus of code
> > reading is an enormous barrier to place in front of anyone wanting
> > to do a simple filesystem, and it would be way bigger if that
> > person were new(ish) to Linux.
> 
> I'd suggest that eventfs and shiftfs are not "simple filesystems".
> They're synthetic filesystems that want to do very different things
> from block filesystems and network filesystems.  We have a lot of
> infrastructure in place to help authors of, say, bcachefs, but not a
> lot of infrastructure for synthetic filesystems (procfs, overlayfs,
> sysfs, debugfs, etc).

I'm not going to disagree with this at all, but I also don't think it
makes the question any less valid when exposing features through the
filesystem is one of our default things to do.  If anything it makes it
more urgent because some enterprising young thing is going create their
own fantastic synthetic filesystem for something and run headlong into
this.

> I don't feel like I have a lot to offer in this area; it's not a
> part of the VFS I'm comfortable with.  I don't really understand the
> dentry/vfsmount/... interactions.  I'm more focused on the
> fs/mm/block interactions.  I would probably also struggle to write a
> synthetic filesystem, while I could knock up something that's a clone
> of ext2 in a matter of weeks.

OK, I have to confess the relationship of superblocks, struct vfsmount
and struct mnt (as it then was, it's struct mnt_idmap now) to the fs
tree was a huge part of that learning (as was the vagaries of the
dentry cache).

I'm not saying this is easy or something that interests everyone, but I
think receont history demonstrates it's something we should discuss and
try to do better at.

James





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux