aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-03-22 17:42:30 -0400
committerSage Weil <sage@newdream.net>2010-03-23 10:47:00 -0400
commit3dd72fc0e6dc49c79fa9e7cd7c654deac7ccaa29 (patch)
tree724a1bc01c752e3de305c01180c5868a3d8601a4 /fs
parent3c3f2e32effd4c6acc3a9434bd7eecb0af653d89 (diff)
ceph: rename r_sent_stamp r_stamp
Make variable name slightly more generic, since it will (soon) reflect either the time the request was sent OR the time it was last determined to be still retrying. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/osd_client.c12
-rw-r--r--fs/ceph/osd_client.h2
2 files changed, 7 insertions, 7 deletions
diff --git a/fs/ceph/osd_client.c b/fs/ceph/osd_client.c
index 221038253e61..04359217ea6c 100644
--- a/fs/ceph/osd_client.c
+++ b/fs/ceph/osd_client.c
@@ -633,7 +633,7 @@ static int __send_request(struct ceph_osd_client *osdc,
633 reqhead->flags |= cpu_to_le32(req->r_flags); /* e.g., RETRY */ 633 reqhead->flags |= cpu_to_le32(req->r_flags); /* e.g., RETRY */
634 reqhead->reassert_version = req->r_reassert_version; 634 reqhead->reassert_version = req->r_reassert_version;
635 635
636 req->r_sent_stamp = jiffies; 636 req->r_stamp = jiffies;
637 list_move_tail(&osdc->req_lru, &req->r_req_lru_item); 637 list_move_tail(&osdc->req_lru, &req->r_req_lru_item);
638 638
639 ceph_msg_get(req->r_request); /* send consumes a ref */ 639 ceph_msg_get(req->r_request); /* send consumes a ref */
@@ -660,7 +660,7 @@ static void handle_timeout(struct work_struct *work)
660 unsigned long timeout = osdc->client->mount_args->osd_timeout * HZ; 660 unsigned long timeout = osdc->client->mount_args->osd_timeout * HZ;
661 unsigned long keepalive = 661 unsigned long keepalive =
662 osdc->client->mount_args->osd_keepalive_timeout * HZ; 662 osdc->client->mount_args->osd_keepalive_timeout * HZ;
663 unsigned long last_sent = 0; 663 unsigned long last_stamp = 0;
664 struct rb_node *p; 664 struct rb_node *p;
665 struct list_head slow_osds; 665 struct list_head slow_osds;
666 666
@@ -697,12 +697,12 @@ static void handle_timeout(struct work_struct *work)
697 req = list_entry(osdc->req_lru.next, struct ceph_osd_request, 697 req = list_entry(osdc->req_lru.next, struct ceph_osd_request,
698 r_req_lru_item); 698 r_req_lru_item);
699 699
700 if (time_before(jiffies, req->r_sent_stamp + timeout)) 700 if (time_before(jiffies, req->r_stamp + timeout))
701 break; 701 break;
702 702
703 BUG_ON(req == last_req && req->r_sent_stamp == last_sent); 703 BUG_ON(req == last_req && req->r_stamp == last_stamp);
704 last_req = req; 704 last_req = req;
705 last_sent = req->r_sent_stamp; 705 last_stamp = req->r_stamp;
706 706
707 osd = req->r_osd; 707 osd = req->r_osd;
708 BUG_ON(!osd); 708 BUG_ON(!osd);
@@ -718,7 +718,7 @@ static void handle_timeout(struct work_struct *work)
718 */ 718 */
719 INIT_LIST_HEAD(&slow_osds); 719 INIT_LIST_HEAD(&slow_osds);
720 list_for_each_entry(req, &osdc->req_lru, r_req_lru_item) { 720 list_for_each_entry(req, &osdc->req_lru, r_req_lru_item) {
721 if (time_before(jiffies, req->r_sent_stamp + keepalive)) 721 if (time_before(jiffies, req->r_stamp + keepalive))
722 break; 722 break;
723 723
724 osd = req->r_osd; 724 osd = req->r_osd;
diff --git a/fs/ceph/osd_client.h b/fs/ceph/osd_client.h
index 1b1a3ca43afc..b0759911e7c3 100644
--- a/fs/ceph/osd_client.h
+++ b/fs/ceph/osd_client.h
@@ -70,7 +70,7 @@ struct ceph_osd_request {
70 70
71 char r_oid[40]; /* object name */ 71 char r_oid[40]; /* object name */
72 int r_oid_len; 72 int r_oid_len;
73 unsigned long r_sent_stamp; 73 unsigned long r_stamp; /* send OR check time */
74 bool r_resend; /* msg send failed, needs retry */ 74 bool r_resend; /* msg send failed, needs retry */
75 75
76 struct ceph_file_layout r_file_layout; 76 struct ceph_file_layout r_file_layout;