Re: fuse needs ufs ihash

2016-08-12 Thread Martin Natano
On Thu, Aug 11, 2016 at 10:48:59AM -0400, Ted Unangst wrote:
> Martin Natano wrote:
> > I'm already working on a diff to decouple fuse from ufs ihash. In the
> > meantime: Make sure the necessary code is compiled in when fuse is
> > enabled in the config.
> 
> Are people building kernels with FFS? This is like the old INET option, which
> I deleted because it was insane to disable it.

I don't think a kernel without ffs would be particulary useful. If you
want to remove the FFS option and noone comes up with a good reason to
keep it consider having my ok. Although as long as the option exists I
think it would be nice to have it work correctly.

Some background information why I want to untangle fuse from ufs ihash:
I believe the usage of ufs_ihash in fuse produces some ugly code in
fuse. e.g. (from fusefs_node.h):

...
#include 
...
#ifdef ITOV
# undef ITOV
#endif
#define ITOV(ip) ((ip)->ufs_ino.i_vnode)

#ifdef VTOI
# undef VTOI
#endif
#define VTOI(vp) ((struct fusefs_node *)(vp)->v_data)
...


and (from fuse_vfsops.c):

...
ip->ufs_ino.i_ump = (struct ufsmount *)fmp;
...

and (everywhere):

...
fmp = (struct fusefs_mnt *)ip->ufs_ino.i_ump;
...


Furthermove, struct fusefs_node contains a struct inode, which contains
much more fields than are required for just the ufs ihash stuff which is
actually used by fuse, resulting in a bloated fuse node structure with
most of the stuff in it unused.

Also, the dichotomy between ino_t and ufsino_t in fuse would not be
necessary when no ufs code is involved, eliminating the need to have
overflow checks in place, that should be there, but are not.

So, my idea to untangle fuse from ufs has nothing to do with trying to
build a kernel without ffs. ;) IMHO, kill the option.

natano



Re: fuse needs ufs ihash

2016-08-11 Thread Ted Unangst
Martin Natano wrote:
> I'm already working on a diff to decouple fuse from ufs ihash. In the
> meantime: Make sure the necessary code is compiled in when fuse is
> enabled in the config.

Are people building kernels with FFS? This is like the old INET option, which
I deleted because it was insane to disable it.



fuse needs ufs ihash

2016-08-11 Thread Martin Natano
I'm already working on a diff to decouple fuse from ufs ihash. In the
meantime: Make sure the necessary code is compiled in when fuse is
enabled in the config.

natano


Index: conf/files
===
RCS file: /cvs/src/sys/conf/files,v
retrieving revision 1.622
diff -u -p -r1.622 files
--- conf/files  5 Aug 2016 19:00:25 -   1.622
+++ conf/files  11 Aug 2016 08:31:16 -
@@ -896,7 +896,7 @@ file ufs/mfs/mfs_vfsops.c   mfs
 file ufs/mfs/mfs_vnops.c   mfs
 file ufs/ufs/ufs_bmap.cffs | mfs | ext2fs
 file ufs/ufs/ufs_dirhash.c ufs_dirhash & (ffs | mfs)
-file ufs/ufs/ufs_ihash.c   ffs | mfs | ext2fs
+file ufs/ufs/ufs_ihash.c   ffs | mfs | ext2fs | fuse
 file ufs/ufs/ufs_inode.c   ffs | mfs | ext2fs
 file ufs/ufs/ufs_lookup.c  ffs | mfs | ext2fs
 file ufs/ufs/ufs_quota.c   quota & ( ffs | mfs | ext2fs )