aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse/inode.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2008-11-26 06:03:55 -0500
committerMiklos Szeredi <miklos@szeredi.hu>2008-11-26 06:03:55 -0500
commit95668a69a4bb862063c4d28a746e55107dee7b98 (patch)
tree0679e0f43274648bad70e694a9efb8bcfed55adc /fs/fuse/inode.c
parent8599396b5062bf6bd2a0b433503849e2322df1c2 (diff)
fuse: implement poll support
Implement poll support. Polled files are indexed using kh in a RB tree rooted at fuse_conn->polled_files. Client should send FUSE_NOTIFY_POLL notification once after processing FUSE_POLL which has FUSE_POLL_SCHEDULE_NOTIFY set. Sending notification unconditionally after the latest poll or everytime file content might have changed is inefficient but won't cause malfunction. fuse_file_poll() can sleep and requires patches from the following thread which allows f_op->poll() to sleep. http://thread.gmane.org/gmane.linux.kernel/726176 Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs/fuse/inode.c')
-rw-r--r--fs/fuse/inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 0e15bc221d23..ba7256128084 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -486,6 +486,7 @@ static struct fuse_conn *new_conn(struct super_block *sb)
486 /* fuse does it's own writeback accounting */ 486 /* fuse does it's own writeback accounting */
487 fc->bdi.capabilities = BDI_CAP_NO_ACCT_WB; 487 fc->bdi.capabilities = BDI_CAP_NO_ACCT_WB;
488 fc->khctr = 0; 488 fc->khctr = 0;
489 fc->polled_files = RB_ROOT;
489 fc->dev = sb->s_dev; 490 fc->dev = sb->s_dev;
490 err = bdi_init(&fc->bdi); 491 err = bdi_init(&fc->bdi);
491 if (err) 492 if (err)