diff options
author | Sage Weil <sage@newdream.net> | 2009-12-15 14:44:32 -0800 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-12-21 16:39:54 -0800 |
commit | 06edf046dd68ccbc7cf5f70f957a31702d0e7596 (patch) | |
tree | 5f9dce5a9501ecced0d6b61ddf60f27acd779b3f /fs | |
parent | e2885f06ce31d82b556be021acfa2eba160f29cc (diff) | |
download | op-kernel-dev-06edf046dd68ccbc7cf5f70f957a31702d0e7596.zip op-kernel-dev-06edf046dd68ccbc7cf5f70f957a31702d0e7596.tar.gz |
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.c | 7 | ||||
-rw-r--r-- | fs/ceph/super.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c index b90fc3e..441484a 100644 --- a/fs/ceph/debugfs.c +++ b/fs/ceph/debugfs.c @@ -1,5 +1,6 @@ #include "ceph_debug.h" +#include <linux/device.h> #include <linux/module.h> #include <linux/ctype.h> #include <linux/debugfs.h> @@ -24,6 +25,7 @@ * .../monc - mon client state * .../dentry_lru - dump contents of dentry lru * .../caps - expose cap (reservation) stats + * .../bdi - symlink to ../../bdi/something */ static struct dentry *ceph_debugfs_dir; @@ -407,6 +409,10 @@ int ceph_debugfs_client_init(struct ceph_client *client) if (!client->debugfs_caps) goto out; + sprintf(name, "../../bdi/%s", dev_name(client->sb->s_bdi->dev)); + client->debugfs_bdi = debugfs_create_symlink("bdi", client->debugfs_dir, + name); + return 0; out: @@ -416,6 +422,7 @@ out: void ceph_debugfs_client_cleanup(struct ceph_client *client) { + debugfs_remove(client->debugfs_bdi); debugfs_remove(client->debugfs_caps); debugfs_remove(client->debugfs_dentry_lru); debugfs_remove(client->debugfs_osdmap); diff --git a/fs/ceph/super.h b/fs/ceph/super.h index de5e324..2304bd2 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -143,6 +143,7 @@ struct ceph_client { struct dentry *debugfs_monmap; struct dentry *debugfs_mdsmap, *debugfs_osdmap; struct dentry *debugfs_dir, *debugfs_dentry_lru, *debugfs_caps; + struct dentry *debugfs_bdi; #endif }; |