With the current ddsnap code, journal size can be set to as small as a
single chunk that is not enough for correct journal recovery. We should set
a low limit that leaves enough space for data blocks and commit block
generated in a transaction. Here is the proposed fix.
@@ -3364,6 +3436,7 @@ static int init_super(struct superblock
trace_off(warn("cs_bits = %u", sb->snapdata.asi->allocsize_bits););
u32 chunk_size = 1 << sb->snapdata.asi->allocsize_bits, js_chunks =
DIVROUND(js_bytes, chunk_size);
+ js_chunks = (js_chunks < 8) ? 8 : js_chunks;
trace_off(warn("chunk_size = %u, js_chunks = %u", chunk_size,
js_chunks););
sb->image.journal_size = js_chunks;
jiaying
Original issue reported on code.google.com by jiahotc...@gmail.com on 11 Jul 2008 at 1:07
Original issue reported on code.google.com by
jiahotc...@gmail.com
on 11 Jul 2008 at 1:07