From d5024ba275521cf689bc2b78bdb16ea02f6cf668 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Fri, 10 May 2019 16:31:51 +0000 Subject: [PATCH] fusefs: minor optimization to interrupted fuse operations If the daemon is known to ignore FUSE_INTERRUPT, then we may as well block all signals while waiting for a response. Sponsored by: The FreeBSD Foundation --- sys/fs/fuse/fuse_ipc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/fs/fuse/fuse_ipc.c b/sys/fs/fuse/fuse_ipc.c index 0e4dd745c20..2736572b4ec 100644 --- a/sys/fs/fuse/fuse_ipc.c +++ b/sys/fs/fuse/fuse_ipc.c @@ -442,7 +442,13 @@ fticket_wait_answer(struct fuse_ticket *ftick) int err = 0, stops_deferred; struct fuse_data *data; - SIGEMPTYSET(blockedset); + if (fsess_isimpl(ftick->tk_data->mp, FUSE_INTERRUPT)) { + SIGEMPTYSET(blockedset); + } else { + /* May as well block all signals */ + SIGFILLSET(blockedset); + SIGDELSET(blockedset, SIGKILL); + } stops_deferred = sigdeferstop(SIGDEFERSTOP_SILENT); kern_sigprocmask(td, SIG_BLOCK, NULL, &oldset, 0); -- 2.45.2