]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
fusefs: add a intr/nointr mount option
authorasomers <asomers@FreeBSD.org>
Thu, 18 Jul 2019 17:55:13 +0000 (17:55 +0000)
committerasomers <asomers@FreeBSD.org>
Thu, 18 Jul 2019 17:55:13 +0000 (17:55 +0000)
commit964ad037691c704db52222df803a9f2e24abfce8
treea0debdb972a97d02e135b2ba8ed5940f64fc87b2
parent6f74de47606cb619da22c79107e8988e01f2ef04
fusefs: add a intr/nointr mount option

FUSE file systems can optionally support interrupting outstanding
operations.  However, the file system does not identify to the kernel at
mount time whether it's capable of doing that.  Instead it signals its
noncapability by returning ENOSYS to the first FUSE_INTERRUPT operation it
receives.  That's a problem for reliable signal delivery, because the kernel
must choose which thread should get a signal before it knows whether the
FUSE server can handle interrupts.  The problem is even worse because the
FUSE protocol allows a file system to simply ignore all FUSE_INTERRUPT
operations.

Fix the signal delivery logic by making interruptibility an opt-in mount
option.  This will require a corresponding change to libfuse, but not to
most file systems that link to libfuse.

Bump __FreeBSD_version due to the new mount option.

Sponsored by: The FreeBSD Foundation
sbin/mount_fusefs/mount_fusefs.8
sbin/mount_fusefs/mount_fusefs.c
sys/fs/fuse/fuse_ipc.c
sys/fs/fuse/fuse_ipc.h
sys/fs/fuse/fuse_vfsops.c
sys/sys/param.h
tests/sys/fs/fusefs/interrupt.cc
tests/sys/fs/fusefs/mockfs.cc
tests/sys/fs/fusefs/mockfs.hh
tests/sys/fs/fusefs/utils.cc
tests/sys/fs/fusefs/utils.hh