/* Maximum length of a log entry buffer */
#define CEPH_SAN_LOG_MAX_LEN 256
-
+#define CEPH_SAN_LOG_ENTRY_POISON 0xDEADBEEF
/* Log entry structure */
struct ceph_san_log_entry {
+ u64 debug_poison; /* Debug poison value */
u64 ts; /* Timestamp (jiffies) */
unsigned int line; /* Line number */
unsigned int len; /* Length of the message */
alloc = cephsan_pagefrag_alloc(&ctx->pf, sizeof(*entry) + len + 1);
while (!alloc) {
entry = cephsan_pagefrag_get_ptr_from_tail(&ctx->pf);
+ BUG_ON(entry->debug_poison != CEPH_SAN_LOG_ENTRY_POISON);
cephsan_pagefrag_free(&ctx->pf, entry->len);
alloc = cephsan_pagefrag_alloc(&ctx->pf, sizeof(*entry) + len + 1);
}
entry->buffer[len] = '\0';
/* Fill in entry details */
+ entry->debug_poison = CEPH_SAN_LOG_ENTRY_POISON;
entry->ts = jiffies;
entry->line = line;
entry->file = file;