From 94d76e9a2750066fddaeef07d0911ff323c18341 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 29 Jan 2010 10:17:39 -0800 Subject: [PATCH] journal: add flags field to header, entry_header --- src/os/FileJournal.cc | 2 ++ src/os/FileJournal.h | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/os/FileJournal.cc b/src/os/FileJournal.cc index 32973e918ec52..5b88a541a3024 100644 --- a/src/os/FileJournal.cc +++ b/src/os/FileJournal.cc @@ -381,6 +381,7 @@ void FileJournal::prepare_multi_write(bufferlist& bl) // add it this entry entry_header_t h; h.seq = seq; + h.flags = 0; h.len = ebl.length(); h.pre_pad = 0; h.post_pad = 0; @@ -448,6 +449,7 @@ bool FileJournal::prepare_single_dio_write(bufferlist& bl) bufferptr bp = buffer::create_page_aligned(size); entry_header_t *h = (entry_header_t*)bp.c_str(); h->seq = seq; + h->flags = 0; h->len = ebl.length(); h->pre_pad = 0; h->post_pad = size - base_size; diff --git a/src/os/FileJournal.h b/src/os/FileJournal.h index d453fb7985f6d..c4d2baa91535d 100644 --- a/src/os/FileJournal.h +++ b/src/os/FileJournal.h @@ -30,7 +30,8 @@ public: * journal header */ struct header_t { - __u64 version; + __u32 version; + __u32 flags; __u64 fsid; __u32 block_size; __u32 alignment; @@ -38,7 +39,7 @@ public: __s64 wrap; // wrap byte pos (if any) __s64 start; // offset of first entry - header_t() : version(1), fsid(0), block_size(0), alignment(0), max_size(0), wrap(0), start(0) {} + header_t() : version(1), flags(0), fsid(0), block_size(0), alignment(0), max_size(0), wrap(0), start(0) {} void clear() { wrap = 0; @@ -48,8 +49,9 @@ public: struct entry_header_t { uint64_t seq; // fs op seq # - uint64_t len; - uint64_t pre_pad, post_pad; + uint32_t flags; + uint32_t len; + uint32_t pre_pad, post_pad; uint64_t magic1; uint64_t magic2; -- 2.39.5