destroy_workqueue(ceph_msgr_wq);
}
-/* from slub.c */
-static void print_section(char *text, u8 *addr, unsigned int length)
-{
- int i, offset;
- int newline = 1;
- char ascii[17];
-
- ascii[16] = 0;
-
- for (i = 0; i < length; i++) {
- if (newline) {
- printk(KERN_ERR "%8s 0x%p: ", text, addr + i);
- newline = 0;
- }
- printk(KERN_CONT " %02x", addr[i]);
- offset = i % 16;
- ascii[offset] = isgraph(addr[i]) ? addr[i] : '.';
- if (offset == 15) {
- printk(KERN_CONT " %s\n", ascii);
- newline = 1;
- }
- }
- if (!newline) {
- i %= 16;
- while (i < 16) {
- printk(KERN_CONT " ");
- ascii[i] = ' ';
- i++;
- }
- printk(KERN_CONT " %s\n", ascii);
- }
-}
-
/*
* socket callback functions
*/
u32 crc = crc32c(0, (void *)&m->hdr,
sizeof(m->hdr) - sizeof(m->hdr.crc));
if (crc != le32_to_cpu(m->hdr.crc)) {
- print_section("hdr", (u8 *)&m->hdr,
- sizeof(m->hdr));
pr_err("ceph read_partial_message %p bad hdr "
" crc %u != expected %u\n",
m, crc, m->hdr.crc);
pr_err("ceph read_partial_message %p front crc %u != exp. %u\n",
con->in_msg,
con->in_front_crc, m->footer.front_crc);
- print_section("front", (u8 *)&m->front.iov_base,
- sizeof(m->front.iov_len));
return -EBADMSG;
}
if (datacrc &&
}
p = kmap(m->pages[cur_page]);
- print_section("data", p, left);
kunmap(m->pages[0]);
mutex_unlock(&m->page_mutex);
}
}
+/*
+ * Send a ping/keepalive message to the specified peer.
+ */
void ceph_ping(struct ceph_messenger *msgr, struct ceph_entity_name name,
struct ceph_entity_addr *addr)
{