History log of /freebsd/tests/sys/fs/fusefs/interrupt.cc (Results 1 – 23 of 23)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/14.0.0
# b3e76948 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0
# f993ed2f 09-Sep-2019 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r351732 through r352104.


# 8e765737 06-Sep-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: coverity cleanup in the tests

Address the following defects reported by Coverity:

* Structurally dead code (CID 1404366): set m_quit before FAIL, not after

* Unchecked return value of sysc

fusefs: coverity cleanup in the tests

Address the following defects reported by Coverity:

* Structurally dead code (CID 1404366): set m_quit before FAIL, not after

* Unchecked return value of sysctlbyname (CID 1404321)

* Unchecked return value of stat(2) (CID 1404471)

* Unchecked return value of open(2) (CID 1404402, 1404529)

* Unchecked return value of dup(2) (CID 1404478)

* Buffer overflows. These are all false positives caused by the fact that
Coverity thinks I'm using a buffer to store strings, when in fact I'm
really just using it to store a byte array that happens to be initialized
with a string. I'm changing the type from char to uint8_t in the hopes
that it will placate Coverity. (CID 1404338, 1404350, 1404367, 1404376,
1404379, 1404381, 1404388, 1404403, 1404425, 1404433, 1404434, 1404474,
1404480, 1404484, 1404503, 1404505)

* False positive file descriptor leak. I'm going to try to fix this with
Coverity modeling, but I'll also change an EXPECT to ASSERT so we don't
perform meaningless assertions after the failure. (CID 1404320, 1404324,
1404440, 1404445).

* Unannotated file descriptor leak. This will be followed up by a Coverity
modeling change. (CID 1404326, 1404334, 1404336, 1404357, 1404361,
1404372, 1404391, 1404395, 1404409, 1404430, 1404448, 1404451, 1404455,
1404457, 1404458, 1404460)

* Uninitialized variables in C++ constructors (CID 1404327, 1404346). In the
case of m_maxphys, this actually led to part of the FUSE_INIT's response
being set to stack garbage during the WriteCluster::clustering test.

* Uninitialized sun_len field in struct sockaddr_un (CID 1404330, 1404371,
1404429).

Reported by: Coverity
Reviewed by: emaste
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D21457

show more ...


# 1fa8ebfb 13-Aug-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: add SVN Keywords to the test files

Reported by: SVN pre-commit hooks
MFC after: 15 days
MFC-With: r350665
Sponsored by: The FreeBSD Foundation


# 0b4275ac 07-Aug-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: merge from projects/fuse2

This commit imports the new fusefs driver. It raises the protocol level
from 7.8 to 7.23, fixes many bugs, adds a test suite for the driver, and
adds many new featu

fusefs: merge from projects/fuse2

This commit imports the new fusefs driver. It raises the protocol level
from 7.8 to 7.23, fixes many bugs, adds a test suite for the driver, and
adds many new features. New features include:

* Optional kernel-side permissions checks (-o default_permissions)
* Implement VOP_MKNOD, VOP_BMAP, and VOP_ADVLOCK
* Allow interrupting FUSE operations
* Support named pipes and unix-domain sockets in fusefs file systems
* Forward UTIME_NOW during utimensat(2) to the daemon
* kqueue support for /dev/fuse
* Allow updating mounts with "mount -u"
* Allow exporting fusefs file systems over NFS
* Server-initiated invalidation of the name cache or data cache
* Respect RLIMIT_FSIZE
* Try to support servers as old as protocol 7.4

Performance enhancements include:

* Implement FUSE's FOPEN_KEEP_CACHE and FUSE_ASYNC_READ flags
* Cache file attributes
* Cache lookup entries, both positive and negative
* Server-selectable cache modes: writethrough, writeback, or uncached
* Write clustering
* Readahead
* Use counter(9) for statistical reporting

PR: 199934 216391 233783 234581 235773 235774 235775
PR: 236226 236231 236236 236291 236329 236381 236405
PR: 236327 236466 236472 236473 236474 236530 236557
PR: 236560 236844 237052 237181 237588 238565
Reviewed by: bcr (man pages)
Reviewed by: cem, ngie, rpokala, glebius, kib, bde, emaste (post-commit
review on project branch)
MFC after: 3 weeks
Relnotes: yes
Sponsored by: The FreeBSD Foundation
Pull Request: https://reviews.freebsd.org/D21110

show more ...


# 5a0b9a27 20-Jul-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: fix warnings in the tests reported by GCC

Sponsored by: The FreeBSD Foundation


# ed74f781 18-Jul-2019 Alan Somers <asomers@FreeBSD.org>

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 i

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

show more ...


