diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/fuse/cowfile.h | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/src/fuse/cowfile.h b/src/fuse/cowfile.h index ef429fb..4ca3d73 100644 --- a/src/fuse/cowfile.h +++ b/src/fuse/cowfile.h @@ -22,24 +22,26 @@ _Static_assert( ATOMIC_INT_LOCK_FREE == 2, "ATOMIC INT not lock free"); _Static_assert( ATOMIC_LONG_LOCK_FREE == 2, "ATOMIC LONG not lock free"); _Static_assert( ATOMIC_LLONG_LOCK_FREE == 2, "ATOMIC LLONG not lock free"); +_Static_assert( sizeof(atomic_uint_least64_t) == 8, "atomic_uint_least64_t not 8 byte"); +_Static_assert( sizeof(atomic_int_least64_t) == 8, "atomic_int_least64_t not 8 byte"); #define COW_METADATA_HEADER_SIZE 320 typedef struct cowfile_metadata_header { - uint64_t magicValue; // 8byte - atomic_uint_fast64_t imageSize; // 8byte - int32_t version; // 4byte - int32_t blocksize; // 4byte - uint64_t originalImageSize; // 8byte - uint64_t metaDataStart; // 8byte - int32_t bitfieldSize; // 4byte - int32_t nextL2; // 4byte - atomic_size_t metadataFileSize; // 8byte - atomic_size_t dataFileSize; // 8byte - uint64_t maxImageSize; // 8byte - uint64_t creationTime; // 8byte - char uuid[40]; // 40byte - char imageName[200]; // 200byte + uint64_t magicValue; // 8byte + atomic_uint_least64_t imageSize; // 8byte + int32_t version; // 4byte + int32_t blocksize; // 4byte + uint64_t originalImageSize; // 8byte + uint64_t metaDataStart; // 8byte + int32_t bitfieldSize; // 4byte + int32_t nextL2; // 4byte + atomic_uint_least64_t metadataFileSize; // 8byte + atomic_uint_least64_t dataFileSize; // 8byte + uint64_t maxImageSize; // 8byte + uint64_t creationTime; // 8byte + char uuid[40]; // 40byte + char imageName[200]; // 200byte } cowfile_metadata_header_t; _Static_assert( sizeof( cowfile_metadata_header_t ) == COW_METADATA_HEADER_SIZE, "cowfile_metadata_header is messed up" ); @@ -47,7 +49,7 @@ _Static_assert( #define COW_METADATA_METADATA_SIZE 64 typedef struct cow_block_metadata { - atomic_long offset; + atomic_int_least64_t offset; atomic_uint_least64_t timeChanged; atomic_uint_least64_t timeUploaded; atomic_char bitfield[40]; |
