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
This commit is contained in:
parent
fd182076ff
commit
d5024ba275
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/fuse2/; revision=347434
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user