# d26d63a4 18-Jul-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: multiple interruptility improvements

1) Don't explicitly not mask SIGKILL. kern_sigprocmask won't allow it to be
masked, anyway.

2) Fix an infinite loop bug. If a process received both

fusefs: multiple interruptility improvements

1) Don't explicitly not mask SIGKILL. kern_sigprocmask won't allow it to be
masked, anyway.

2) Fix an infinite loop bug. If a process received both a maskable signal
lower than 9 (like SIGINT) and then received SIGKILL,
fticket_wait_answer would spin. msleep would immediately return EINTR,
but cursig would return SIGINT, so the sleep would get retried. Fix it
by explicitly checking whether SIGKILL has been received.

3) Abandon the sig_isfatal optimization introduced by r346357. That
optimization would cause fticket_wait_answer to return immediately,
without waiting for a response from the server, if the process were going
to exit anyway. However, it's vulnerable to a race:

1) fatal signal is received while fticket_wait_answer is sleeping.
2) fticket_wait_answer sends the FUSE_INTERRUPT operation.
3) fticket_wait_answer determines that the signal was fatal and returns
without waiting for a response.
4) Another thread changes the signal to non-fatal.
5) The first thread returns to userspace. Instead of exiting, the
process continues.
6) The application receives EINTR, wrongly believes that the operation
was successfully interrupted, and restarts it. This could cause
problems for non-idempotent operations like FUSE_RENAME.

Reported by: kib (the race part)
Sponsored by: The FreeBSD Foundation

show more ...


Revision tags: release/11.3.0
# a34cdd26 31-May-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: prefer FUSE_ROOT_ID to literal 1 in the tests

Sponsored by: The FreeBSD Foundation


# 29edc611 27-May-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: make the tests more cplusplusy

* Prefer std::unique_ptr to raw pointers
* Prefer pass-by-reference to pass-by-pointer
* Prefer static_cast to C-style cast, unless it's too much typing

Repor

fusefs: make the tests more cplusplusy

* Prefer std::unique_ptr to raw pointers
* Prefer pass-by-reference to pass-by-pointer
* Prefer static_cast to C-style cast, unless it's too much typing

Reported by: ngie
Sponsored by: The FreeBSD Foundation

show more ...


# a81776c2 10-May-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: fix intermittency in the interrupt tests

* In the fatal_signal test, wait for the daemon to receive FUSE_INTERRUPT
before exiting.
* Explicitly disable restarting syscalls after SIGUSR2.

fusefs: fix intermittency in the interrupt tests

* In the fatal_signal test, wait for the daemon to receive FUSE_INTERRUPT
before exiting.
* Explicitly disable restarting syscalls after SIGUSR2. This fixes
intermittency in the priority test. I don't know why, but sometimes that
test's mkdir would be restarted, and sometimes it would return EINTR.
ERESTART should be the default.
* Remove a useless copy/pasted sleep in the priority test.

Sponsored by: The FreeBSD Foundation

show more ...


# fd182076 10-May-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: fix intermittency in the Interrupt.already_complete test

Sponsored by: The FreeBSD Foundation


# a87257ac 09-May-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: shorten and consolidate sleeps

Some fusefs tests must sleep because they deliberately trigger a race, or
because they're testing the cache timeout functionality. Consolidate the
sleep inter

fusefs: shorten and consolidate sleeps

Some fusefs tests must sleep because they deliberately trigger a race, or
because they're testing the cache timeout functionality. Consolidate the
sleep interval in a single place so it will be easy to adjust. Shorten it
from either 500ms or 250ms to 100ms. From experiment I find that 10ms works
every time, so 100ms should be fairly safe.

Sponsored by: The FreeBSD Foundation

show more ...


# f528b38f 09-May-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: eliminate some sleeps in the Interrupt tests

Replace some sleeps with semaphore operations. Not all sleeps can be
replaced, though. Some are trying to lose a race.

Sponsored by: The FreeB

fusefs: eliminate some sleeps in the Interrupt tests

Replace some sleeps with semaphore operations. Not all sleeps can be
replaced, though. Some are trying to lose a race.

Sponsored by: The FreeBSD Foundation

show more ...


# 102c7ac0 24-Apr-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: handle ENOSYS for FUSE_INTERRUPT

Though it's not documented, Linux will interpret a FUSE_INTERRUPT response
of ENOSYS as "the file system does not support FUSE_INTERRUPT".
Subsequently it wi

fusefs: handle ENOSYS for FUSE_INTERRUPT

Though it's not documented, Linux will interpret a FUSE_INTERRUPT response
of ENOSYS as "the file system does not support FUSE_INTERRUPT".
Subsequently it will never send FUSE_INTERRUPT again to the same mount
point. This change matches Linux's behavior.

