From dce7013577fdb26e2bd62eab130a7da444225efd Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Thu, 8 Mar 2012 13:11:55 +0000 Subject: [PATCH] sb.flags_ was not being packed/unpacked correctly --- metadata_disk_structures.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metadata_disk_structures.cc b/metadata_disk_structures.cc index 239a3bb..8a0fe41 100644 --- a/metadata_disk_structures.cc +++ b/metadata_disk_structures.cc @@ -46,7 +46,7 @@ void superblock_traits::unpack(superblock_disk const &disk, superblock &value) { value.csum_ = to_cpu(disk.csum_); - value.flags_ = to_cpu(disk.csum_); + value.flags_ = to_cpu(disk.flags_); value.blocknr_ = to_cpu(disk.blocknr_); ::memcpy(value.uuid_, disk.uuid_, sizeof(value.uuid_)); @@ -79,7 +79,7 @@ void superblock_traits::pack(superblock const &value, superblock_disk &disk) { disk.csum_ = to_disk<__le32>(value.csum_); - disk.flags_ = to_disk<__le32>(value.csum_); + disk.flags_ = to_disk<__le32>(value.flags_); disk.blocknr_ = to_disk<__le64>(value.blocknr_); ::memcpy(disk.uuid_, value.uuid_, sizeof(disk.uuid_));