Home
last modified time | relevance | path

Searched refs:index (Results 1 – 2 of 2) sorted by relevance

/littlefs-3.5.0-3.4.0/
DDESIGN.md712 head block, the size of the skip-list, the index of the head block, and our
714 index + offset pair. So in theory we can store only a single pointer and size.
716 However, calculating the index + offset pair from the size is a bit
719 word width in bits, ![n] be the index of the block in the skip-list, and
756 equation for our index. But what we can do is solve for an ![n'] index that
760 perform this substitution once, which gives us this formula for our index:
764 Now that we have our index ![n], we can just plug it back into the above
771 Now we can find both our block index and offset from a size in _O(1)_, letting
2138 [ext4]: https://ext4.wiki.kernel.org/index.php/Ext4_Design
2140 [btrfs]: https://btrfs.wiki.kernel.org/index.php/Btrfs_design
Dlfs.c2725 lfs_off_t index = lfs_ctz_index(lfs, &noff); in lfs_ctz_extend() local
2756 index += 1; in lfs_ctz_extend()
2757 lfs_size_t skips = lfs_ctz(index) + 1; in lfs_ctz_extend()
2804 lfs_off_t index = lfs_ctz_index(lfs, &(lfs_off_t){size-1}); in lfs_ctz_traverse() local
2812 if (index == 0) { in lfs_ctz_traverse()
2817 int count = 2 - (index & 1); in lfs_ctz_traverse()
2835 index -= count; in lfs_ctz_traverse()