diff options
author | helg <helg@cvs.openbsd.org> | 2018-06-21 14:53:37 +0000 |
---|---|---|
committer | helg <helg@cvs.openbsd.org> | 2018-06-21 14:53:37 +0000 |
commit | 6b1892fdad59ff686d418639d66dfd1a16e82efd (patch) | |
tree | 1a534adccbf49b5adc25a597d9fbf09a05c4121f /sys/miscfs/fuse/fuse_device.c | |
parent | 6db88b4a178a94be5b99ce5621083450cb52032f (diff) |
Don't timeout on fb_queue(9). The current process will block
indefinitely and cannot be interrupted or killed. This is consistent
with how VFS system calls should behave. If the file system becomes
unresponsive then the only sane solution is for the user to kill the
file system daemon.
Implementing the equivalent of nfs -osoft or -ointr to either timeout
or allow the blocking FUSE operation to be interrupted can be considered
in a future patch.
ok mpi@
Diffstat (limited to 'sys/miscfs/fuse/fuse_device.c')
-rw-r--r-- | sys/miscfs/fuse/fuse_device.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/sys/miscfs/fuse/fuse_device.c b/sys/miscfs/fuse/fuse_device.c index ca0b1af2e35..85ced5d01e7 100644 --- a/sys/miscfs/fuse/fuse_device.c +++ b/sys/miscfs/fuse/fuse_device.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_device.c,v 1.26 2018/05/17 11:25:11 helg Exp $ */ +/* $OpenBSD: fuse_device.c,v 1.27 2018/06/21 14:53:36 helg Exp $ */ /* * Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com> * @@ -157,7 +157,6 @@ void fuse_destroy(dev_t dev, struct fuse_d *fd) { LIST_REMOVE(fd, fd_list); - fuse_device_cleanup(dev, NULL); free(fd, M_DEVBUF, sizeof(*fd)); } @@ -187,10 +186,8 @@ fuse_device_cleanup(dev_t dev, struct fusebuf *fbuf) fb_next); stat_fbufs_in--; - if (fbuf == NULL) - fb_delete(f); - else - break; + f->fb_err = ENXIO; + wakeup(f); } lprev = f; } @@ -208,10 +205,8 @@ fuse_device_cleanup(dev_t dev, struct fusebuf *fbuf) fb_next); stat_fbufs_wait--; - if (fbuf == NULL) - fb_delete(f); - else - break; + f->fb_err = ENXIO; + wakeup(f); } lprev = f; } @@ -277,6 +272,7 @@ fuseclose(dev_t dev, int flags, int fmt, struct proc *p) if (fd->fd_fmp) { printf("fuse: device close without umount\n"); fd->fd_fmp->sess_init = 0; + fuse_device_cleanup(dev, NULL); if ((vfs_busy(fd->fd_fmp->mp, VB_WRITE|VB_NOWAIT)) != 0) goto end; error = dounmount(fd->fd_fmp->mp, MNT_FORCE, curproc); |