Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188618
b: refs/heads/master
c: 039934b
h: refs/heads/master
v: v3
  • Loading branch information
Sage Weil committed Nov 12, 2009
1 parent 5fea93d commit d9882d2
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fef320ff8887c702cde7ca6b8dbfff3a341d49fe
refs/heads/master: 039934b895c89c2bb40aa5132efe00e60b70efca
23 changes: 23 additions & 0 deletions trunk/fs/ceph/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include "super.h"
#include "mds_client.h"

#ifdef CONFIG_DEBUG_FS

/*
* Implement /sys/kernel/debug/ceph fun
*
Expand Down Expand Up @@ -423,3 +425,24 @@ void ceph_debugfs_client_cleanup(struct ceph_client *client)
debugfs_remove(client->debugfs_dir);
}

#else // CONFIG_DEBUG_FS

int __init ceph_debugfs_init(void)
{
return 0;
}

void ceph_debugfs_cleanup(void)
{
}

int ceph_debugfs_client_init(struct ceph_client *client)
{
return 0;
}

void ceph_debugfs_client_cleanup(struct ceph_client *client)
{
}

#endif // CONFIG_DEBUG_FS
2 changes: 2 additions & 0 deletions trunk/fs/ceph/mds_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@ struct ceph_mds_client {
spinlock_t cap_dirty_lock; /* protects above items */
wait_queue_head_t cap_flushing_wq;

#ifdef CONFIG_DEBUG_FS
struct dentry *debugfs_file;
#endif

spinlock_t dentry_lru_lock;
struct list_head dentry_lru;
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/ceph/mon_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ struct ceph_mon_client {
int want_next_osdmap; /* 1 = want, 2 = want+asked */
u32 have_osdmap, have_mdsmap;

#ifdef CONFIG_DEBUG_FS
struct dentry *debugfs_file;
#endif
};

extern struct ceph_monmap *ceph_monmap_decode(void *p, void *end);
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/ceph/osd_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ struct ceph_osd_client {
struct rb_root requests; /* pending requests */
int num_requests;
struct delayed_work timeout_work;
#ifdef CONFIG_DEBUG_FS
struct dentry *debugfs_file;
#endif

mempool_t *req_mempool;

Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/ceph/super.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ static inline unsigned long time_sub(unsigned long a, unsigned long b)
*/
struct ceph_client {
__s64 whoami; /* my client number */
#ifdef CONFIG_DEBUG_FS
struct dentry *debugfs_monmap;
struct dentry *debugfs_mdsmap, *debugfs_osdmap;
struct dentry *debugfs_dir, *debugfs_dentry_lru, *debugfs_caps;
#endif

struct mutex mount_mutex; /* serialize mount attempts */
struct ceph_mount_args *mount_args;
Expand Down

0 comments on commit d9882d2

Please sign in to comment.