Skip to content

Commit c0d5f9d

Browse files
Jim Schuttliewegas
authored andcommitted
libceph: initialize ack_stamp to avoid unnecessary connection reset
Commit 4cf9d54 recorded when an outgoing ceph message was ACKed, in order to avoid unnecessary connection resets when an OSD is busy. However, ack_stamp is uninitialized, so there is a window between when the message is sent and when it is ACKed in which handle_timeout() interprets the unitialized value as an expired timeout, and resets the connection unnecessarily. Close the window by initializing ack_stamp. Signed-off-by: Jim Schutt <jaschut@sandia.gov> Signed-off-by: Sage Weil <sage@newdream.net>
1 parent aca420b commit c0d5f9d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎net/ceph/messenger.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2307,6 +2307,7 @@ struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags)
23072307
m->front_max = front_len;
23082308
m->front_is_vmalloc = false;
23092309
m->more_to_follow = false;
2310+
m->ack_stamp = 0;
23102311
m->pool = NULL;
23112312

23122313
/* middle */

0 commit comments

Comments
 (0)