bmap: Simplified bmap configs, reduced to one LFS3_F_GBMAP flag
TLDR: This drops the idea of different bmap strategies/modes, and sorts
out most of the compile-time/runtime conditional bmap interactions.
---
Motivation: Benchmarking (at least up to the 32-bit word limit) has
shown the bmap will unlikely be a significant bottleneck, even on large
disks. The largest disks tend to be NAND, and NAND's ridiculous block
size limits pressure on block allocation.
There are still concerns for areas I haven't measured yet:
- SD/eMMC/FTL - Small blocks, so more pressure on block allocation. In
theory the logical block size can be artificially increased, but this
comes with a granularity tradeoff.
- I've only measured throughput, latency is a whole other story.
However, users have reported lfs3_fs_gc is useful for mitigating this,
so maybe latency is less of a concern now?
But while there may still be room for improvement via alternative bmap
strategies, the risk a concerning amount of complexity. Yes,
configuration gets more complicated, but the real issue is any bmap
strategies that try to track _deallocations_ (the original idea being
treediffing) risk falling leaking blocks if all cases aren't covered.
The current "bmap cache" strategy strikes a really nice balance where it
reduces _amortized_ block allocation -> ~O(log n) without RAM, while
retaining the safe, bug-resistant, single-source-of-truth properties
that come with lookahead-based allocation.
---
So, long story short, dropping other strategies, and now the presence of
the bmap is a boolean flag.
This is also the first format-specific flag:
- Define LFS3_BMAP to enable the bmap logic, but note by default the
bmap will still not be used.
- Define LFS3_YES_BMAP to force the bmap to be used.
- With LFS3_BMAP, passing LFS3_F_GBMAP to lfs3_format will include the
on-disk block-map.
- No flag is needed during mount, the presence of the bmap is determined
by the on-disk wcompat flags (LFS3_WCOMPAT_GBMAP). This also prevents
rw mounting if the bmap is not supported, but rdonly mounting is
allowed.
- Users can check if the bmap is in use via lfs3_fs_stat, which reports
LFS3_I_GBMAP in the flags field.
There's still some missing pieces, but these will be a bit more
involved:
- lfs3_fs_grow needs to be made bmap aware!
- We probably want something like lfs3_fs_mkgbmap and lfs3_fs_rmgbmap to
allow converting between bmap backed/not-backed filesystem images.
Code changes minimal:
code stack ctx
before: 37172 2352 684
after: 37172 (+0.0%) 2352 (+0.0%) 684 (+0.0%)
code stack ctx
bmap before: 38844 2456 800
bmap after: 38852 (+0.0%) 2456 (+0.0%) 800 (+0.0%)
This commit is contained in:
@@ -1,7 +1,16 @@
|
||||
# Test some low-level block-map operations
|
||||
#
|
||||
# Note these is very much not-exhaustive, but the entire test suite can
|
||||
# be run with the gbmap if you define LFS3_YES_BMAP:
|
||||
#
|
||||
# LFS3_YES_BMAP=1 make test -j
|
||||
#
|
||||
after = ['test_btree', 'test_mtree']
|
||||
ifdef = 'LFS3_BMAP'
|
||||
|
||||
|
||||
# test bmap operations
|
||||
|
||||
# test simple set operations
|
||||
[cases.test_bmap_set_split]
|
||||
in = 'lfs3.c'
|
||||
|
||||
+6
-6
@@ -1459,7 +1459,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// run gc
|
||||
if (AFTER == 0) {
|
||||
@@ -1575,7 +1575,7 @@ code = '''
|
||||
// note ckdata implies ckmeta
|
||||
| ((!CKMETA && !CKDATA) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
'''
|
||||
@@ -1650,7 +1650,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// run gc
|
||||
if (AFTER == 0) {
|
||||
@@ -1766,7 +1766,7 @@ code = '''
|
||||
// note ckdata implies ckmeta
|
||||
| ((!CKMETA && !CKDATA) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// test that we can reset flags with lfs3_fs_unck
|
||||
lfs3_fs_unck(&lfs3, GC_FLAGS) => 0;
|
||||
@@ -1781,7 +1781,7 @@ code = '''
|
||||
// _not_ imply uncking ckmeta
|
||||
| ((!(CKDATA && !CKMETA)) ? LFS3_I_CKMETA : 0)
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// run gc
|
||||
if (AFTER == 0) {
|
||||
@@ -1897,7 +1897,7 @@ code = '''
|
||||
// note ckdata implies ckmeta
|
||||
| ((!CKMETA && !CKDATA) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
'''
|
||||
|
||||
+37
-21
@@ -87,12 +87,12 @@ code = '''
|
||||
// note ckdata implies ckmeta
|
||||
| ((!CKMETA && !CKDATA) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
'''
|
||||
|
||||
# test that various format flags don't, uh, assert or anything
|
||||
# test that various format flags don't assert or anything
|
||||
#
|
||||
# these end up passed to mount internally
|
||||
[cases.test_mount_format_flags]
|
||||
@@ -104,6 +104,7 @@ defines.CKMETAPARITY = [false, true]
|
||||
defines.CKDATACKSUMS = [false, true]
|
||||
defines.CKMETA = [false, true]
|
||||
defines.CKDATA = [false, true]
|
||||
defines.GBMAP = [false, true]
|
||||
if = [
|
||||
'LFS3_IFDEF_REVDBG(true, !REVDBG)',
|
||||
'LFS3_IFDEF_REVNOISE(true, !REVNOISE)',
|
||||
@@ -112,6 +113,7 @@ if = [
|
||||
'LFS3_IFDEF_CKFETCHES(true, !CKFETCHES)',
|
||||
'LFS3_IFDEF_CKMETAPARITY(true, !CKMETAPARITY)',
|
||||
'LFS3_IFDEF_CKDATACKSUMS(true, !CKDATACKSUMS)',
|
||||
'LFS3_IFDEF_BMAP(true, !GBMAP)',
|
||||
]
|
||||
code = '''
|
||||
lfs3_t lfs3;
|
||||
@@ -128,10 +130,24 @@ code = '''
|
||||
? LFS3_IFDEF_CKDATACKSUMS(LFS3_F_CKDATACKSUMS, -1)
|
||||
: 0)
|
||||
| ((CKMETA) ? LFS3_F_CKMETA : 0)
|
||||
| ((CKDATA) ? LFS3_F_CKDATA : 0),
|
||||
| ((CKDATA) ? LFS3_F_CKDATA : 0)
|
||||
| ((GBMAP) ? LFS3_IFDEF_BMAP(LFS3_F_GBMAP, -1) : 0),
|
||||
CFG) => 0;
|
||||
|
||||
lfs3_mount(&lfs3, LFS3_M_RDWR, CFG) => 0;
|
||||
|
||||
// test that format-only flags are read correctly
|
||||
struct lfs3_fsinfo fsinfo;
|
||||
lfs3_fs_stat(&lfs3, &fsinfo) => 0;
|
||||
assert(fsinfo.flags == (
|
||||
LFS3_I_MKCONSISTENT
|
||||
| LFS3_I_LOOKAHEAD
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_YES_BMAP(
|
||||
LFS3_I_GBMAP,
|
||||
(GBMAP) ? LFS3_IFDEF_BMAP(LFS3_I_GBMAP, -1) : 0)));
|
||||
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
'''
|
||||
|
||||
@@ -155,7 +171,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
|
||||
// with LFS3_M_LOOKAHEAD, mount performs a lookahead scan
|
||||
@@ -172,7 +188,7 @@ code = '''
|
||||
// note ckdata implies ckmeta
|
||||
| ((!CKMETA && !CKDATA) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
'''
|
||||
|
||||
@@ -228,7 +244,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
|
||||
// with LFS3_M_COMPACT, mount compact any uncompacted blocks
|
||||
@@ -246,7 +262,7 @@ code = '''
|
||||
// note ckdata implies ckmeta
|
||||
| ((!CKMETA && !CKDATA) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// mdir should have been compacted
|
||||
lfs3_file_open(&lfs3, &file, "jellyfish", LFS3_O_RDONLY) => 0;
|
||||
@@ -332,7 +348,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
|
||||
// with LFS3_M_MKCONSISTENT, mount cleans up orphans eagerly
|
||||
@@ -351,7 +367,7 @@ code = '''
|
||||
// note ckdata implies ckmeta
|
||||
| ((!CKMETA && !CKDATA) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check we can still read the files
|
||||
lfs3_file_open(&lfs3, &file, "cuttlefish", LFS3_O_RDONLY) => 0;
|
||||
@@ -672,7 +688,7 @@ code = '''
|
||||
lfs3_mdir_commit(&lfs3, &lfs3.mroot, LFS3_RATTRS(
|
||||
LFS3_RATTR_LE32(
|
||||
LFS3_TAG_RCOMPAT, 0,
|
||||
LFS3_RCOMPAT_COMPAT
|
||||
lfs3_rcompat(&lfs3)
|
||||
| LFS3_RCOMPAT_NONSTANDARD))) => 0;
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
|
||||
@@ -698,7 +714,7 @@ code = '''
|
||||
lfs3_mdir_commit(&lfs3, &lfs3.mroot, LFS3_RATTRS(
|
||||
LFS3_RATTR_LE32(
|
||||
LFS3_TAG_WCOMPAT, 0,
|
||||
LFS3_WCOMPAT_COMPAT
|
||||
lfs3_wcompat(&lfs3)
|
||||
| LFS3_WCOMPAT_NONSTANDARD))) => 0;
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
|
||||
@@ -727,7 +743,7 @@ code = '''
|
||||
lfs3_mdir_commit(&lfs3, &lfs3.mroot, LFS3_RATTRS(
|
||||
LFS3_RATTR_LE32(
|
||||
LFS3_TAG_OCOMPAT, 0,
|
||||
LFS3_OCOMPAT_COMPAT
|
||||
lfs3_ocompat(&lfs3)
|
||||
| LFS3_OCOMPAT_NONSTANDARD))) => 0;
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
|
||||
@@ -754,7 +770,7 @@ code = '''
|
||||
lfs3_mdir_commit(&lfs3, &lfs3.mroot, LFS3_RATTRS(
|
||||
LFS3_RATTR_LE32(
|
||||
LFS3_TAG_WCOMPAT, 0,
|
||||
LFS3_WCOMPAT_COMPAT
|
||||
lfs3_wcompat(&lfs3)
|
||||
| LFS3_WCOMPAT_RDONLY))) => 0;
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
|
||||
@@ -782,7 +798,7 @@ code = '''
|
||||
lfs3_mdir_commit(&lfs3, &lfs3.mroot, LFS3_RATTRS(
|
||||
LFS3_RATTR_LE32(
|
||||
LFS3_TAG_RCOMPAT, 0,
|
||||
LFS3_RCOMPAT_COMPAT
|
||||
lfs3_rcompat(&lfs3)
|
||||
| LFS3_RCOMPAT_WRONLY))) => 0;
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
|
||||
@@ -814,7 +830,7 @@ code = '''
|
||||
lfs3_mdir_commit(&lfs3, &lfs3.mroot, LFS3_RATTRS(
|
||||
LFS3_RATTR_CAT(
|
||||
LFS3_TAG_RCOMPAT, 0,
|
||||
lfs3_data_fromle32(LFS3_RCOMPAT_COMPAT, rcompat_buf),
|
||||
lfs3_data_fromle32(lfs3_rcompat(&lfs3), rcompat_buf),
|
||||
LFS3_DATA_BUF(overflow, sizeof(overflow))))) => 0;
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
|
||||
@@ -848,7 +864,7 @@ code = '''
|
||||
lfs3_mdir_commit(&lfs3, &lfs3.mroot, LFS3_RATTRS(
|
||||
LFS3_RATTR_CAT(
|
||||
LFS3_TAG_WCOMPAT, 0,
|
||||
lfs3_data_fromle32(LFS3_WCOMPAT_COMPAT, wcompat_buf),
|
||||
lfs3_data_fromle32(lfs3_wcompat(&lfs3), wcompat_buf),
|
||||
LFS3_DATA_BUF(overflow, sizeof(overflow))))) => 0;
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
|
||||
@@ -882,7 +898,7 @@ code = '''
|
||||
lfs3_mdir_commit(&lfs3, &lfs3.mroot, LFS3_RATTRS(
|
||||
LFS3_RATTR_CAT(
|
||||
LFS3_TAG_OCOMPAT, 0,
|
||||
lfs3_data_fromle32(LFS3_OCOMPAT_COMPAT, ocompat_buf),
|
||||
lfs3_data_fromle32(lfs3_ocompat(&lfs3), ocompat_buf),
|
||||
LFS3_DATA_BUF(overflow, sizeof(overflow))))) => 0;
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
|
||||
@@ -914,7 +930,7 @@ code = '''
|
||||
lfs3_mdir_commit(&lfs3, &lfs3.mroot, LFS3_RATTRS(
|
||||
LFS3_RATTR_CAT(
|
||||
LFS3_TAG_RCOMPAT, 0,
|
||||
lfs3_data_fromle32(LFS3_RCOMPAT_COMPAT, rcompat_buf),
|
||||
lfs3_data_fromle32(lfs3_rcompat(&lfs3), rcompat_buf),
|
||||
LFS3_DATA_BUF(overflow, sizeof(overflow))))) => 0;
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
|
||||
@@ -948,7 +964,7 @@ code = '''
|
||||
lfs3_mdir_commit(&lfs3, &lfs3.mroot, LFS3_RATTRS(
|
||||
LFS3_RATTR_CAT(
|
||||
LFS3_TAG_WCOMPAT, 0,
|
||||
lfs3_data_fromle32(LFS3_WCOMPAT_COMPAT, wcompat_buf),
|
||||
lfs3_data_fromle32(lfs3_wcompat(&lfs3), wcompat_buf),
|
||||
LFS3_DATA_BUF(overflow, sizeof(overflow))))) => 0;
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
|
||||
@@ -979,7 +995,7 @@ code = '''
|
||||
lfs3_mdir_commit(&lfs3, &lfs3.mroot, LFS3_RATTRS(
|
||||
LFS3_RATTR_CAT(
|
||||
LFS3_TAG_OCOMPAT, 0,
|
||||
lfs3_data_fromle32(LFS3_OCOMPAT_COMPAT, ocompat_buf),
|
||||
lfs3_data_fromle32(lfs3_ocompat(&lfs3), ocompat_buf),
|
||||
LFS3_DATA_BUF(overflow, sizeof(overflow))))) => 0;
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
|
||||
|
||||
+121
-121
@@ -35,7 +35,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_MDIR);
|
||||
assert(tinfo.block == 0 || tinfo.block == 1);
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -74,7 +74,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_MDIR);
|
||||
assert(tinfo.block == 0 || tinfo.block == 1);
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -88,7 +88,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_MDIR);
|
||||
assert(tinfo.block == 0 || tinfo.block == 1);
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -127,7 +127,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_MDIR);
|
||||
assert(tinfo.block == 0 || tinfo.block == 1);
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -1714,7 +1714,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// try traversing
|
||||
lfs3_trv_t trv;
|
||||
@@ -1732,7 +1732,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_MDIR);
|
||||
assert(tinfo.block == 0 || tinfo.block == 1);
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -1749,7 +1749,7 @@ code = '''
|
||||
// note ckdata implies ckmeta
|
||||
| ((!CKMETA && !CKDATA) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
'''
|
||||
@@ -1803,7 +1803,7 @@ code = '''
|
||||
lfs3_file_close(&lfs3, &file) => 0;
|
||||
}
|
||||
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -1819,7 +1819,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
'''
|
||||
@@ -1855,7 +1855,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_MDIR);
|
||||
assert(tinfo.block == 0 || tinfo.block == 1);
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -1877,7 +1877,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// try another mutation just for good measure
|
||||
lfs3_file_open(&lfs3, &file, "tarantula",
|
||||
@@ -1898,7 +1898,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
lfs3_trv_close(&lfs3, &trv) => 0;
|
||||
|
||||
@@ -1944,7 +1944,7 @@ code = '''
|
||||
lfs3_mkdir(&lfs3, "spider") => 0;
|
||||
}
|
||||
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -1960,7 +1960,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
'''
|
||||
@@ -2010,7 +2010,7 @@ code = '''
|
||||
lfs3_remove(&lfs3, "spider") => 0;
|
||||
}
|
||||
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -2026,7 +2026,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
'''
|
||||
@@ -2071,7 +2071,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_MDIR);
|
||||
assert(tinfo.block == 0 || tinfo.block == 1);
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -2092,7 +2092,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
'''
|
||||
@@ -2165,7 +2165,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check the file contents
|
||||
lfs3_file_open(&lfs3, &file, "spider", LFS3_O_RDONLY) => 0;
|
||||
@@ -2249,7 +2249,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check the file contents
|
||||
lfs3_file_rewind(&lfs3, &file) => 0;
|
||||
@@ -2333,7 +2333,7 @@ code = '''
|
||||
lfs3_file_close(&lfs3, &file) => 0;
|
||||
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -2349,7 +2349,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check the file contents
|
||||
lfs3_file_open(&lfs3, &file, "spider", LFS3_O_RDONLY) => 0;
|
||||
@@ -2442,7 +2442,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_DATA);
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -2458,7 +2458,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check the file contents
|
||||
lfs3_file_open(&lfs3, &file, "spider", LFS3_O_RDONLY) => 0;
|
||||
@@ -2544,7 +2544,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_DATA);
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -2560,7 +2560,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check the file contents
|
||||
lfs3_file_open(&lfs3, &file, "spider", LFS3_O_RDONLY) => 0;
|
||||
@@ -2636,7 +2636,7 @@ code = '''
|
||||
lfs3_file_flush(&lfs3, &file1) => 0;
|
||||
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -2652,7 +2652,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
lfs3_file_close(&lfs3, &file1) => 0;
|
||||
lfs3_file_close(&lfs3, &file2) => 0;
|
||||
@@ -2747,7 +2747,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_DATA);
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -2763,7 +2763,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
lfs3_file_close(&lfs3, &file1) => 0;
|
||||
lfs3_file_close(&lfs3, &file2) => 0;
|
||||
@@ -2851,7 +2851,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_DATA);
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -2867,7 +2867,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
lfs3_file_close(&lfs3, &file1) => 0;
|
||||
lfs3_file_close(&lfs3, &file2) => 0;
|
||||
@@ -2946,7 +2946,7 @@ code = '''
|
||||
lfs3_file_close(&lfs3, &file1) => 0;
|
||||
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -2966,7 +2966,7 @@ code = '''
|
||||
? LFS3_I_CKMETA
|
||||
: 0)
|
||||
| ((!(CKDATA && DESYNC)) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
lfs3_file_close(&lfs3, &file2) => 0;
|
||||
|
||||
@@ -3064,7 +3064,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_DATA);
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -3084,7 +3084,7 @@ code = '''
|
||||
? LFS3_I_CKMETA
|
||||
: 0)
|
||||
| ((!(CKDATA && DESYNC)) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
lfs3_file_close(&lfs3, &file2) => 0;
|
||||
|
||||
@@ -3175,7 +3175,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_DATA);
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -3195,7 +3195,7 @@ code = '''
|
||||
? LFS3_I_CKMETA
|
||||
: 0)
|
||||
| ((!(CKDATA && DESYNC)) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
lfs3_file_close(&lfs3, &file2) => 0;
|
||||
|
||||
@@ -3281,7 +3281,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_DATA);
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -3301,7 +3301,7 @@ code = '''
|
||||
? LFS3_I_CKMETA
|
||||
: 0)
|
||||
| ((!(CKDATA && DESYNC)) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check the file contents
|
||||
lfs3_file_open(&lfs3, &file, "spider", LFS3_O_RDONLY) => LFS3_ERR_NOENT;
|
||||
@@ -3390,7 +3390,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_DATA);
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -3406,7 +3406,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check the file contents
|
||||
lfs3_file_open(&lfs3, &file, "spider", LFS3_O_RDONLY) => LFS3_ERR_NOENT;
|
||||
@@ -3495,7 +3495,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_DATA);
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -3511,7 +3511,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check the file contents
|
||||
lfs3_file_open(&lfs3, &file, "spider", LFS3_O_RDONLY) => 0;
|
||||
@@ -3608,7 +3608,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_DATA);
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -3624,7 +3624,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check the file contents
|
||||
lfs3_file_open(&lfs3, &file, "spider", LFS3_O_RDONLY) => 0;
|
||||
@@ -3732,7 +3732,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_DATA);
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -3748,7 +3748,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check the file contents
|
||||
lfs3_file_open(&lfs3, &file, "spider", LFS3_O_RDONLY) => 0;
|
||||
@@ -3856,7 +3856,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_DATA);
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -3872,7 +3872,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check the file contents
|
||||
lfs3_file_open(&lfs3, &file, "spider", LFS3_O_RDONLY) => 0;
|
||||
@@ -3967,7 +3967,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_DATA);
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -3983,7 +3983,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check the file contents
|
||||
lfs3_file_open(&lfs3, &file, "spider", LFS3_O_RDONLY) => 0;
|
||||
@@ -4072,7 +4072,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_DATA);
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -4088,7 +4088,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check the file contents
|
||||
lfs3_file_open(&lfs3, &file, "spider", LFS3_O_RDONLY) => 0;
|
||||
@@ -4192,7 +4192,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_DATA);
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -4208,7 +4208,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check the file contents
|
||||
lfs3_file_open(&lfs3, &file, "spider", LFS3_O_RDONLY) => 0;
|
||||
@@ -4311,7 +4311,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_DATA);
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -4327,7 +4327,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check the file contents
|
||||
lfs3_file_open(&lfs3, &file, "spider", LFS3_O_RDONLY) => 0;
|
||||
@@ -4483,7 +4483,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_DATA);
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -4499,7 +4499,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check the file contents
|
||||
lfs3_file_open(&lfs3, &file, "spider", LFS3_O_RDONLY) => 0;
|
||||
@@ -4672,7 +4672,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_DATA);
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -4688,7 +4688,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check the file contents
|
||||
lfs3_file_open(&lfs3, &file, "spider", LFS3_O_RDONLY) => 0;
|
||||
@@ -4855,7 +4855,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_DATA);
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -4871,7 +4871,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check the file contents
|
||||
lfs3_file_open(&lfs3, &file, "spider", LFS3_O_RDONLY) => 0;
|
||||
@@ -5035,7 +5035,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_DATA);
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -5051,7 +5051,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check the file contents
|
||||
lfs3_file_open(&lfs3, &file, "spider", LFS3_O_RDONLY) => 0;
|
||||
@@ -5222,7 +5222,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_DATA);
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -5238,7 +5238,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check the file contents
|
||||
lfs3_file_open(&lfs3, &file, "spider", LFS3_O_RDONLY) => 0;
|
||||
@@ -5408,7 +5408,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_DATA);
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -5424,7 +5424,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check the file contents
|
||||
lfs3_file_open(&lfs3, &file, "spider", LFS3_O_RDONLY) => 0;
|
||||
@@ -5605,7 +5605,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_DATA);
|
||||
// we should be at end of traversal now
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -5621,7 +5621,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check the file contents
|
||||
lfs3_file_open(&lfs3, &file, "spider", LFS3_O_RDONLY) => 0;
|
||||
@@ -5689,7 +5689,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// try traversing and compacting
|
||||
lfs3_trv_t trv;
|
||||
@@ -5707,7 +5707,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_MDIR);
|
||||
assert(tinfo.block == 0 || tinfo.block == 1);
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -5724,7 +5724,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// running another traversal should clear the uncompacted flag
|
||||
lfs3_trv_rewind(&lfs3, &trv) => 0;
|
||||
@@ -5747,7 +5747,7 @@ code = '''
|
||||
// note ckdata implies ckmeta
|
||||
| ((!CKMETA && !CKDATA) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check we can still read the file
|
||||
for (int remount = 0; remount < 2; remount++) {
|
||||
@@ -5828,7 +5828,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// try traversing and compacting
|
||||
lfs3_trv_t trv;
|
||||
@@ -5851,7 +5851,7 @@ code = '''
|
||||
assert(tinfo.btype == LFS3_BTYPE_MDIR);
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_MDIR);
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -5871,7 +5871,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// running another traversal should clear the uncompacted flag
|
||||
lfs3_trv_rewind(&lfs3, &trv) => 0;
|
||||
@@ -5896,7 +5896,7 @@ code = '''
|
||||
// note ckdata implies ckmeta
|
||||
| ((!CKMETA && !CKDATA) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check we can still read the file
|
||||
for (int remount = 0; remount < 2; remount++) {
|
||||
@@ -5959,7 +5959,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// try traversing and compacting
|
||||
lfs3_trv_t trv;
|
||||
@@ -5979,7 +5979,7 @@ code = '''
|
||||
assert(tinfo.btype == LFS3_BTYPE_MDIR);
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_MDIR);
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -5996,7 +5996,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// running another traversal should clear the uncompacted flag
|
||||
lfs3_trv_rewind(&lfs3, &trv) => 0;
|
||||
@@ -6019,7 +6019,7 @@ code = '''
|
||||
// note ckdata implies ckmeta
|
||||
| ((!CKMETA && !CKDATA) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check we can still read the file
|
||||
for (int remount = 0; remount < 2; remount++) {
|
||||
@@ -6109,7 +6109,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// try traversing and compacting
|
||||
lfs3_trv_t trv;
|
||||
@@ -6140,7 +6140,7 @@ code = '''
|
||||
assert(tinfo.btype == LFS3_BTYPE_MDIR);
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_MDIR);
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -6158,7 +6158,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// running another traversal should clear the uncompacted flag
|
||||
lfs3_trv_rewind(&lfs3, &trv) => 0;
|
||||
@@ -6182,7 +6182,7 @@ code = '''
|
||||
// note ckdata implies ckmeta
|
||||
| ((!CKMETA && !CKDATA) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check we can still read the files
|
||||
for (int remount = 0; remount < 2; remount++) {
|
||||
@@ -6326,7 +6326,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// try traversing and compacting
|
||||
lfs3_trv_t trv;
|
||||
@@ -6362,7 +6362,7 @@ code = '''
|
||||
assert(tinfo.btype == LFS3_BTYPE_MDIR);
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_MDIR);
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -6382,7 +6382,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// running another traversal should clear the uncompacted flag
|
||||
lfs3_trv_rewind(&lfs3, &trv) => 0;
|
||||
@@ -6408,7 +6408,7 @@ code = '''
|
||||
// note ckdata implies ckmeta
|
||||
| ((!CKMETA && !CKDATA) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check we can still read the files
|
||||
for (int remount = 0; remount < 2; remount++) {
|
||||
@@ -6557,7 +6557,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// try traversing and compacting
|
||||
lfs3_trv_t trv;
|
||||
@@ -6598,7 +6598,7 @@ code = '''
|
||||
assert(tinfo.btype == LFS3_BTYPE_MDIR);
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_MDIR);
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -6618,7 +6618,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// running another traversal should clear the uncompacted flag
|
||||
lfs3_trv_rewind(&lfs3, &trv) => 0;
|
||||
@@ -6644,7 +6644,7 @@ code = '''
|
||||
// note ckdata implies ckmeta
|
||||
| ((!CKMETA && !CKDATA) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check we can still read the files
|
||||
for (int remount = 0; remount < 2; remount++) {
|
||||
@@ -6759,7 +6759,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// try traversing with mkconsistent
|
||||
lfs3_trv_t trv;
|
||||
@@ -6791,7 +6791,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_MDIR);
|
||||
}
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -6817,7 +6817,7 @@ code = '''
|
||||
// note ckdata implies ckmeta
|
||||
| (((!CKMETA && !CKDATA) || ORPHANS > 0) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA || ORPHANS > 0) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check we can still read the files
|
||||
for (int remount = 0; remount < 2; remount++) {
|
||||
@@ -6890,7 +6890,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// try traversing with mkconsistent
|
||||
lfs3_trv_t trv;
|
||||
@@ -6944,7 +6944,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_MDIR);
|
||||
}
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -6969,7 +6969,7 @@ code = '''
|
||||
// note ckdata implies ckmeta
|
||||
| (((!CKMETA && !CKDATA) || ORPHANS > 0) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA || ORPHANS > 0) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check we can still read the files
|
||||
for (int remount = 0; remount < 2; remount++) {
|
||||
@@ -7068,7 +7068,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// try traversing with mkconsistent
|
||||
lfs3_trv_t trv;
|
||||
@@ -7114,7 +7114,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
}
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -7140,7 +7140,7 @@ code = '''
|
||||
// note ckdata implies ckmeta
|
||||
| (((!CKMETA && !CKDATA) || ORPHANS > 0) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA || ORPHANS > 0) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check we can still read the files
|
||||
for (int remount = 0; remount < 2; remount++) {
|
||||
@@ -7239,7 +7239,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// try traversing with mkconsistent
|
||||
lfs3_trv_t trv;
|
||||
@@ -7285,7 +7285,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
}
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -7311,7 +7311,7 @@ code = '''
|
||||
// note ckdata implies ckmeta
|
||||
| (((!CKMETA && !CKDATA) || ORPHANS > 0) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA || ORPHANS > 0) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check we can still read the files
|
||||
for (int remount = 0; remount < 2; remount++) {
|
||||
@@ -7411,7 +7411,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// try traversing with mkconsistent
|
||||
lfs3_trv_t trv;
|
||||
@@ -7465,7 +7465,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
}
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -7491,7 +7491,7 @@ code = '''
|
||||
// note ckdata implies ckmeta
|
||||
| (((!CKMETA && !CKDATA) || ORPHANS > 0) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA || ORPHANS > 0) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check we can still read the files
|
||||
for (int remount = 0; remount < 2; remount++) {
|
||||
@@ -7591,7 +7591,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// try traversing with mkconsistent
|
||||
lfs3_trv_t trv;
|
||||
@@ -7645,7 +7645,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
}
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -7671,7 +7671,7 @@ code = '''
|
||||
// note ckdata implies ckmeta
|
||||
| (((!CKMETA && !CKDATA) || ORPHANS > 0) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA || ORPHANS > 0) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check we can still read the files
|
||||
for (int remount = 0; remount < 2; remount++) {
|
||||
@@ -7789,7 +7789,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// try traversing with mkconsistent
|
||||
lfs3_trv_t trv;
|
||||
@@ -7822,7 +7822,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_MDIR);
|
||||
}
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -7851,7 +7851,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// running another traversal should clear the uncompacted flag
|
||||
lfs3_trv_rewind(&lfs3, &trv) => 0;
|
||||
@@ -7875,7 +7875,7 @@ code = '''
|
||||
// note ckdata implies ckmeta
|
||||
| ((!CKMETA && !CKDATA) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check we can still read the files
|
||||
for (int remount = 0; remount < 2; remount++) {
|
||||
@@ -7971,7 +7971,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// try traversing with mkconsistent
|
||||
lfs3_trv_t trv;
|
||||
@@ -8026,7 +8026,7 @@ code = '''
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_MDIR);
|
||||
}
|
||||
#ifdef LFS3_BMAP
|
||||
#ifdef LFS3_YES_BMAP
|
||||
lfs3_trv_read(&lfs3, &trv, &tinfo) => 0;
|
||||
assert(tinfo.btype == LFS3_BTYPE_BTREE);
|
||||
assert(tinfo.block == 2);
|
||||
@@ -8054,7 +8054,7 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
| LFS3_IFDEF_YES_BMAP(LFS3_I_GBMAP, 0)));
|
||||
|
||||
// check we can still read the files
|
||||
for (int remount = 0; remount < 2; remount++) {
|
||||
|
||||
Reference in New Issue
Block a user