Replaced mleafweight with explicit 1 << mdir_bits
The mleafweight naming is... not great... Renaming mleaf_bits -> mdir_bits and replacing mleafweight with explicit shifts of 1 << mdir_bits seems to get the job done without introducing a new and potentially confusing name. This was a lesson learned from recycle_bits. Sometimes more helpers just makes code less, not more, readable.
This commit is contained in:
@@ -4944,21 +4944,17 @@ static int lfsr_btree_traverse(lfs_t *lfs, const lfsr_btree_t *btree,
|
||||
|
||||
/// metadata-id things ///
|
||||
|
||||
static inline lfsr_mid_t lfsr_mleafweight(const lfs_t *lfs) {
|
||||
return 1 << lfs->mleaf_bits;
|
||||
}
|
||||
|
||||
#define LFSR_MID(_lfs, _bid, _rid) \
|
||||
(((_bid) & ~((1 << (_lfs)->mleaf_bits)-1)) + (_rid))
|
||||
(((_bid) & ~((1 << (_lfs)->mdir_bits)-1)) + (_rid))
|
||||
|
||||
static inline lfsr_sbid_t lfsr_mid_bid(const lfs_t *lfs, lfsr_smid_t mid) {
|
||||
return mid | ((1 << lfs->mleaf_bits) - 1);
|
||||
return mid | ((1 << lfs->mdir_bits) - 1);
|
||||
}
|
||||
|
||||
static inline lfsr_srid_t lfsr_mid_rid(const lfs_t *lfs, lfsr_smid_t mid) {
|
||||
// bit of a strange mapping, but we want to preserve mid=-1 => rid=-1
|
||||
return (mid >> (8*sizeof(lfsr_smid_t)-1))
|
||||
| (mid & ((1 << lfs->mleaf_bits) - 1));
|
||||
| (mid & ((1 << lfs->mdir_bits) - 1));
|
||||
}
|
||||
|
||||
|
||||
@@ -5438,7 +5434,7 @@ static int lfsr_data_readgrm(lfs_t *lfs, lfsr_data_t *data,
|
||||
}
|
||||
LFS_ASSERT((lfsr_mid_t)grm->mids[i] < lfs_max32(
|
||||
lfsr_mtree_weight(&lfs->mtree),
|
||||
lfsr_mleafweight(lfs)));
|
||||
1 << lfs->mdir_bits));
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -5783,7 +5779,7 @@ static int lfsr_mtree_lookup(lfs_t *lfs, const lfsr_mtree_t *mtree,
|
||||
// looking up mroot?
|
||||
if (lfsr_mtree_isnull(mtree)) {
|
||||
LFS_ASSERT(mid >= 0);
|
||||
LFS_ASSERT(mid < (lfsr_smid_t)lfsr_mleafweight(lfs));
|
||||
LFS_ASSERT(mid < (1 << lfs->mdir_bits));
|
||||
mdir_->mid = mid;
|
||||
mdir_->rbyd = lfs->mroot.rbyd;
|
||||
return 0;
|
||||
@@ -5791,7 +5787,7 @@ static int lfsr_mtree_lookup(lfs_t *lfs, const lfsr_mtree_t *mtree,
|
||||
// looking up direct mdir?
|
||||
} else if (lfsr_mtree_ismptr(mtree)) {
|
||||
LFS_ASSERT(mid >= 0);
|
||||
LFS_ASSERT(mid < (lfsr_smid_t)lfsr_mleafweight(lfs));
|
||||
LFS_ASSERT(mid < (1 << lfs->mdir_bits));
|
||||
|
||||
// fetch mdir
|
||||
return lfsr_mdir_fetch(lfs, mdir_, mid, &mtree->u.mptr.mptr);
|
||||
@@ -5837,14 +5833,14 @@ static int lfsr_mtree_seek(lfs_t *lfs, const lfsr_mtree_t *mtree,
|
||||
// we don't know how many rids are in each mdir until we fetch
|
||||
while (rid >= (lfsr_srid_t)mdir->rbyd.weight) {
|
||||
// end of mtree?
|
||||
if (bid+lfsr_mleafweight(lfs) >= lfsr_mtree_weight(mtree)) {
|
||||
if (bid+(1 << lfs->mdir_bits) >= lfsr_mtree_weight(mtree)) {
|
||||
// if we hit the end of the mtree, park the mdir so all future
|
||||
// seeks return noent
|
||||
mdir->mid = bid + lfsr_mleafweight(lfs);
|
||||
mdir->mid = bid + (1 << lfs->mdir_bits);
|
||||
return LFS_ERR_NOENT;
|
||||
}
|
||||
|
||||
bid += lfsr_mleafweight(lfs);
|
||||
bid += (1 << lfs->mdir_bits);
|
||||
rid -= mdir->rbyd.weight;
|
||||
int err = lfsr_mtree_lookup(lfs, mtree, bid, mdir);
|
||||
if (err) {
|
||||
@@ -6728,13 +6724,13 @@ static int lfsr_mdir_commit(lfs_t *lfs, lfsr_mdir_t *mdir,
|
||||
}
|
||||
|
||||
// adjust our sibling's mid after committing attrs
|
||||
mdir_[1].mid += lfsr_mleafweight(lfs);
|
||||
mdir_[1].mid += (1 << lfs->mdir_bits);
|
||||
|
||||
LFS_DEBUG("Splitting mdir %"PRId32" "
|
||||
"0x{%"PRIx32",%"PRIx32"} "
|
||||
"-> 0x{%"PRIx32",%"PRIx32"}, "
|
||||
"0x{%"PRIx32",%"PRIx32"}",
|
||||
mdir->mid >> lfs->mleaf_bits,
|
||||
mdir->mid >> lfs->mdir_bits,
|
||||
mdir->rbyd.blocks[0], mdir->rbyd.blocks[1],
|
||||
mdir_[0].rbyd.blocks[0], mdir_[0].rbyd.blocks[1],
|
||||
mdir_[1].rbyd.blocks[0], mdir_[1].rbyd.blocks[1]);
|
||||
@@ -6746,11 +6742,11 @@ static int lfsr_mdir_commit(lfs_t *lfs, lfsr_mdir_t *mdir,
|
||||
if (mdir_[0].rbyd.weight == 0 && mdir_[1].rbyd.weight == 0) {
|
||||
LFS_DEBUG("Dropping mdir %"PRId32" "
|
||||
"0x{%"PRIx32",%"PRIx32"}",
|
||||
mdir_[0].mid >> lfs->mleaf_bits,
|
||||
mdir_[0].mid >> lfs->mdir_bits,
|
||||
mdir_[0].rbyd.blocks[0], mdir_[0].rbyd.blocks[1]);
|
||||
LFS_DEBUG("Dropping mdir %"PRId32" "
|
||||
"0x{%"PRIx32",%"PRIx32"}",
|
||||
mdir_[1].mid >> lfs->mleaf_bits,
|
||||
mdir_[1].mid >> lfs->mdir_bits,
|
||||
mdir_[1].rbyd.blocks[0], mdir_[1].rbyd.blocks[1]);
|
||||
goto drop;
|
||||
|
||||
@@ -6758,7 +6754,7 @@ static int lfsr_mdir_commit(lfs_t *lfs, lfsr_mdir_t *mdir,
|
||||
} else if (mdir_[0].rbyd.weight == 0) {
|
||||
LFS_DEBUG("Dropping mdir %"PRId32" "
|
||||
"0x{%"PRIx32",%"PRIx32"}",
|
||||
mdir_[0].mid >> lfs->mleaf_bits,
|
||||
mdir_[0].mid >> lfs->mdir_bits,
|
||||
mdir_[0].rbyd.blocks[0], mdir_[0].rbyd.blocks[1]);
|
||||
mdir_[0].rbyd = mdir_[1].rbyd;
|
||||
goto relocate;
|
||||
@@ -6767,13 +6763,13 @@ static int lfsr_mdir_commit(lfs_t *lfs, lfsr_mdir_t *mdir,
|
||||
} else if (mdir_[1].rbyd.weight == 0) {
|
||||
LFS_DEBUG("Dropping mdir %"PRId32" "
|
||||
"0x{%"PRIx32",%"PRIx32"}",
|
||||
mdir_[1].mid >> lfs->mleaf_bits,
|
||||
mdir_[1].mid >> lfs->mdir_bits,
|
||||
mdir_[1].rbyd.blocks[0], mdir_[1].rbyd.blocks[1]);
|
||||
goto relocate;
|
||||
}
|
||||
|
||||
// no siblings reduced to zero, update our mtree
|
||||
mdelta = +lfsr_mleafweight(lfs);
|
||||
mdelta = +(1 << lfs->mdir_bits);
|
||||
|
||||
// lookup first name in sibling to use as the split name
|
||||
//
|
||||
@@ -6798,12 +6794,12 @@ static int lfsr_mdir_commit(lfs_t *lfs, lfsr_mdir_t *mdir,
|
||||
err = lfsr_btree_commit(lfs, &mtree_.u.btree,
|
||||
0, LFSR_ATTRS(
|
||||
LFSR_ATTR(
|
||||
LFSR_TAG_MDIR, +lfsr_mleafweight(lfs),
|
||||
LFSR_TAG_MDIR, +(1 << lfs->mdir_bits),
|
||||
LFSR_DATA_MPTR_(
|
||||
lfsr_mdir_mptr(&mdir_[0]),
|
||||
&mdir_buf[0*LFSR_MPTR_DSIZE])),
|
||||
LFSR_ATTR_CAT_(
|
||||
LFSR_TAG_NAME, +lfsr_mleafweight(lfs),
|
||||
LFSR_TAG_NAME, +(1 << lfs->mdir_bits),
|
||||
&split_data, 1),
|
||||
LFSR_ATTR(
|
||||
LFSR_TAG_MDIR, 0,
|
||||
@@ -6828,7 +6824,7 @@ static int lfsr_mdir_commit(lfs_t *lfs, lfsr_mdir_t *mdir,
|
||||
lfsr_mdir_mptr(&mdir_[0]),
|
||||
&mdir_buf[0*LFSR_MPTR_DSIZE])),
|
||||
LFSR_ATTR_CAT_(
|
||||
LFSR_TAG_NAME, +lfsr_mleafweight(lfs),
|
||||
LFSR_TAG_NAME, +(1 << lfs->mdir_bits),
|
||||
&split_data, 1),
|
||||
LFSR_ATTR(
|
||||
LFSR_TAG_MDIR, 0,
|
||||
@@ -6844,7 +6840,7 @@ static int lfsr_mdir_commit(lfs_t *lfs, lfsr_mdir_t *mdir,
|
||||
} else if (err == LFS_ERR_NOENT) {
|
||||
LFS_DEBUG("Dropping mdir %"PRId32" "
|
||||
"0x{%"PRIx32",%"PRIx32"}",
|
||||
mdir->mid >> lfs->mleaf_bits,
|
||||
mdir->mid >> lfs->mdir_bits,
|
||||
mdir->rbyd.blocks[0], mdir->rbyd.blocks[1]);
|
||||
|
||||
// consume gstate so we don't lose any info
|
||||
@@ -6854,7 +6850,7 @@ static int lfsr_mdir_commit(lfs_t *lfs, lfsr_mdir_t *mdir,
|
||||
}
|
||||
|
||||
drop:;
|
||||
mdelta = -lfsr_mleafweight(lfs);
|
||||
mdelta = -(1 << lfs->mdir_bits);
|
||||
|
||||
// we should never drop a direct mdir, because we always have our
|
||||
// root bookmark
|
||||
@@ -6867,7 +6863,7 @@ static int lfsr_mdir_commit(lfs_t *lfs, lfsr_mdir_t *mdir,
|
||||
err = lfsr_btree_commit(lfs, &mtree_.u.btree,
|
||||
lfsr_mid_bid(lfs, mdir->mid), LFSR_ATTRS(
|
||||
LFSR_ATTR(
|
||||
LFSR_TAG_RM, -lfsr_mleafweight(lfs),
|
||||
LFSR_TAG_RM, -(1 << lfs->mdir_bits),
|
||||
LFSR_DATA_NULL())));
|
||||
if (err) {
|
||||
goto failed;
|
||||
@@ -6878,7 +6874,7 @@ static int lfsr_mdir_commit(lfs_t *lfs, lfsr_mdir_t *mdir,
|
||||
&& lfsr_mdir_cmp(mdir, &lfs->mroot) != 0) {
|
||||
LFS_DEBUG("Relocating mdir %"PRId32" "
|
||||
"0x{%"PRIx32",%"PRIx32"} -> 0x{%"PRIx32",%"PRIx32"}",
|
||||
mdir->mid >> lfs->mleaf_bits,
|
||||
mdir->mid >> lfs->mdir_bits,
|
||||
mdir->rbyd.blocks[0], mdir->rbyd.blocks[1],
|
||||
mdir_[0].rbyd.blocks[0], mdir_[0].rbyd.blocks[1]);
|
||||
|
||||
@@ -6887,7 +6883,7 @@ static int lfsr_mdir_commit(lfs_t *lfs, lfsr_mdir_t *mdir,
|
||||
if (lfsr_mtree_ismptr(&lfs->mtree)) {
|
||||
mtree_ = LFSR_MTREE_MPTR(
|
||||
*lfsr_mdir_mptr(&mdir_[0]),
|
||||
lfsr_mleafweight(lfs));
|
||||
1 << lfs->mdir_bits);
|
||||
|
||||
} else {
|
||||
// mark as unerased in case of failure
|
||||
@@ -6928,7 +6924,7 @@ static int lfsr_mdir_commit(lfs_t *lfs, lfsr_mdir_t *mdir,
|
||||
if (lfsr_mid_rid(lfs, lfs->grm.mids[j])
|
||||
>= (lfsr_srid_t)mdir_[0].rbyd.weight) {
|
||||
lfs->grm.mids[j]
|
||||
+= lfsr_mleafweight(lfs) - mdir_[0].rbyd.weight;
|
||||
+= (1 << lfs->mdir_bits) - mdir_[0].rbyd.weight;
|
||||
}
|
||||
} else if (lfs->grm.mids[j] > mdir->mid) {
|
||||
lfs->grm.mids[j] += mdelta;
|
||||
@@ -7108,7 +7104,7 @@ static int lfsr_mdir_commit(lfs_t *lfs, lfsr_mdir_t *mdir,
|
||||
if (mdelta > 0
|
||||
&& lfsr_mid_rid(lfs, o->mdir.mid)
|
||||
>= (lfsr_srid_t)mdir_[0].rbyd.weight) {
|
||||
o->mdir.mid += lfsr_mleafweight(lfs) - mdir_[0].rbyd.weight;
|
||||
o->mdir.mid += (1 << lfs->mdir_bits) - mdir_[0].rbyd.weight;
|
||||
o->mdir.rbyd = mdir_[1].rbyd;
|
||||
} else {
|
||||
o->mdir.rbyd = mdir_[0].rbyd;
|
||||
@@ -7123,7 +7119,7 @@ static int lfsr_mdir_commit(lfs_t *lfs, lfsr_mdir_t *mdir,
|
||||
if (mdelta > 0
|
||||
&& lfsr_mid_rid(lfs, mdir->mid)
|
||||
>= (lfsr_srid_t)mdir_[0].rbyd.weight) {
|
||||
mdir->mid += lfsr_mleafweight(lfs) - mdir_[0].rbyd.weight;
|
||||
mdir->mid += (1 << lfs->mdir_bits) - mdir_[0].rbyd.weight;
|
||||
mdir->rbyd = mdir_[1].rbyd;
|
||||
} else {
|
||||
mdir->rbyd = mdir_[0].rbyd;
|
||||
@@ -7231,7 +7227,7 @@ static int lfsr_mtree_namelookup(lfs_t *lfs, const lfsr_mtree_t *mtree,
|
||||
return cmp;
|
||||
}
|
||||
LFS_ASSERT(tag == LFSR_TAG_MDIR);
|
||||
LFS_ASSERT(weight == lfsr_mleafweight(lfs));
|
||||
LFS_ASSERT(weight == (1U << lfs->mdir_bits));
|
||||
|
||||
// decode mdir
|
||||
lfsr_mptr_t mptr;
|
||||
@@ -7553,9 +7549,7 @@ static int lfsr_traversal_read(lfs_t *lfs, lfsr_traversal_t *t,
|
||||
mptr.blocks[1]);
|
||||
return LFS_ERR_CORRUPT;
|
||||
}
|
||||
if (t->u.mtortoise.step
|
||||
// TODO why cast?
|
||||
== ((lfs_block_t)1 << t->u.mtortoise.power)) {
|
||||
if (t->u.mtortoise.step == (1U << t->u.mtortoise.power)) {
|
||||
t->u.mtortoise.mptr = mptr;
|
||||
t->u.mtortoise.step = 0;
|
||||
t->u.mtortoise.power += 1;
|
||||
@@ -8362,7 +8356,7 @@ static int lfsr_mountinited(lfs_t *lfs) {
|
||||
if (lfsr_mtree_isnull(&lfs->mtree)) {
|
||||
lfs->mtree = LFSR_MTREE_MPTR(
|
||||
*lfsr_mdir_mptr(&tinfo.u.mdir),
|
||||
lfsr_mleafweight(lfs));
|
||||
(1 << lfs->mdir_bits));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8390,7 +8384,7 @@ static int lfsr_mountinited(lfs_t *lfs) {
|
||||
LFS_DEBUG("Found orphaned file "
|
||||
"%"PRId32".%"PRId32,
|
||||
lfsr_mid_bid(lfs, tinfo.u.mdir.mid)
|
||||
>> lfs->mleaf_bits,
|
||||
>> lfs->mdir_bits,
|
||||
rid);
|
||||
lfs->hasorphans = true;
|
||||
}
|
||||
@@ -8434,13 +8428,13 @@ static int lfsr_mountinited(lfs_t *lfs) {
|
||||
if (lfsr_grm_count(&lfs->grm) == 2) {
|
||||
LFS_DEBUG("Found pending grm "
|
||||
"%"PRId32".%"PRId32" %"PRId32".%"PRId32,
|
||||
lfsr_mid_bid(lfs, lfs->grm.mids[0]) >> lfs->mleaf_bits,
|
||||
lfsr_mid_bid(lfs, lfs->grm.mids[0]) >> lfs->mdir_bits,
|
||||
lfsr_mid_rid(lfs, lfs->grm.mids[0]),
|
||||
lfsr_mid_bid(lfs, lfs->grm.mids[1]) >> lfs->mleaf_bits,
|
||||
lfsr_mid_bid(lfs, lfs->grm.mids[1]) >> lfs->mdir_bits,
|
||||
lfsr_mid_rid(lfs, lfs->grm.mids[1]));
|
||||
} else if (lfsr_grm_count(&lfs->grm) == 1) {
|
||||
LFS_DEBUG("Found pending grm %"PRId32".%"PRId32,
|
||||
lfsr_mid_bid(lfs, lfs->grm.mids[0]) >> lfs->mleaf_bits,
|
||||
lfsr_mid_bid(lfs, lfs->grm.mids[0]) >> lfs->mdir_bits,
|
||||
lfsr_mid_rid(lfs, lfs->grm.mids[0]));
|
||||
}
|
||||
}
|
||||
@@ -8540,8 +8534,8 @@ int lfsr_mount(lfs_t *lfs, const struct lfs_config *cfg) {
|
||||
lfs->mroot.rbyd.blocks[0],
|
||||
lfs->mroot.rbyd.blocks[1],
|
||||
lfsr_rbyd_trunk(&lfs->mroot.rbyd),
|
||||
lfsr_mtree_weight(&lfs->mtree) / lfsr_mleafweight(lfs),
|
||||
lfsr_mleafweight(lfs));
|
||||
lfsr_mtree_weight(&lfs->mtree) >> lfs->mdir_bits,
|
||||
1 << lfs->mdir_bits);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -8735,7 +8729,7 @@ static int lfsr_fs_fixgrm(lfs_t *lfs) {
|
||||
lfsr_mdir_t mdir;
|
||||
LFS_ASSERT(lfs->grm.mids[0] < lfs_smax32(
|
||||
lfsr_mtree_weight(&lfs->mtree),
|
||||
lfsr_mleafweight(lfs)));
|
||||
1 << lfs->mdir_bits));
|
||||
int err = lfsr_mtree_lookup(lfs, &lfs->mtree, lfs->grm.mids[0],
|
||||
&mdir);
|
||||
if (err) {
|
||||
@@ -8830,13 +8824,13 @@ static int lfsr_fs_preparemutation(lfs_t *lfs) {
|
||||
if (lfsr_grm_count(&lfs->grm) == 2) {
|
||||
LFS_DEBUG("Fixing grm "
|
||||
"%"PRId32".%"PRId32" %"PRId32".%"PRId32"...",
|
||||
lfsr_mid_bid(lfs, lfs->grm.mids[0]) >> lfs->mleaf_bits,
|
||||
lfsr_mid_bid(lfs, lfs->grm.mids[0]) >> lfs->mdir_bits,
|
||||
lfsr_mid_rid(lfs, lfs->grm.mids[0]),
|
||||
lfsr_mid_bid(lfs, lfs->grm.mids[1]) >> lfs->mleaf_bits,
|
||||
lfsr_mid_bid(lfs, lfs->grm.mids[1]) >> lfs->mdir_bits,
|
||||
lfsr_mid_rid(lfs, lfs->grm.mids[1]));
|
||||
} else {
|
||||
LFS_DEBUG("Fixing grm %"PRId32".%"PRId32,
|
||||
lfsr_mid_bid(lfs, lfs->grm.mids[0]) >> lfs->mleaf_bits,
|
||||
lfsr_mid_bid(lfs, lfs->grm.mids[0]) >> lfs->mdir_bits,
|
||||
lfsr_mid_rid(lfs, lfs->grm.mids[0]));
|
||||
}
|
||||
inconsistent = true;
|
||||
@@ -15452,7 +15446,7 @@ static int lfs_init(lfs_t *lfs, const struct lfs_config *cfg) {
|
||||
// metadata entries per block. But we intentionally don't leverage this
|
||||
// to maintain compatibility with a theoretical perfect implementation.
|
||||
//
|
||||
lfs->mleaf_bits = lfs_nlog2(lfs->cfg->block_size/8);
|
||||
lfs->mdir_bits = lfs_nlog2(lfs->cfg->block_size/8);
|
||||
|
||||
// zero linked-list of opened mdirs
|
||||
lfs->opened = NULL;
|
||||
|
||||
@@ -585,7 +585,7 @@ typedef struct lfs {
|
||||
|
||||
int8_t recycle_bits;
|
||||
uint8_t attr_estimate;
|
||||
uint8_t mleaf_bits;
|
||||
uint8_t mdir_bits;
|
||||
|
||||
// linked-list of opened mdirs
|
||||
lfsr_opened_t *opened;
|
||||
|
||||
+127
-127
@@ -175,7 +175,7 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, NULL, 0) => 0;
|
||||
|
||||
// assert mdirs were unininlined
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 1*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (1 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -195,7 +195,7 @@ code = '''
|
||||
lfsr_mount(&lfs, CFG) => 0;
|
||||
|
||||
// assert mdirs were unininlined
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 1*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (1 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -247,18 +247,18 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, NULL, 0) => 0;
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'a');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 1*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (1 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -269,18 +269,18 @@ code = '''
|
||||
lfsr_mount(&lfs, CFG) => 0;
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'a');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 1*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (1 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -323,7 +323,7 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, NULL, 0) => 0;
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -340,24 +340,24 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &mdir, NULL, 0) => 0;
|
||||
|
||||
// assert mdir was split correctly
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 3*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (3 << lfs.mdir_bits));
|
||||
// assert mroot still has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'a');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 1*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (1 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'b');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 2*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (2 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -368,24 +368,24 @@ code = '''
|
||||
lfsr_mount(&lfs, CFG) => 0;
|
||||
|
||||
// assert mdir was split correctly
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 3*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (3 << lfs.mdir_bits));
|
||||
// assert mroot still has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'a');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 1*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (1 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'b');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 2*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (2 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -608,7 +608,7 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, NULL, 0) => 0;
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -621,12 +621,12 @@ code = '''
|
||||
assert(mdir.rbyd.weight == 0);
|
||||
|
||||
// assert mdir was dropped
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 1*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (1 << lfs.mdir_bits));
|
||||
// assert mroot still has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -637,12 +637,12 @@ code = '''
|
||||
lfsr_mount(&lfs, CFG) => 0;
|
||||
|
||||
// assert mdir was dropped
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 1*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (1 << lfs.mdir_bits));
|
||||
// assert mroot still has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -685,7 +685,7 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, NULL, 0) => 0;
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -700,12 +700,12 @@ code = '''
|
||||
assert(mdir.rbyd.weight == 0);
|
||||
|
||||
// assert mdir was dropped
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 1*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (1 << lfs.mdir_bits));
|
||||
// assert mroot still has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -716,12 +716,12 @@ code = '''
|
||||
lfsr_mount(&lfs, CFG) => 0;
|
||||
|
||||
// assert mdir was dropped
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 1*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (1 << lfs.mdir_bits));
|
||||
// assert mroot still has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -771,12 +771,12 @@ code = '''
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
|
||||
// assert split/drop worked out
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 1*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (1 << lfs.mdir_bits));
|
||||
// assert mroot still has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -787,12 +787,12 @@ code = '''
|
||||
lfsr_mount(&lfs, CFG) => 0;
|
||||
|
||||
// assert mdir was dropped
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 1*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (1 << lfs.mdir_bits));
|
||||
// assert mroot still has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -835,7 +835,7 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, NULL, 0) => 0;
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -858,18 +858,18 @@ code = '''
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
|
||||
// assert split/drop worked out
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot still has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'a');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 1*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (1 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -880,18 +880,18 @@ code = '''
|
||||
lfsr_mount(&lfs, CFG) => 0;
|
||||
|
||||
// assert split/drop worked out
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot still has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'a');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 1*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (1 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -934,7 +934,7 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, NULL, 0) => 0;
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -957,18 +957,18 @@ code = '''
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
|
||||
// assert split/drop worked out
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot still has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'a');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 1*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (1 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -979,18 +979,18 @@ code = '''
|
||||
lfsr_mount(&lfs, CFG) => 0;
|
||||
|
||||
// assert split/drop worked out
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot still has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'a');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 1*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (1 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -1162,7 +1162,7 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, NULL, 0) => 0;
|
||||
|
||||
// assert mdirs were unininlined
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 1*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (1 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -1179,7 +1179,7 @@ code = '''
|
||||
assert(lfsr_mdir_cmp(&old_mdir, &mdir) != 0);
|
||||
|
||||
// assert mdirs were unininlined
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 1*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (1 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -1199,7 +1199,7 @@ code = '''
|
||||
lfsr_mount(&lfs, CFG) => 0;
|
||||
|
||||
// assert mdirs were unininlined
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 1*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (1 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -1253,7 +1253,7 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, NULL, 0) => 0;
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -1272,18 +1272,18 @@ code = '''
|
||||
assert(lfsr_mdir_cmp(&old_mdir, &mdir) != 0);
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'a');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 1*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (1 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -1294,18 +1294,18 @@ code = '''
|
||||
lfsr_mount(&lfs, CFG) => 0;
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'a');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 1*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (1 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -1350,7 +1350,7 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, NULL, 0) => 0;
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -1369,18 +1369,18 @@ code = '''
|
||||
assert(lfsr_mdir_cmp(&old_mdir, &mdir) != 0);
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'a');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 1*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (1 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -1391,18 +1391,18 @@ code = '''
|
||||
lfsr_mount(&lfs, CFG) => 0;
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'a');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 1*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (1 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -1445,7 +1445,7 @@ code = '''
|
||||
assert(lfsr_mdir_cmp(&old_mroot, &lfs.mroot) != 0);
|
||||
|
||||
// assert that our entry is still in the mroot
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -1456,7 +1456,7 @@ code = '''
|
||||
lfsr_mount(&lfs, CFG) => 0;
|
||||
|
||||
// assert that our attr is still in the mroot
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -1516,7 +1516,7 @@ code = '''
|
||||
assert(lfsr_mdir_cmp(&old_mroot, &lfs.mroot) != 0);
|
||||
|
||||
// assert that our attr is still in the mroot
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -1527,7 +1527,7 @@ code = '''
|
||||
lfsr_mount(&lfs, CFG) => 0;
|
||||
|
||||
// assert that our attr is still in the mroot
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -1579,7 +1579,7 @@ code = '''
|
||||
assert(lfsr_mdir_cmp(&old_mroot, &lfs.mroot) != 0);
|
||||
|
||||
// assert that our entry is still in the mroot
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -1590,7 +1590,7 @@ code = '''
|
||||
lfsr_mount(&lfs, CFG) => 0;
|
||||
|
||||
// assert that our attr is still in the mroot
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -1635,7 +1635,7 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, NULL, 0) => 0;
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -1659,18 +1659,18 @@ code = '''
|
||||
assert(lfsr_mdir_cmp(&old_mroot, &lfs.mroot) != 0);
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'a');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 1*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (1 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -1681,18 +1681,18 @@ code = '''
|
||||
lfsr_mount(&lfs, CFG) => 0;
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'a');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 1*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (1 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -1737,7 +1737,7 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, NULL, 0) => 0;
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -1766,24 +1766,24 @@ code = '''
|
||||
assert(lfsr_mdir_cmp(&old_mroot, &lfs.mroot) != 0);
|
||||
|
||||
// assert mdir was split correctly
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 3*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (3 << lfs.mdir_bits));
|
||||
// assert mroot still has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'a');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 1*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (1 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'b');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 2*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (2 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -1794,24 +1794,24 @@ code = '''
|
||||
lfsr_mount(&lfs, CFG) => 0;
|
||||
|
||||
// assert mdir was split correctly
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 3*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (3 << lfs.mdir_bits));
|
||||
// assert mroot still has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'a');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 1*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (1 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'b');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 2*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (2 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -1856,7 +1856,7 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, NULL, 0) => 0;
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -1880,12 +1880,12 @@ code = '''
|
||||
assert(lfsr_mdir_cmp(&old_mroot, &lfs.mroot) != 0);
|
||||
|
||||
// assert mdir was dropped
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 1*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (1 << lfs.mdir_bits));
|
||||
// assert mroot still has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -1896,12 +1896,12 @@ code = '''
|
||||
lfsr_mount(&lfs, CFG) => 0;
|
||||
|
||||
// assert mdir was dropped
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 1*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (1 << lfs.mdir_bits));
|
||||
// assert mroot still has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -1948,7 +1948,7 @@ code = '''
|
||||
assert(lfsr_mdir_cmp(&old_mroot, &lfs.mroot) != 0);
|
||||
|
||||
// assert mdirs were unininlined
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 1*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (1 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -1968,7 +1968,7 @@ code = '''
|
||||
lfsr_mount(&lfs, CFG) => 0;
|
||||
|
||||
// assert mdirs were unininlined
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 1*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (1 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -2030,18 +2030,18 @@ code = '''
|
||||
assert(lfsr_mdir_cmp(&old_mroot, &lfs.mroot) != 0);
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'a');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 1*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (1 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -2052,18 +2052,18 @@ code = '''
|
||||
lfsr_mount(&lfs, CFG) => 0;
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'a');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 1*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (1 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -2445,7 +2445,7 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, NULL, 0) => 0;
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -2530,7 +2530,7 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &mdir, NULL, 0) => 0;
|
||||
|
||||
// assert mdir was split correctly
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 3*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (3 << lfs.mdir_bits));
|
||||
// assert mroot still has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -2661,7 +2661,7 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, NULL, 0) => 0;
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -2750,7 +2750,7 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, NULL, 0) => 0;
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -2849,7 +2849,7 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &mdir, NULL, 0) => 0;
|
||||
|
||||
// assert mdir was split correctly
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 3*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (3 << lfs.mdir_bits));
|
||||
// assert mroot still has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -2866,7 +2866,7 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &mdir, NULL, 0) => 0;
|
||||
|
||||
// assert mdir was split correctly
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 4*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (4 << lfs.mdir_bits));
|
||||
// assert mroot still has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -2951,7 +2951,7 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &mdir, NULL, 0) => 0;
|
||||
|
||||
// assert mdir was split correctly
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 3*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (3 << lfs.mdir_bits));
|
||||
// assert mroot still has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -2961,7 +2961,7 @@ code = '''
|
||||
assert(mdir.rbyd.weight == 0);
|
||||
|
||||
// assert mdir was dropped correctly
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot still has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -3115,7 +3115,7 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, NULL, 0) => 0;
|
||||
|
||||
// assert mdirs were unininlined
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 1*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (1 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -3178,7 +3178,7 @@ code = '''
|
||||
// and the tree should still work
|
||||
|
||||
// assert mdirs were unininlined
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 1*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (1 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -3198,7 +3198,7 @@ code = '''
|
||||
lfsr_mount(&lfs, CFG) => 0;
|
||||
|
||||
// assert mdirs were unininlined
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 1*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (1 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -3251,7 +3251,7 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, NULL, 0) => 0;
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -3314,18 +3314,18 @@ code = '''
|
||||
// and the tree should still work
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'a');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 1*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (1 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -3336,18 +3336,18 @@ code = '''
|
||||
lfsr_mount(&lfs, CFG) => 0;
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'a');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 1*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (1 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -3391,7 +3391,7 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, NULL, 0) => 0;
|
||||
|
||||
// assert mdirs were unininlined and split
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 2*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (2 << lfs.mdir_bits));
|
||||
// assert mroot now has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -3408,7 +3408,7 @@ code = '''
|
||||
lfsr_mdir_commit(&lfs, &mdir, NULL, 0) => 0;
|
||||
|
||||
// assert mdir was split correctly
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 3*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (3 << lfs.mdir_bits));
|
||||
// assert mroot still has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
@@ -3471,24 +3471,24 @@ code = '''
|
||||
// and the tree should still work
|
||||
|
||||
// assert mdir was split correctly
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 3*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (3 << lfs.mdir_bits));
|
||||
// assert mroot still has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'a');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 1*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (1 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'b');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 2*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (2 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -3499,24 +3499,24 @@ code = '''
|
||||
lfsr_mount(&lfs, CFG) => 0;
|
||||
|
||||
// assert mdir was split correctly
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == 3*lfsr_mleafweight(&lfs));
|
||||
assert(lfsr_mtree_weight(&lfs.mtree) == (3 << lfs.mdir_bits));
|
||||
// assert mroot still has no entries
|
||||
assert(lfs.mroot.rbyd.weight == 0);
|
||||
|
||||
// assert that our entries are still in the mtree
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'a');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 1*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (1 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
assert(buffer[1] == 'b');
|
||||
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 2*lfsr_mleafweight(&lfs)+0, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (2 << lfs.mdir_bits)+0, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 1);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -4033,7 +4033,7 @@ code = '''
|
||||
assert(lfsr_mdir_cmp(&old_mroot, &lfs.mroot) != 0);
|
||||
|
||||
// assert that our entry is still in the mroot
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
@@ -4104,7 +4104,7 @@ code = '''
|
||||
assert(lfsr_mdir_cmp(&old_mroot, &lfs.mroot) != 0);
|
||||
|
||||
// assert that our attr is still in the mroot
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, 0*lfsr_mleafweight(&lfs)+1, &mdir) => 0;
|
||||
lfsr_mtree_lookup(&lfs, &lfs.mtree, (0 << lfs.mdir_bits)+1, &mdir) => 0;
|
||||
assert(mdir.rbyd.weight == 2);
|
||||
lfsr_mdir_lookup(&lfs, &mdir, LFSR_TAG_REG, &data) => 0;
|
||||
lfsr_data_read(&lfs, &data, buffer, SIZE) => SIZE;
|
||||
|
||||
Reference in New Issue
Block a user