Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client

Pull Ceph fixes from Sage Weil:
"These are both fixes to the new and improved keepalive2 behavior"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
libceph: advertise support for keepalive2
libceph: don't access invalid memory in keepalive2 path

+9 -5
+1
include/linux/ceph/ceph_features.h
··· 107 107 CEPH_FEATURE_OSDMAP_ENC | \ 108 108 CEPH_FEATURE_CRUSH_TUNABLES3 | \ 109 109 CEPH_FEATURE_OSD_PRIMARY_AFFINITY | \ 110 + CEPH_FEATURE_MSGR_KEEPALIVE2 | \ 110 111 CEPH_FEATURE_CRUSH_V4) 111 112 112 113 #define CEPH_FEATURES_REQUIRED_DEFAULT \
+3 -1
include/linux/ceph/messenger.h
··· 238 238 bool out_kvec_is_msg; /* kvec refers to out_msg */ 239 239 int out_more; /* there is more data after the kvecs */ 240 240 __le64 out_temp_ack; /* for writing an ack */ 241 + struct ceph_timespec out_temp_keepalive2; /* for writing keepalive2 242 + stamp */ 241 243 242 244 /* message in temps */ 243 245 struct ceph_msg_header in_hdr; ··· 250 248 int in_base_pos; /* bytes read */ 251 249 __le64 in_temp_ack; /* for reading an ack */ 252 250 253 - struct timespec last_keepalive_ack; 251 + struct timespec last_keepalive_ack; /* keepalive2 ack stamp */ 254 252 255 253 struct delayed_work work; /* send|recv work */ 256 254 unsigned long delay; /* current delay interval */
+5 -4
net/ceph/messenger.c
··· 1353 1353 dout("prepare_write_keepalive %p\n", con); 1354 1354 con_out_kvec_reset(con); 1355 1355 if (con->peer_features & CEPH_FEATURE_MSGR_KEEPALIVE2) { 1356 - struct timespec ts = CURRENT_TIME; 1357 - struct ceph_timespec ceph_ts; 1358 - ceph_encode_timespec(&ceph_ts, &ts); 1356 + struct timespec now = CURRENT_TIME; 1357 + 1359 1358 con_out_kvec_add(con, sizeof(tag_keepalive2), &tag_keepalive2); 1360 - con_out_kvec_add(con, sizeof(ceph_ts), &ceph_ts); 1359 + ceph_encode_timespec(&con->out_temp_keepalive2, &now); 1360 + con_out_kvec_add(con, sizeof(con->out_temp_keepalive2), 1361 + &con->out_temp_keepalive2); 1361 1362 } else { 1362 1363 con_out_kvec_add(con, sizeof(tag_keepalive), &tag_keepalive); 1363 1364 }