diff options
author | Sage Weil <sage@newdream.net> | 2009-10-27 14:50:50 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-10-27 14:57:03 -0400 |
commit | 6b8051855d983db8480ff1ea1b02ef2b49203c22 (patch) | |
tree | afb72be534ddd4c474a2ec9b7cf2ea5ab86799bc /fs/ceph/caps.c | |
parent | e53c2fe075feda1fd4f009956ac026dc24c3a199 (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/caps.c')
-rw-r--r-- | fs/ceph/caps.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 7d166182e98d..8b863dbec70c 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
@@ -270,7 +270,7 @@ static void put_cap(struct ceph_cap *cap, | |||
270 | * lots of free/alloc churn. | 270 | * lots of free/alloc churn. |
271 | */ | 271 | */ |
272 | if (caps_avail_count >= caps_reserve_count + | 272 | if (caps_avail_count >= caps_reserve_count + |
273 | ceph_client(cap->ci->vfs_inode.i_sb)->mount_args.max_readdir) { | 273 | ceph_client(cap->ci->vfs_inode.i_sb)->mount_args->max_readdir) { |
274 | caps_total_count--; | 274 | caps_total_count--; |
275 | kmem_cache_free(ceph_cap_cachep, cap); | 275 | kmem_cache_free(ceph_cap_cachep, cap); |
276 | } else { | 276 | } else { |
@@ -388,7 +388,7 @@ static void __insert_cap_node(struct ceph_inode_info *ci, | |||
388 | static void __cap_set_timeouts(struct ceph_mds_client *mdsc, | 388 | static void __cap_set_timeouts(struct ceph_mds_client *mdsc, |
389 | struct ceph_inode_info *ci) | 389 | struct ceph_inode_info *ci) |
390 | { | 390 | { |
391 | struct ceph_mount_args *ma = &mdsc->client->mount_args; | 391 | struct ceph_mount_args *ma = mdsc->client->mount_args; |
392 | 392 | ||
393 | ci->i_hold_caps_min = round_jiffies(jiffies + | 393 | ci->i_hold_caps_min = round_jiffies(jiffies + |
394 | ma->caps_wanted_delay_min * HZ); | 394 | ma->caps_wanted_delay_min * HZ); |