aboutsummaryrefslogtreecommitdiffstats
path: root/net/ceph
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-26 16:38:50 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-26 16:38:50 -0400
commitba5b56cb3e3d2cab73d4fee9a022bb69462a8cd9 (patch)
treeeda7ea059a41ae5d68e2ad5a36a87069187ef22a /net/ceph
parent243dd2809a5edd2e0e3e62781083aa44049af37d (diff)
parentd79698da32b317e96216236f265a9b72b78ae568 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (23 commits) ceph: document unlocked d_parent accesses ceph: explicitly reference rename old_dentry parent dir in request ceph: document locking for ceph_set_dentry_offset ceph: avoid d_parent in ceph_dentry_hash; fix ceph_encode_fh() hashing bug ceph: protect d_parent access in ceph_d_revalidate ceph: protect access to d_parent ceph: handle racing calls to ceph_init_dentry ceph: set dir complete frag after adding capability rbd: set blk_queue request sizes to object size ceph: set up readahead size when rsize is not passed rbd: cancel watch request when releasing the device ceph: ignore lease mask ceph: fix ceph_lookup_open intent usage ceph: only link open operations to directory unsafe list if O_CREAT|O_TRUNC ceph: fix bad parent_inode calc in ceph_lookup_open ceph: avoid carrying Fw cap during write into page cache libceph: don't time out osd requests that haven't been received ceph: report f_bfree based on kb_avail rather than diffing. ceph: only queue capsnap if caps are dirty ceph: fix snap writeback when racing with writes ...
Diffstat (limited to 'net/ceph')
-rw-r--r--net/ceph/messenger.c12
-rw-r--r--net/ceph/osd_client.c6
2 files changed, 11 insertions, 7 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 78b55f49de7c..c340e2e0765b 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -486,13 +486,10 @@ static void prepare_write_message(struct ceph_connection *con)
486 m = list_first_entry(&con->out_queue, 486 m = list_first_entry(&con->out_queue,
487 struct ceph_msg, list_head); 487 struct ceph_msg, list_head);
488 con->out_msg = m; 488 con->out_msg = m;
489 if (test_bit(LOSSYTX, &con->state)) { 489
490 list_del_init(&m->list_head); 490 /* put message on sent list */
491 } else { 491 ceph_msg_get(m);
492 /* put message on sent list */ 492 list_move_tail(&m->list_head, &con->out_sent);
493 ceph_msg_get(m);
494 list_move_tail(&m->list_head, &con->out_sent);
495 }
496 493
497 /* 494 /*
498 * only assign outgoing seq # if we haven't sent this message 495 * only assign outgoing seq # if we haven't sent this message
@@ -1399,6 +1396,7 @@ static void process_ack(struct ceph_connection *con)
1399 break; 1396 break;
1400 dout("got ack for seq %llu type %d at %p\n", seq, 1397 dout("got ack for seq %llu type %d at %p\n", seq,
1401 le16_to_cpu(m->hdr.type), m); 1398 le16_to_cpu(m->hdr.type), m);
1399 m->ack_stamp = jiffies;
1402 ceph_msg_remove(m); 1400 ceph_msg_remove(m);
1403 } 1401 }
1404 prepare_read_tag(con); 1402 prepare_read_tag(con);
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 7330c2757c0c..ce310eee708d 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -1085,9 +1085,15 @@ static void handle_timeout(struct work_struct *work)
1085 req = list_entry(osdc->req_lru.next, struct ceph_osd_request, 1085 req = list_entry(osdc->req_lru.next, struct ceph_osd_request,
1086 r_req_lru_item); 1086 r_req_lru_item);
1087 1087
1088 /* hasn't been long enough since we sent it? */
1088 if (time_before(jiffies, req->r_stamp + timeout)) 1089 if (time_before(jiffies, req->r_stamp + timeout))
1089 break; 1090 break;
1090 1091
1092 /* hasn't been long enough since it was acked? */
1093 if (req->r_request->ack_stamp == 0 ||
1094 time_before(jiffies, req->r_request->ack_stamp + timeout))
1095 break;
1096
1091 BUG_ON(req == last_req && req->r_stamp == last_stamp); 1097 BUG_ON(req == last_req && req->r_stamp == last_stamp);
1092 last_req = req; 1098 last_req = req;
1093 last_stamp = req->r_stamp; 1099 last_stamp = req->r_stamp;