|
@@ -1386,8 +1386,9 @@ static void prepare_write_keepalive(struct ceph_connection *con)
|
|
|
dout("prepare_write_keepalive %p\n", con);
|
|
|
con_out_kvec_reset(con);
|
|
|
if (con->peer_features & CEPH_FEATURE_MSGR_KEEPALIVE2) {
|
|
|
- struct timespec now = CURRENT_TIME;
|
|
|
+ struct timespec now;
|
|
|
|
|
|
+ ktime_get_real_ts(&now);
|
|
|
con_out_kvec_add(con, sizeof(tag_keepalive2), &tag_keepalive2);
|
|
|
ceph_encode_timespec(&con->out_temp_keepalive2, &now);
|
|
|
con_out_kvec_add(con, sizeof(con->out_temp_keepalive2),
|
|
@@ -3176,8 +3177,9 @@ bool ceph_con_keepalive_expired(struct ceph_connection *con,
|
|
|
{
|
|
|
if (interval > 0 &&
|
|
|
(con->peer_features & CEPH_FEATURE_MSGR_KEEPALIVE2)) {
|
|
|
- struct timespec now = CURRENT_TIME;
|
|
|
+ struct timespec now;
|
|
|
struct timespec ts;
|
|
|
+ ktime_get_real_ts(&now);
|
|
|
jiffies_to_timespec(interval, &ts);
|
|
|
ts = timespec_add(con->last_keepalive_ack, ts);
|
|
|
return timespec_compare(&now, &ts) >= 0;
|