Lines Matching +full:2 +full:f
11 #define LFS_BLOCK_INLINE ((lfs_block_t)-2)
113 LFS_CMP_GT = 2,
242 static inline void lfs_pair_swap(lfs_block_t pair[2]) { in lfs_pair_swap() argument
248 static inline bool lfs_pair_isnull(const lfs_block_t pair[2]) { in lfs_pair_isnull() argument
253 const lfs_block_t paira[2], in lfs_pair_cmp() argument
254 const lfs_block_t pairb[2]) { in lfs_pair_cmp() argument
260 const lfs_block_t paira[2], in lfs_pair_sync() argument
261 const lfs_block_t pairb[2]) { in lfs_pair_sync() argument
266 static inline void lfs_pair_fromle32(lfs_block_t pair[2]) { in lfs_pair_fromle32() argument
271 static inline void lfs_pair_tole32(lfs_block_t pair[2]) { in lfs_pair_tole32() argument
425 uint16_t id, const lfs_block_t pair[2]);
426 static int lfs_fs_pred(lfs_t *lfs, const lfs_block_t dir[2],
428 static lfs_stag_t lfs_fs_parent(lfs_t *lfs, const lfs_block_t dir[2],
431 const lfs_block_t oldpair[2], lfs_block_t newpair[2]);
768 lfs_mdir_t *dir, const lfs_block_t pair[2], in lfs_dir_fetchmatch() argument
782 uint32_t revs[2] = {0, 0}; in lfs_dir_fetchmatch()
784 for (int i = 0; i < 2; i++) { in lfs_dir_fetchmatch()
794 lfs_scmp(revs[i], revs[(i+1)%2]) > 0) { in lfs_dir_fetchmatch()
799 dir->pair[0] = pair[(r+0)%2]; in lfs_dir_fetchmatch()
800 dir->pair[1] = pair[(r+1)%2]; in lfs_dir_fetchmatch()
801 dir->rev = revs[(r+0)%2]; in lfs_dir_fetchmatch()
805 for (int i = 0; i < 2; i++) { in lfs_dir_fetchmatch()
810 lfs_block_t temptail[2] = {LFS_BLOCK_NULL, LFS_BLOCK_NULL}; in lfs_dir_fetchmatch()
994 dir->rev = revs[(r+1)%2]; in lfs_dir_fetchmatch()
1003 lfs_mdir_t *dir, const lfs_block_t pair[2]) { in lfs_dir_fetch() argument
1113 (namelen == 2 && memcmp(name, "..", 2) == 0)) { in lfs_dir_find()
1129 if (sufflen == 2 && memcmp(suffix, "..", 2) == 0) { in lfs_dir_find()
1267 const lfs_off_t end = lfs_alignup(off1 + 2*sizeof(uint32_t), in lfs_dir_commitcrc()
1277 noff = lfs_min(noff, end - 2*sizeof(uint32_t)); in lfs_dir_commitcrc()
1294 uint32_t footer[2]; in lfs_dir_commitcrc()
1348 off = lfs_min(off, end - 2*sizeof(uint32_t)); in lfs_dir_commitcrc()
1358 for (int i = 0; i < 2; i++) { in lfs_dir_alloc()
1359 int err = lfs_alloc(lfs, &dir->pair[(i+1)%2]); in lfs_dir_alloc()
1468 const lfs_block_t oldpair[2] = {dir->pair[0], dir->pair[1]}; in lfs_dir_compact()
1491 lfs_alignup(lfs->cfg->block_size/2, in lfs_dir_compact()
1499 uint16_t split = (end - begin) / 2; in lfs_dir_compact()
1521 // 2. block_cycles = 2n, which, due to aliasing, would only ever relocate in lfs_dir_compact()
1525 if (lfs_pair_cmp(dir->pair, (const lfs_block_t[2]){0, 1}) == 0) { in lfs_dir_compact()
1535 if ((lfs_size_t)res < lfs->cfg->block_count/2) { in lfs_dir_compact()
1689 if (lfs_pair_cmp(dir->pair, (const lfs_block_t[2]){0, 1}) == 0) { in lfs_dir_compact()
1723 for (lfs_file_t *f = (lfs_file_t*)lfs->mlist; f; f = f->next) { in lfs_dir_commit() local
1724 if (dir != &f->m && lfs_pair_cmp(f->m.pair, dir->pair) == 0 && in lfs_dir_commit()
1725 f->type == LFS_TYPE_REG && (f->flags & LFS_F_INLINE) && in lfs_dir_commit()
1726 f->ctz.size > lfs->cfg->cache_size) { in lfs_dir_commit()
1727 int err = lfs_file_outline(lfs, f); in lfs_dir_commit()
1732 err = lfs_file_flush(lfs, f); in lfs_dir_commit()
2021 lfs_block_t pair[2]; in lfs_dir_open()
2137 dir->pos = lfs_min(2, off); in lfs_dir_seek()
2195 lfs_off_t b = lfs->cfg->block_size - 2*4; in lfs_ctz_index()
2201 i = (size - 4*(lfs_popc(i-1)+2)) / b; in lfs_ctz_index()
2358 lfs_block_t heads[2]; in lfs_ctz_traverse()
2359 int count = 2 - (index & 1); in lfs_ctz_traverse()
3171 lfs_block_t pair[2]; in lfs_remove()
3291 lfs_block_t prevpair[2]; in lfs_rename()
3480 LFS_ASSERT(4*lfs_npw2(0xffffffff / (lfs->cfg->block_size-2*4)) in lfs_init()
3648 err = lfs_dir_fetch(lfs, &root, (const lfs_block_t[2]){0, 1}); in lfs_format()
3695 if (cycle >= lfs->cfg->block_count/2) { in lfs_mount()
3842 if (cycle >= lfs->cfg->block_count/2) { in lfs_fs_traverseraw()
3848 for (int i = 0; i < 2; i++) { in lfs_fs_traverseraw()
3881 for (int i = 0; i < 2; i++) { in lfs_fs_traverseraw()
3892 for (lfs_file_t *f = (lfs_file_t*)lfs->mlist; f; f = f->next) { in lfs_fs_traverseraw() local
3893 if (f->type != LFS_TYPE_REG) { in lfs_fs_traverseraw()
3897 if ((f->flags & LFS_F_DIRTY) && !(f->flags & LFS_F_INLINE)) { in lfs_fs_traverseraw()
3898 int err = lfs_ctz_traverse(lfs, &f->cache, &lfs->rcache, in lfs_fs_traverseraw()
3899 f->ctz.head, f->ctz.size, cb, data); in lfs_fs_traverseraw()
3905 if ((f->flags & LFS_F_WRITING) && !(f->flags & LFS_F_INLINE)) { in lfs_fs_traverseraw()
3906 int err = lfs_ctz_traverse(lfs, &f->cache, &lfs->rcache, in lfs_fs_traverseraw()
3907 f->block, f->pos, cb, data); in lfs_fs_traverseraw()
3927 const lfs_block_t pair[2], lfs_mdir_t *pdir) { in lfs_fs_pred() argument
3933 if (cycle >= lfs->cfg->block_count/2) { in lfs_fs_pred()
3954 const lfs_block_t pair[2];
3964 lfs_block_t child[2]; in lfs_fs_parent_match()
3976 static lfs_stag_t lfs_fs_parent(lfs_t *lfs, const lfs_block_t pair[2], in lfs_fs_parent() argument
3983 if (cycle >= lfs->cfg->block_count/2) { in lfs_fs_parent()
4004 const lfs_block_t oldpair[2], lfs_block_t newpair[2]) { in lfs_fs_relocate() argument
4106 uint16_t id, const lfs_block_t pair[2]) { in lfs_fs_prepmove() argument
4182 lfs_block_t pair[2]; in lfs_fs_deorphan()
4281 lfs_block_t root[2];
4297 lfs_block_t dir[2];
4304 lfs_block_t pair[2];
4307 lfs_block_t head[2];
4313 lfs_block_t tail[2];
4325 lfs_block_t root[2];
4403 lfs1_dir_t *dir, const lfs_block_t pair[2]) { in lfs1_dir_fetch() argument
4405 const lfs_block_t tpair[2] = {pair[0], pair[1]}; in lfs1_dir_fetch()
4409 for (int i = 0; i < 2; i++) { in lfs1_dir_fetch()
4449 dir->pair[0] = tpair[(i+0) % 2]; in lfs1_dir_fetch()
4450 dir->pair[1] = tpair[(i+1) % 2]; in lfs1_dir_fetch()
4502 lfs_block_t cwd[2] = {0, 1}; in lfs1_traverse()
4505 for (int i = 0; i < 2; i++) { in lfs1_traverse()
4544 for (int i = 0; i < 2; i++) { in lfs1_traverse()
4570 int err = lfs1_dir_fetch(lfs, &cwd, (const lfs_block_t[2]){0, 1}); in lfs1_moved()
4626 err = lfs1_dir_fetch(lfs, &dir, (const lfs_block_t[2]){0, 1}); in lfs1_mount()
4858 err = lfs1_dir_fetch(lfs, &dir1, (const lfs_block_t[2]){0, 1}); in lfs_migrate()
4894 err = lfs_dir_fetch(lfs, &dir2, (const lfs_block_t[2]){0, 1}); in lfs_migrate()