aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/super.h
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-11-18 19:50:41 -0500
committerSage Weil <sage@newdream.net>2009-11-20 17:24:27 -0500
commit0743304d871559cb4c7c066357de2caa60e94c2f (patch)
tree546510a84c1bda27e71a8a8229544d99f5624252 /fs/ceph/super.h
parentcfea1cf42b614583c02727d5bffd5a2384e92bda (diff)
ceph: fix debugfs entry, simplify fsid checks
We may first learn our fsid from any of the mon, osd, or mds maps (whichever the monitor sends first). Consolidate checks in a single helper. Initialize the client debugfs entry then, since we need the fsid (and global_id) for the directory name. Also remove dead mount code. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r--fs/ceph/super.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index e0e8130959b..de5e3241497 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -113,16 +113,11 @@ static inline unsigned long time_sub(unsigned long a, unsigned long b)
113 * mounting the same ceph filesystem/cluster. 113 * mounting the same ceph filesystem/cluster.
114 */ 114 */
115struct ceph_client { 115struct ceph_client {
116 __s64 whoami; /* my client number */ 116 struct ceph_fsid fsid;
117#ifdef CONFIG_DEBUG_FS 117 bool have_fsid;
118 struct dentry *debugfs_monmap;
119 struct dentry *debugfs_mdsmap, *debugfs_osdmap;
120 struct dentry *debugfs_dir, *debugfs_dentry_lru, *debugfs_caps;
121#endif
122 118
123 struct mutex mount_mutex; /* serialize mount attempts */ 119 struct mutex mount_mutex; /* serialize mount attempts */
124 struct ceph_mount_args *mount_args; 120 struct ceph_mount_args *mount_args;
125 struct ceph_fsid fsid;
126 121
127 struct super_block *sb; 122 struct super_block *sb;
128 123
@@ -130,8 +125,6 @@ struct ceph_client {
130 wait_queue_head_t mount_wq; 125 wait_queue_head_t mount_wq;
131 126
132 int mount_err; 127 int mount_err;
133 void *signed_ticket; /* our keys to the kingdom */
134 int signed_ticket_len;
135 128
136 struct ceph_messenger *msgr; /* messenger instance */ 129 struct ceph_messenger *msgr; /* messenger instance */
137 struct ceph_mon_client monc; 130 struct ceph_mon_client monc;
@@ -145,6 +138,12 @@ struct ceph_client {
145 struct workqueue_struct *trunc_wq; 138 struct workqueue_struct *trunc_wq;
146 139
147 struct backing_dev_info backing_dev_info; 140 struct backing_dev_info backing_dev_info;
141
142#ifdef CONFIG_DEBUG_FS
143 struct dentry *debugfs_monmap;
144 struct dentry *debugfs_mdsmap, *debugfs_osdmap;
145 struct dentry *debugfs_dir, *debugfs_dentry_lru, *debugfs_caps;
146#endif
148}; 147};
149 148
150static inline struct ceph_client *ceph_client(struct super_block *sb) 149static inline struct ceph_client *ceph_client(struct super_block *sb)
@@ -735,6 +734,7 @@ extern struct kmem_cache *ceph_dentry_cachep;
735extern struct kmem_cache *ceph_file_cachep; 734extern struct kmem_cache *ceph_file_cachep;
736 735
737extern const char *ceph_msg_type_name(int type); 736extern const char *ceph_msg_type_name(int type);
737extern int ceph_check_fsid(struct ceph_client *client, struct ceph_fsid *fsid);
738 738
739#define FSID_FORMAT "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-" \ 739#define FSID_FORMAT "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-" \
740 "%02x%02x%02x%02x%02x%02x" 740 "%02x%02x%02x%02x%02x%02x"