aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/osd_client.c
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/osd_client.c
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/osd_client.c')
-rw-r--r--fs/ceph/osd_client.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ceph/osd_client.c b/fs/ceph/osd_client.c
index 0a254054a82a..7dc0f6299a52 100644
--- a/fs/ceph/osd_client.c
+++ b/fs/ceph/osd_client.c
@@ -444,7 +444,7 @@ static void register_request(struct ceph_osd_client *osdc,
444 osdc->num_requests++; 444 osdc->num_requests++;
445 445
446 req->r_timeout_stamp = 446 req->r_timeout_stamp =
447 jiffies + osdc->client->mount_args.osd_timeout*HZ; 447 jiffies + osdc->client->mount_args->osd_timeout*HZ;
448 448
449 if (osdc->num_requests == 1) { 449 if (osdc->num_requests == 1) {
450 osdc->timeout_tid = req->r_tid; 450 osdc->timeout_tid = req->r_tid;
@@ -609,7 +609,7 @@ static int __send_request(struct ceph_osd_client *osdc,
609 reqhead->flags |= cpu_to_le32(req->r_flags); /* e.g., RETRY */ 609 reqhead->flags |= cpu_to_le32(req->r_flags); /* e.g., RETRY */
610 reqhead->reassert_version = req->r_reassert_version; 610 reqhead->reassert_version = req->r_reassert_version;
611 611
612 req->r_timeout_stamp = jiffies+osdc->client->mount_args.osd_timeout*HZ; 612 req->r_timeout_stamp = jiffies+osdc->client->mount_args->osd_timeout*HZ;
613 613
614 ceph_msg_get(req->r_request); /* send consumes a ref */ 614 ceph_msg_get(req->r_request); /* send consumes a ref */
615 ceph_con_send(&req->r_osd->o_con, req->r_request); 615 ceph_con_send(&req->r_osd->o_con, req->r_request);
@@ -632,7 +632,7 @@ static void handle_timeout(struct work_struct *work)
632 container_of(work, struct ceph_osd_client, timeout_work.work); 632 container_of(work, struct ceph_osd_client, timeout_work.work);
633 struct ceph_osd_request *req; 633 struct ceph_osd_request *req;
634 struct ceph_osd *osd; 634 struct ceph_osd *osd;
635 unsigned long timeout = osdc->client->mount_args.osd_timeout * HZ; 635 unsigned long timeout = osdc->client->mount_args->osd_timeout * HZ;
636 unsigned long next_timeout = timeout + jiffies; 636 unsigned long next_timeout = timeout + jiffies;
637 struct rb_node *p; 637 struct rb_node *p;
638 638