fuse: add fuse_iqueue_ops callbacks
authorStefan Hajnoczi <stefanha@redhat.com>
Mon, 18 Jun 2018 14:53:19 +0000 (15:53 +0100)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 12 Sep 2019 12:59:41 +0000 (14:59 +0200)
commitae3aad77f46fbba56eff7141b2fc49870b60827e
tree066161473fe29b6b0c37b94cf351df23744479cf
parent0cc2656cdb0b1f234e6d29378cb061e29d7522bc
fuse: add fuse_iqueue_ops callbacks

The /dev/fuse device uses fiq->waitq and fasync to signal that requests are
available.  These mechanisms do not apply to virtio-fs.  This patch
introduces callbacks so alternative behavior can be used.

Note that queue_interrupt() changes along these lines:

  spin_lock(&fiq->waitq.lock);
  wake_up_locked(&fiq->waitq);
+ kill_fasync(&fiq->fasync, SIGIO, POLL_IN);
  spin_unlock(&fiq->waitq.lock);
- kill_fasync(&fiq->fasync, SIGIO, POLL_IN);

Since queue_request() and queue_forget() also call kill_fasync() inside
the spinlock this should be safe.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/cuse.c
fs/fuse/dev.c
fs/fuse/fuse_i.h
fs/fuse/inode.c