Added lfs_rbyd_rangesize (untested), some cleanup
Toying around with the idea that since rbyd trees have strict height gaurantees after compaction (2*log2(n)+1), we can proactively calculate the maximum on-disk space required for a worst case tree+leb128 encoding. This would _greatly_ simplify things such as metadata compaction and splitting, and allow unstorable file metadata (too many custom attributes) to error early. One issue is that this calculated worst case will likely be ~4-5x worst than the actual encoding due to leb128 compression. Though this may be an acceptable tradeoff for the simplification and more reliable behavior.
This commit is contained in:
@@ -1601,7 +1601,7 @@ code = '''
|
||||
printf("] ---\n");
|
||||
|
||||
// build the attribute list for the current permutation
|
||||
struct lfs_rattr attrs[N];
|
||||
struct lfsr_attr attrs[N];
|
||||
for (unsigned j = 0; j < N; j++) {
|
||||
attrs[j] = *LFSR_ATTR2(
|
||||
UATTR, perm[j]+1, -1,
|
||||
@@ -2961,7 +2961,7 @@ code = '''
|
||||
printf("] ---\n");
|
||||
|
||||
// build the attribute list for the current permutation
|
||||
struct lfs_rattr attrs[N];
|
||||
struct lfsr_attr attrs[N];
|
||||
for (unsigned j = 0; j < N; j++) {
|
||||
// adjust id based on future insertions
|
||||
uint16_t id = perm[j];
|
||||
|
||||
Reference in New Issue
Block a user