diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2006-01-17 01:14:38 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-17 02:15:30 -0500 |
commit | 0cd5b88553acf0611474dbaf8e43770eed268060 (patch) | |
tree | f3b08ab3a4a1cb42d92e2997f60f30d945601600 /fs/fuse/inode.c | |
parent | f543f253f3aa721a24557d7df8259145bb01b734 (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.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 = { | |||
555 | .kill_sb = kill_anon_super, | 555 | .kill_sb = kill_anon_super, |
556 | }; | 556 | }; |
557 | 557 | ||
558 | static ssize_t fuse_conn_waiting_show(struct fuse_conn *fc, char *page) | ||
559 | { | ||
560 | return sprintf(page, "%i\n", atomic_read(&fc->num_waiting)); | ||
561 | } | ||
562 | |||
563 | static struct fuse_conn_attr fuse_conn_waiting = | ||
564 | __ATTR(waiting, 0400, fuse_conn_waiting_show, NULL); | ||
565 | |||
558 | static struct attribute *fuse_conn_attrs[] = { | 566 | static struct attribute *fuse_conn_attrs[] = { |
567 | &fuse_conn_waiting.attr, | ||
559 | NULL, | 568 | NULL, |
560 | }; | 569 | }; |
561 | 570 | ||