Compare commits
1 Commits
90a76a5764
...
6e92d5071a
Author | SHA1 | Date |
---|---|---|
Tom Marshall | 6e92d5071a |
|
@ -112,6 +112,12 @@ cbd_format(const char* dev,
|
|||
((psize / pblk_size) <= 0xffff ? 2 :
|
||||
((psize / pblk_size) <= 0xffffffff ? 4 : 6));
|
||||
header.params.pbat_shift = pbatshift;
|
||||
if (pbat_len(&header.params) * pblk_size > PAGE_SIZE) {
|
||||
error("Physical block allocation table too large\n");
|
||||
}
|
||||
if (lba_len(&header.params) > pblk_size) {
|
||||
error("lba element size too large\n");
|
||||
}
|
||||
/* XXX: Initial estimate */
|
||||
header.params.lblk_per_zone = zone_data_len(&header.params) * (lsize / lblk_size) / (psize / pblk_size);
|
||||
printf(" initial estimate for lblk_per_zone: %lu\n", (unsigned long)header.params.lblk_per_zone);
|
||||
|
|
Loading…
Reference in New Issue