aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-11-12 15:05:52 -0800
committerSage Weil <sage@newdream.net>2009-11-12 15:56:51 -0800
commit039934b895c89c2bb40aa5132efe00e60b70efca (patch)
treecb29a509f2fcf6423191beb8b6aec6e20b89ee14 /fs
parentfef320ff8887c702cde7ca6b8dbfff3a341d49fe (diff)
downloadkernel_samsung_smdk4412-039934b895c89c2bb40aa5132efe00e60b70efca.zip
kernel_samsung_smdk4412-039934b895c89c2bb40aa5132efe00e60b70efca.tar.gz
kernel_samsung_smdk4412-039934b895c89c2bb40aa5132efe00e60b70efca.tar.bz2
ceph: build cleanly without CONFIG_DEBUG_FS
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/debugfs.c23
-rw-r--r--fs/ceph/mds_client.h2
-rw-r--r--fs/ceph/mon_client.h2
-rw-r--r--fs/ceph/osd_client.h2
-rw-r--r--fs/ceph/super.h2
5 files changed, 31 insertions, 0 deletions
diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c
index 9edbad3..9b20206 100644
--- a/fs/ceph/debugfs.c
+++ b/fs/ceph/debugfs.c
@@ -8,6 +8,8 @@
#include "super.h"
#include "mds_client.h"
+#ifdef CONFIG_DEBUG_FS
+
/*
* Implement /sys/kernel/debug/ceph fun
*
@@ -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
diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h
index f566e9c..0751b82 100644
--- a/fs/ceph/mds_client.h
+++ b/fs/ceph/mds_client.h
@@ -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;
diff --git a/fs/ceph/mon_client.h b/fs/ceph/mon_client.h
index 5258c56..9f6db45 100644
--- a/fs/ceph/mon_client.h
+++ b/fs/ceph/mon_client.h
@@ -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);
diff --git a/fs/ceph/osd_client.h b/fs/ceph/osd_client.h
index 9a4addf..766c8dc 100644
--- a/fs/ceph/osd_client.h
+++ b/fs/ceph/osd_client.h
@@ -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;
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index 06b62c0..8aa1ffb 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -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;