aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/super.h
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-10-27 14:50:50 -0400
committerSage Weil <sage@newdream.net>2009-10-27 14:57:03 -0400
commit6b8051855d983db8480ff1ea1b02ef2b49203c22 (patch)
treeafb72be534ddd4c474a2ec9b7cf2ea5ab86799bc /fs/ceph/super.h
parente53c2fe075feda1fd4f009956ac026dc24c3a199 (diff)
ceph: allocate and parse mount args before client instance
This simplifies much of the error handling during mount. It also means that we have the mount args before client creation, and we can initialize based on those options. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r--fs/ceph/super.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index 3af42d9097ec..a3d4943581d0 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -42,13 +42,15 @@
42#define CEPH_OPT_DEFAULT (CEPH_OPT_RBYTES) 42#define CEPH_OPT_DEFAULT (CEPH_OPT_RBYTES)
43 43
44#define ceph_set_opt(client, opt) \ 44#define ceph_set_opt(client, opt) \
45 (client)->mount_args.flags |= CEPH_OPT_##opt; 45 (client)->mount_args->flags |= CEPH_OPT_##opt;
46#define ceph_test_opt(client, opt) \ 46#define ceph_test_opt(client, opt) \
47 (!!((client)->mount_args.flags & CEPH_OPT_##opt)) 47 (!!((client)->mount_args->flags & CEPH_OPT_##opt))
48 48
49 49
50struct ceph_mount_args { 50struct ceph_mount_args {
51 int sb_flags; 51 int sb_flags;
52 int num_mon;
53 struct ceph_entity_addr *mon_addr;
52 int flags; 54 int flags;
53 int mount_timeout; 55 int mount_timeout;
54 int caps_wanted_delay_min, caps_wanted_delay_max; 56 int caps_wanted_delay_min, caps_wanted_delay_max;
@@ -115,7 +117,7 @@ struct ceph_client {
115 struct dentry *debugfs_dir, *debugfs_dentry_lru, *debugfs_caps; 117 struct dentry *debugfs_dir, *debugfs_dentry_lru, *debugfs_caps;
116 118
117 struct mutex mount_mutex; /* serialize mount attempts */ 119 struct mutex mount_mutex; /* serialize mount attempts */
118 struct ceph_mount_args mount_args; 120 struct ceph_mount_args *mount_args;
119 struct ceph_fsid fsid; 121 struct ceph_fsid fsid;
120 122
121 struct super_block *sb; 123 struct super_block *sb;