Skip to content

Commit

Permalink
libceph: initialize ack_stamp to avoid unnecessary connection reset
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jim Schutt authored and Sage Weil committed Sep 16, 2011
1 parent aca420b commit c0d5f9d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/ceph/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -2307,6 +2307,7 @@ struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags)
m->front_max = front_len;
m->front_is_vmalloc = false;
m->more_to_follow = false;
m->ack_stamp = 0;
m->pool = NULL;

/* middle */
Expand Down

0 comments on commit c0d5f9d

Please sign in to comment.