Fix the unit of superblock::metadata_block_size_ to be sector-based

This commit is contained in:
Ming-Hung Tsai 2015-11-27 23:38:37 +08:00
parent 03590d3c91
commit 856bd95d8e

View File

@ -109,7 +109,7 @@ metadata::metadata(std::string const &dev_path, open_type ot,
sb_.data_mapping_root_ = mappings_->get_root(); sb_.data_mapping_root_ = mappings_->get_root();
sb_.device_details_root_ = details_->get_root(); sb_.device_details_root_ = details_->get_root();
sb_.data_block_size_ = data_block_size; sb_.data_block_size_ = data_block_size;
sb_.metadata_block_size_ = MD_BLOCK_SIZE; sb_.metadata_block_size_ = MD_BLOCK_SIZE >> SECTOR_SHIFT;
sb_.metadata_nr_blocks_ = tm_->get_bm()->get_nr_blocks(); sb_.metadata_nr_blocks_ = tm_->get_bm()->get_nr_blocks();
break; break;
@ -177,7 +177,7 @@ metadata::metadata(block_manager<>::ptr bm, open_type ot,
sb_.data_mapping_root_ = mappings_->get_root(); sb_.data_mapping_root_ = mappings_->get_root();
sb_.device_details_root_ = details_->get_root(); sb_.device_details_root_ = details_->get_root();
sb_.data_block_size_ = data_block_size; sb_.data_block_size_ = data_block_size;
sb_.metadata_block_size_ = MD_BLOCK_SIZE; sb_.metadata_block_size_ = MD_BLOCK_SIZE >> SECTOR_SHIFT;
sb_.metadata_nr_blocks_ = tm_->get_bm()->get_nr_blocks(); sb_.metadata_nr_blocks_ = tm_->get_bm()->get_nr_blocks();
break; break;