From: Dong Yuan Date: Wed, 10 Dec 2014 16:09:01 +0000 (+0000) Subject: osd: fix Transaction::get_data_offset bug when map layout used X-Git-Tag: v0.92~62^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0354305db72f3ac34913854e5c41e0bee36ea449;p=ceph.git osd: fix Transaction::get_data_offset bug when map layout used add following offset: sizeof(__u8) + // encode struct_v sizeof(__u8) + // encode compat_v sizeof(__u32); // encode len Change-Id: I5b6662eb42aeeae64baa8699da6ce65e0b1d58c3 Signed-off-by: Dong Yuan --- diff --git a/src/os/ObjectStore.h b/src/os/ObjectStore.h index dde987431cd0..70f8d0f2bf3f 100644 --- a/src/os/ObjectStore.h +++ b/src/os/ObjectStore.h @@ -722,7 +722,10 @@ public: sizeof(uint32_t) + //fadvise_flags sizeof(__u32); // tbl length } else { - return data.largest_data_off_in_tbl; + return data.largest_data_off_in_tbl + + sizeof(__u8) + // encode struct_v + sizeof(__u8) + // encode compat_v + sizeof(__u32); // encode len } } return 0; // none