]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] fuse: add O_ASYNC support to FUSE device
authorJeff Dike <jdike@addtoit.com>
Tue, 11 Apr 2006 05:54:52 +0000 (22:54 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 11 Apr 2006 13:18:48 +0000 (06:18 -0700)
commit173cfa232cc9c4c2a8464ccc7add2317e4918e1e
tree7a9fde77c95f0e4cc86f31e8b1f5d23b6d815634
parent6e6a594fe45929f3cc7e09ab99f4922317c2b1cb
[PATCH] fuse: add O_ASYNC support to FUSE device

This adds asynchronous notification to FUSE - a FUSE server can request
O_ASYNC on a /dev/fuse file descriptor and receive SIGIO when there is input
available.

One subtlety - fuse_dev_fasync, which is called when O_ASYNC is requested,
does no locking, unlink the other methods.  I think it's unnecessary, as the
fuse_conn.fasync list is manipulated only by fasync_helper and kill_fasync,
which provide their own locking.  It would also be wrong to use the fuse_lock,
as it's a spin lock and fasync_helper can sleep.  My one concern with this is
the fuse_conn going away underneath fuse_dev_fasync - sys_fcntl takes a
reference on the file struct, so this seems not to be a problem.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/fuse/dev.c
fs/fuse/fuse_i.h
fs/fuse/inode.c