diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2006-01-16 22:14:38 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-16 23:15:30 -0800 |
commit | 0cd5b88553acf0611474dbaf8e43770eed268060 (patch) | |
tree | f3b08ab3a4a1cb42d92e2997f60f30d945601600 /fs/fuse/inode.c | |
parent | f543f253f3aa721a24557d7df8259145bb01b734 (diff) | |
download | talos-obmc-linux-0cd5b88553acf0611474dbaf8e43770eed268060.tar.gz talos-obmc-linux-0cd5b88553acf0611474dbaf8e43770eed268060.zip |
[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.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 514b700c863d..182235923cdd 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, }; |