freebsd-dev/sys/fs
Alan Somers 8b73a4c5ae fusefs: fix running multiple daemons concurrently
When a FUSE daemon dies or closes /dev/fuse, all of that daemon's pending
requests must be terminated.  Previously that was done in /dev/fuse's
.d_close method.  However, d_close only gets called on the *last* close of
the device.  That means that if multiple daemons were running concurrently,
all but the last daemon to close would leave their I/O hanging around.  The
problem was easily visible just by running "kyua -v parallelism=2 test" in
fusefs's test directory.

Fix this bug by terminating a daemon's pending I/O during /dev/fuse's
cdvpriv dtor method instead.  That method runs on every close of a file.

Also, fix some potential races in the tests:
* Clear SA_RESTART when registering the daemon's signal handler so read(2)
  will return EINTR.
* Wait for the daemon to die before unmounting the mountpoint, so we won't
  see an unwanted FUSE_DESTROY operation in the mock file system.

Sponsored by:	The FreeBSD Foundation
2019-05-10 15:02:29 +00:00
..
autofs Ensure that directory entry padding bytes are zeroed. 2018-11-23 22:24:59 +00:00
cd9660 Ensure that directory entry padding bytes are zeroed. 2018-11-23 22:24:59 +00:00
cuse Use NULL for SYSINIT's last arg, which is a pointer type 2018-05-18 17:58:09 +00:00
deadfs sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
devfs Ensure that directory entry padding bytes are zeroed. 2018-11-23 22:24:59 +00:00
ext2fs Remove unneeded mount point unlock function calls. 2019-03-15 11:49:46 +00:00
fdescfs Ensure that directory entry padding bytes are zeroed. 2018-11-23 22:24:59 +00:00
fifofs Rework pathconf handling for FIFOs. 2017-12-19 22:39:05 +00:00
fuse fusefs: fix running multiple daemons concurrently 2019-05-10 15:02:29 +00:00
msdosfs msdosfs: zero tail of the last block on truncation for VREG vnodes as well. 2019-04-03 17:02:18 +00:00
nandfs Add _PC_ACL_* to vop_stdpathconf 2019-03-11 20:40:56 +00:00
nfs Drop unused 'p' argument to nfsv4_strtogid(). 2019-03-12 15:07:47 +00:00
nfsclient Drop unused 'p' argument to nfsv4_strtogid(). 2019-03-12 15:07:47 +00:00
nfsserver Drop unused 'p' argument to nfsv4_strtogid(). 2019-03-12 15:07:47 +00:00
nullfs nullfs: fix unmounts when filesystem is active. 2019-03-21 13:30:48 +00:00
procfs Plug memory disclosures via ptrace(2). 2018-12-03 20:54:17 +00:00
pseudofs PFS: Bump NAMELEN and don't require clients to be sleepable 2019-02-20 20:55:02 +00:00
smbfs [smbfs] Allow semicolon in mounts that support long names 2019-01-20 05:52:16 +00:00
tmpfs tmpfs: plug holes on rw->ro mount update. 2019-04-02 13:59:04 +00:00
udf Ensure that directory entry padding bytes are zeroed. 2018-11-23 22:24:59 +00:00
unionfs sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00