PR: 346357
Sponsored by: The FreeBSD Foundation

show more ...


# 9a177029 24-Apr-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: fix the FUSE_INTERRUPT tests when data_cache_mode==2

Replace most write operations with mkdir so they won't be affected by the
setting of vfs.fusefs.data_cache_mode.

Sponsored by: The FreeB

fusefs: fix the FUSE_INTERRUPT tests when data_cache_mode==2

Replace most write operations with mkdir so they won't be affected by the
setting of vfs.fusefs.data_cache_mode.

Sponsored by: The FreeBSD Foundation

show more ...


# 268c28ed 19-Apr-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: give priority to FUSE_INTERRUPT operations

When interrupting a FUSE operation, send the FUSE_INTERRUPT op to the daemon
ASAP, ahead of other unrelated operations.

PR: 236530
Sponsored by:

fusefs: give priority to FUSE_INTERRUPT operations

When interrupting a FUSE operation, send the FUSE_INTERRUPT op to the daemon
ASAP, ahead of other unrelated operations.

PR: 236530
Sponsored by: The FreeBSD Foundation

show more ...


# f0f7fc1b 19-Apr-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: fix interrupting FUSE_SETXATTR

fusefs's VOP_SETEXTATTR calls uiomove(9) before blocking, so it can't be
restarted. It must be interrupted instead.

PR: 236530
Sponsored by: The FreeBSD Fou

fusefs: fix interrupting FUSE_SETXATTR

fusefs's VOP_SETEXTATTR calls uiomove(9) before blocking, so it can't be
restarted. It must be interrupted instead.

PR: 236530
Sponsored by: The FreeBSD Foundation

show more ...


# 3d070fdc 19-Apr-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: don't send FUSE_INTERRUPT for ops that are still in-kernel

If a pending FUSE operation hasn't yet been sent to the daemon, then there's
no reason to inform the daemon that it's been interrup

fusefs: don't send FUSE_INTERRUPT for ops that are still in-kernel

If a pending FUSE operation hasn't yet been sent to the daemon, then there's
no reason to inform the daemon that it's been interrupted. Instead, simply
remove it from the fuse message queue and set its status to EINTR or
ERESTART as appropriate.

PR: 346357
Sponsored by: The FreeBSD Foundation

show more ...


# a1542146 18-Apr-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: improvements to interruptibility

* If a process receives a fatal signal while blocked on a fuse operation,
return ASAP without waiting for the operation to complete. But still send
the

fusefs: improvements to interruptibility

* If a process receives a fatal signal while blocked on a fuse operation,
return ASAP without waiting for the operation to complete. But still send
the FUSE_INTERRUPT op to the daemon.
* Plug memory leaks from r346339

Interruptibility is now fully functional, but it could be better:
* Operations that haven't been sent to the server yet should be aborted
without sending FUSE_INTERRUPT.
* It would be great if write operations could be made restartable.
That would require delaying uiomove until the last possible moment, which
would be sometime during fuse_device_read.
* It would be nice if we didn't have to guess which EAGAIN responses were
for FUSE_INTERRUPT operations.

PR: 236530
Sponsored by: The FreeBSD Foundation

show more ...


# 723c7768 18-Apr-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: WIP making FUSE operations interruptible

The fuse protocol includes a FUSE_INTERRUPT operation that the client can
send to the server to indicate that it wants to abort an in-progress
operat

fusefs: WIP making FUSE operations interruptible

The fuse protocol includes a FUSE_INTERRUPT operation that the client can
send to the server to indicate that it wants to abort an in-progress
operation. It's required to interrupt any syscall that is blocking on a
fuse operation.

This commit adds basic FUSE_INTERRUPT support. If a process receives any
signal while it's blocking on a FUSE operation, it will send a
FUSE_INTERRUPT and wait for the original operation to complete. But there
is still much to do:

* The current code will leak memory if the server ignores FUSE_INTERRUPT,
which many do. It will also leak memory if the server completes the
original operation before it receives the FUSE_INTERRUPT.
* An interrupted read(2) will incorrectly appear to be successful.
* fusefs should return immediately for fatal signals.
* Operations that haven't been sent to the server yet should be aborted
without sending FUSE_INTERRUPT.
* Test coverage should be better.
* It would be great if write operations could be made restartable.
That would require delaying uiomove until the last possible moment, which
would be sometime during fuse_device_read.

PR: 236530
Sponsored by: The FreeBSD Foundation

show more ...


# 9821f1d3 21-Mar-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: adapt the tests to the fuse => fusefs rename

Sponsored by: The FreeBSD Foundation