On Tue, Feb 9, 2021 at 9:06 PM Richard Weinberger wrote: > > Miklos, > > ----- Ursprüngliche Mail ----- > >> I do wonder if MUSE should go to drivers/mtd/ instead. Long term > >> goal would be move CUSE to drivers/char and move the transport part of > >> fuse into net/fuse leaving only the actual filesystems (fuse and > >> virtiofs) under fs/. > >> > >> But for now just moving the minimal interface needed for MUSE into a > >> separate header () would work, I guess. > >> > >> Do you think that would make sense? > > > > Yes, I'm all for having MUSE in drivers/mtd/. > > > > I placed MUSE initially in fs/fuse/ because CUSE was already there and muse.c > > includes > > fuse_i.h. So tried to be as little invasive as possible. > > I did a quick patch series which moves CUSE into drivers/char/ > > https://git.kernel.org/pub/scm/linux/kernel/git/rw/misc.git/log/?h=fs_fuse_split > > Does this more or less what you had in mind? Just moving the whole internal header file is not nice. I did a mechanical public/private separation of the interface based on what CUSE uses. Incremental patch attached. But this is just a start. From the big structures still left in CUSE only uses the following fields: fc: .minor, max_read, max_write, rcu, release, initialized, num_waiting fm: .fc ff: .fm fud: .fc Dealing with the last 3 is trivial: create and alloc function for the fm, and create accessor functions for the accessed fields. Dealing with fc properly is probably a bit more involved, but does not seem to be too compex at first glance. Do you want to take a stab at cleaning this up further? Thanks, Miklos