Use ui32 for block sizes
This commit is contained in:
@@ -27,13 +27,13 @@ struct blockstore_disk_t
|
|||||||
// Required write alignment and journal/metadata/data areas' location alignment
|
// Required write alignment and journal/metadata/data areas' location alignment
|
||||||
uint32_t disk_alignment = 4096;
|
uint32_t disk_alignment = 4096;
|
||||||
// Journal block size - minimum_io_size of the journal device is the best choice
|
// Journal block size - minimum_io_size of the journal device is the best choice
|
||||||
uint64_t journal_block_size = 4096;
|
uint32_t journal_block_size = 4096;
|
||||||
// Metadata block size - minimum_io_size of the metadata device is the best choice
|
// Metadata block size - minimum_io_size of the metadata device is the best choice
|
||||||
uint64_t meta_block_size = 4096;
|
uint32_t meta_block_size = 4096;
|
||||||
// Target free space in metadata blocks
|
// Target free space in metadata blocks
|
||||||
uint32_t meta_block_target_free_space = 800;
|
uint32_t meta_block_target_free_space = 800;
|
||||||
// Sparse write tracking granularity. 4 KB is a good choice. Must be a multiple of disk_alignment
|
// Sparse write tracking granularity. 4 KB is a good choice. Must be a multiple of disk_alignment
|
||||||
uint64_t bitmap_granularity = 4096;
|
uint32_t bitmap_granularity = 4096;
|
||||||
// Data checksum type, BLOCKSTORE_CSUM_NONE or BLOCKSTORE_CSUM_CRC32C
|
// Data checksum type, BLOCKSTORE_CSUM_NONE or BLOCKSTORE_CSUM_CRC32C
|
||||||
uint32_t data_csum_type = BLOCKSTORE_CSUM_NONE;
|
uint32_t data_csum_type = BLOCKSTORE_CSUM_NONE;
|
||||||
// Checksum block size, must be a multiple of bitmap_granularity
|
// Checksum block size, must be a multiple of bitmap_granularity
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ uint64_t blockstore_heap_t::load_blocks(uint64_t disk_offset, uint64_t size, uin
|
|||||||
}
|
}
|
||||||
if (region_marker > dsk->meta_block_size-block_offset)
|
if (region_marker > dsk->meta_block_size-block_offset)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Warning: Entry is too large in metadata block %u at %u (%u > max %ju bytes), skipping the rest of block\n",
|
fprintf(stderr, "Warning: Entry is too large in metadata block %u at %u (%u > max %u bytes), skipping the rest of block\n",
|
||||||
block_num, block_offset, region_marker, dsk->meta_block_size-block_offset);
|
block_num, block_offset, region_marker, dsk->meta_block_size-block_offset);
|
||||||
if (fail_on_warn)
|
if (fail_on_warn)
|
||||||
abort();
|
abort();
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ resume_1:
|
|||||||
printf(
|
printf(
|
||||||
"Configuration stored in metadata superblock"
|
"Configuration stored in metadata superblock"
|
||||||
" (meta_block_size=%u, data_block_size=%u, bitmap_granularity=%u, data_csum_type=%u, csum_block_size=%u)"
|
" (meta_block_size=%u, data_block_size=%u, bitmap_granularity=%u, data_csum_type=%u, csum_block_size=%u)"
|
||||||
" differs from OSD configuration (%ju/%u/%ju, %u/%u).\n",
|
" differs from OSD configuration (%u/%u/%u, %u/%u).\n",
|
||||||
hdr->meta_block_size, hdr->data_block_size, hdr->bitmap_granularity,
|
hdr->meta_block_size, hdr->data_block_size, hdr->bitmap_granularity,
|
||||||
hdr->data_csum_type, hdr->csum_block_size,
|
hdr->data_csum_type, hdr->csum_block_size,
|
||||||
bs->dsk.meta_block_size, bs->dsk.data_block_size, bs->dsk.bitmap_granularity,
|
bs->dsk.meta_block_size, bs->dsk.data_block_size, bs->dsk.bitmap_granularity,
|
||||||
|
|||||||
Reference in New Issue
Block a user