aboutsummaryrefslogtreecommitdiff
path: root/fs/fuse/inode.c
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2006-01-16 22:14:38 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-16 23:15:30 -0800
commit0cd5b88553acf0611474dbaf8e43770eed268060 (patch)
treef3b08ab3a4a1cb42d92e2997f60f30d945601600 /fs/fuse/inode.c
parentf543f253f3aa721a24557d7df8259145bb01b734 (diff)
[PATCH] fuse: add number of waiting requests attribute
This patch adds the 'waiting' attribute which indicates how many filesystem requests are currently waiting to be completed. A non-zero value without any filesystem activity indicates a hung or deadlocked filesystem. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/fuse/inode.c')
-rw-r--r--fs/fuse/inode.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 514b700c863..182235923cd 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -555,7 +555,16 @@ static struct file_system_type fuse_fs_type = {
.kill_sb = kill_anon_super,
};
+static ssize_t fuse_conn_waiting_show(struct fuse_conn *fc, char *page)
+{
+ return sprintf(page, "%i\n", atomic_read(&fc->num_waiting));
+}
+
+static struct fuse_conn_attr fuse_conn_waiting =
+ __ATTR(waiting, 0400, fuse_conn_waiting_show, NULL);
+
static struct attribute *fuse_conn_attrs[] = {
+ &fuse_conn_waiting.attr,
NULL,
};