• Tejun Heo's avatar
    CUSE: implement CUSE - Character device in Userspace · 151060ac
    Tejun Heo authored
    CUSE enables implementing character devices in userspace.  With recent
    additions of ioctl and poll support, FUSE already has most of what's
    necessary to implement character devices.  All CUSE has to do is
    bonding all those components - FUSE, chardev and the driver model -
    nicely.
    
    When client opens /dev/cuse, kernel starts conversation with
    CUSE_INIT.  The client tells CUSE which device it wants to create.  As
    the previous patch made fuse_file usable without associated
    fuse_inode, CUSE doesn't create super block or inodes.  It attaches
    fuse_file to cdev file->private_data during open and set ff->fi to
    NULL.  The rest of the operation is almost identical to FUSE direct IO
    case.
    
    Each CUSE device has a corresponding directory /sys/class/cuse/DEVNAME
    (which is symlink to /sys/devices/virtual/class/DEVNAME if
    SYSFS_DEPRECATED is turned off) which hosts "waiting" and "abort"
    among other things.  Those two files have the same meaning as the FUSE
    control files.
    
    The only notable lacking feature compared to in-kernel implementation
    is mmap support.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
    151060ac
Kconfig 6.43 KB