aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-12-15 17:44:32 -0500
committerSage Weil <sage@newdream.net>2009-12-21 19:39:54 -0500
commit06edf046dd68ccbc7cf5f70f957a31702d0e7596 (patch)
tree5f9dce5a9501ecced0d6b61ddf60f27acd779b3f /fs
parente2885f06ce31d82b556be021acfa2eba160f29cc (diff)
ceph: include link to bdi in debugfs
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/debugfs.c7
-rw-r--r--fs/ceph/super.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c
index b90fc3e1ff70..441484ab7e94 100644
--- a/fs/ceph/debugfs.c
+++ b/fs/ceph/debugfs.c
@@ -1,5 +1,6 @@
1#include "ceph_debug.h" 1#include "ceph_debug.h"
2 2
3#include <linux/device.h>
3#include <linux/module.h> 4#include <linux/module.h>
4#include <linux/ctype.h> 5#include <linux/ctype.h>
5#include <linux/debugfs.h> 6#include <linux/debugfs.h>
@@ -24,6 +25,7 @@
24 * .../monc - mon client state 25 * .../monc - mon client state
25 * .../dentry_lru - dump contents of dentry lru 26 * .../dentry_lru - dump contents of dentry lru
26 * .../caps - expose cap (reservation) stats 27 * .../caps - expose cap (reservation) stats
28 * .../bdi - symlink to ../../bdi/something
27 */ 29 */
28 30
29static struct dentry *ceph_debugfs_dir; 31static struct dentry *ceph_debugfs_dir;
@@ -407,6 +409,10 @@ int ceph_debugfs_client_init(struct ceph_client *client)
407 if (!client->debugfs_caps) 409 if (!client->debugfs_caps)
408 goto out; 410 goto out;
409 411
412 sprintf(name, "../../bdi/%s", dev_name(client->sb->s_bdi->dev));
413 client->debugfs_bdi = debugfs_create_symlink("bdi", client->debugfs_dir,
414 name);
415
410 return 0; 416 return 0;
411 417
412out: 418out:
@@ -416,6 +422,7 @@ out:
416 422
417void ceph_debugfs_client_cleanup(struct ceph_client *client) 423void ceph_debugfs_client_cleanup(struct ceph_client *client)
418{ 424{
425 debugfs_remove(client->debugfs_bdi);
419 debugfs_remove(client->debugfs_caps); 426 debugfs_remove(client->debugfs_caps);
420 debugfs_remove(client->debugfs_dentry_lru); 427 debugfs_remove(client->debugfs_dentry_lru);
421 debugfs_remove(client->debugfs_osdmap); 428 debugfs_remove(client->debugfs_osdmap);
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index de5e32414978..2304bd2844a4 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -143,6 +143,7 @@ struct ceph_client {
143 struct dentry *debugfs_monmap; 143 struct dentry *debugfs_monmap;
144 struct dentry *debugfs_mdsmap, *debugfs_osdmap; 144 struct dentry *debugfs_mdsmap, *debugfs_osdmap;
145 struct dentry *debugfs_dir, *debugfs_dentry_lru, *debugfs_caps; 145 struct dentry *debugfs_dir, *debugfs_dentry_lru, *debugfs_caps;
146 struct dentry *debugfs_bdi;
146#endif 147#endif
147}; 148};
148 149