summaryrefslogtreecommitdiffstats
path: root/fs/ceph/osd_client.c
diff options
context:
space:
mode:
authorSage Weil2009-10-27 19:50:50 +0100
committerSage Weil2009-10-27 19:57:03 +0100
commit6b8051855d983db8480ff1ea1b02ef2b49203c22 (patch)
treeafb72be534ddd4c474a2ec9b7cf2ea5ab86799bc /fs/ceph/osd_client.c
parentceph: fix, clean up string mount arg parsing (diff)
downloadkernel-qcow2-linux-6b8051855d983db8480ff1ea1b02ef2b49203c22.tar.gz
kernel-qcow2-linux-6b8051855d983db8480ff1ea1b02ef2b49203c22.tar.xz
kernel-qcow2-linux-6b8051855d983db8480ff1ea1b02ef2b49203c22.zip
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,
osdc->num_requests++;
req->r_timeout_stamp =
- jiffies + osdc->client->mount_args.osd_timeout*HZ;
+ jiffies + osdc->client->mount_args->osd_timeout*HZ;
if (osdc->num_requests == 1) {
osdc->timeout_tid = req->r_tid;
@@ -609,7 +609,7 @@ static int __send_request(struct ceph_osd_client *osdc,
reqhead->flags |= cpu_to_le32(req->r_flags); /* e.g., RETRY */
reqhead->reassert_version = req->r_reassert_version;
- req->r_timeout_stamp = jiffies+osdc->client->mount_args.osd_timeout*HZ;
+ req->r_timeout_stamp = jiffies+osdc->client->mount_args->osd_timeout*HZ;
ceph_msg_get(req->r_request); /* send consumes a ref */
ceph_con_send(&req->r_osd->o_con, req->r_request);
@@ -632,7 +632,7 @@ static void handle_timeout(struct work_struct *work)
container_of(work, struct ceph_osd_client, timeout_work.work);
struct ceph_osd_request *req;
struct ceph_osd *osd;
- unsigned long timeout = osdc->client->mount_args.osd_timeout * HZ;
+ unsigned long timeout = osdc->client->mount_args->osd_timeout * HZ;
unsigned long next_timeout = timeout + jiffies;
struct rb_node *p;