<div dir="ltr">Hi<br><br>As the code,<br><br>The metadata space map use following structure which locates on a 4K page on disk<br>to carry the disk_index_entry.<br><br>The on-disk format of metadata spacemap<br><br>The metadata space's bitmap root is a<br>#define MAX_METADATA_BITMAPS 255<br>struct disk_metadata_index {<br>    __le32 csum;<br>    __le32 padding;<br>    __le64 blocknr;<br><br>    struct disk_index_entry index[MAX_METADATA_BITMAPS];<br>} __packed;<br><br>It will be read in when open the pool<br>sm_ll_open_metadata<br>  -> set ll callbacks<br>  -> ll->open_index<br>metadata_ll_open<br>---<br>    r = dm_tm_read_lock(ll->tm, ll->bitmap_root,<br>                &index_validator, &block);<br>    if (r)<br>        return r;<br><br>    memcpy(&ll->mi_le, dm_block_data(block), sizeof(ll->mi_le));<br>    dm_tm_unlock(ll->tm, block);<br><br>---<br>The size of struct disk_metadata_index is 4096.<br>The disk_index_entry's size is 8 bytes<br><br>4096 * 8 / 2 = 16K    blocks per page<br><br>metadata block = 4K<br><br>256 * 16K * 4K = 16G<br><br>Then it have a 6G limit on metadata blocks size.<br><br>But why does it use this 4K page instead of btree as the disk sm ?<br><br>The brb mechanism seem be able to avoid the nested block allocation<br>when do COW on the metadata sm btree.<br><br>Would anyone please help to tell why does it use this 4K page instead of a btree ?<br><br> <br>Thanks in advance<br>Jianchao<br><br><br></div>