git: sys/vfs/fuse: Add initial FUSE support

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Sun Mar 31 10:04:30 PDT 2019


commit 5812c3cc7f8e910251a2cf4e78242f0b11a5fb4d
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Mon Apr 1 01:30:07 2019 +0900

    sys/vfs/fuse: Add initial FUSE support
    
    The basic code design comes from FreeBSD, but the code is written
    from scratch. It was just easier to write from scratch than trying to
    port sys/fs/fuse/* in FreeBSD for various reasons. Note that this is
    to implement FUSE API/ABI, but not to be compatible with FreeBSD
    implementation which contains FreeBSD specific sysctls, etc.
    
    The initial version doesn't support FUSE_WRITE by disabling
    VOP_WRITE() by returning EOPNOTSUPP. It currently works with simple
    write(2) calls like dd(1) via direct I/O, but not when syncer thread
    or mmap(2) gets involved under non trivial conditions. It looks to
    be doable with custom VOP_GETPAGES() and VOP_PUTPAGES(), but if not
    then it requires some changes to sys/kern/* and sys/vm/* to properly
    support writes.
    
    Besides above, this initial version supports basic FUSE operations
    invoked from file related system calls via FUSE VOP's, but not things
    like FUSE_IOCTL, FUSE_POLL, FUSE_FALLOCATE, etc. Although dmesg says
    FUSE 7.28, don't expect it to support everything 7.28 (or anywhere
    close to 7.28) says it has.
    
    FUSE will be dropped from DragonFly releases until it gets stabilized
    to certain extent including above, at least for write support.

Summary of changes:
 etc/mtree/BSD.include.dist     |    2 +
 include/Makefile               |    2 +-
 sbin/Makefile                  |    1 +
 sbin/mount_fuse/Makefile       |   11 +
 sbin/mount_fuse/mount_fusefs.8 |   54 ++
 sbin/mount_fuse/mount_fusefs.c |  193 +++++
 sys/conf/files                 |    8 +
 sys/conf/options               |    1 +
 sys/kern/vfs_vnops.c           |    1 +
 sys/sys/vfscache.h             |    5 +-
 sys/vfs/Makefile               |    2 +-
 sys/vfs/fuse/Makefile          |    4 +
 sys/vfs/fuse/fuse.h            |  287 +++++++
 sys/vfs/fuse/fuse_abi.h        |  820 ++++++++++++++++++++
 sys/vfs/fuse/fuse_debug.h      |   57 ++
 sys/vfs/fuse/fuse_device.c     |  320 ++++++++
 sys/vfs/fuse/fuse_file.c       |  105 +++
 sys/vfs/fuse/fuse_io.c         |  346 +++++++++
 sys/vfs/fuse/fuse_ipc.c        |  259 +++++++
 sys/vfs/fuse/fuse_mount.h      |   46 ++
 sys/vfs/fuse/fuse_node.c       |  353 +++++++++
 sys/vfs/fuse/fuse_util.c       |  339 +++++++++
 sys/vfs/fuse/fuse_vfsops.c     |  404 ++++++++++
 sys/vfs/fuse/fuse_vnops.c      | 1624 ++++++++++++++++++++++++++++++++++++++++
 24 files changed, 5240 insertions(+), 4 deletions(-)
 create mode 100644 sbin/mount_fuse/Makefile
 create mode 100644 sbin/mount_fuse/mount_fusefs.8
 create mode 100644 sbin/mount_fuse/mount_fusefs.c
 create mode 100644 sys/vfs/fuse/Makefile
 create mode 100644 sys/vfs/fuse/fuse.h
 create mode 100644 sys/vfs/fuse/fuse_abi.h
 create mode 100644 sys/vfs/fuse/fuse_debug.h
 create mode 100644 sys/vfs/fuse/fuse_device.c
 create mode 100644 sys/vfs/fuse/fuse_file.c
 create mode 100644 sys/vfs/fuse/fuse_io.c
 create mode 100644 sys/vfs/fuse/fuse_ipc.c
 create mode 100644 sys/vfs/fuse/fuse_mount.h
 create mode 100644 sys/vfs/fuse/fuse_node.c
 create mode 100644 sys/vfs/fuse/fuse_util.c
 create mode 100644 sys/vfs/fuse/fuse_vfsops.c
 create mode 100644 sys/vfs/fuse/fuse_vnops.c

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/5812c3cc7f8e910251a2cf4e78242f0b11a5fb4d


-- 
DragonFly BSD source repository



More information about the Commits mailing list