• Home
  • Raw
  • Download

Lines Matching refs:i

45 		int i, cont = 0;  in first_dirty_cnode()  local
47 for (i = 0; i < UBIFS_LPT_FANOUT; i++) { in first_dirty_cnode()
50 cnode = nnode->nbranch[i].cnode; in first_dirty_cnode()
74 int i; in next_dirty_cnode() local
80 for (i = cnode->iip + 1; i < UBIFS_LPT_FANOUT; i++) { in next_dirty_cnode()
81 cnode = nnode->nbranch[i].cnode; in next_dirty_cnode()
161 int i, n; in alloc_lpt_leb() local
164 for (i = n; i < c->lpt_lebs; i++) { in alloc_lpt_leb()
165 if (c->ltab[i].tgc || c->ltab[i].cmt) in alloc_lpt_leb()
167 if (c->ltab[i].free == c->leb_size) { in alloc_lpt_leb()
168 c->ltab[i].cmt = 1; in alloc_lpt_leb()
169 *lnum = i + c->lpt_first; in alloc_lpt_leb()
174 for (i = 0; i < n; i++) { in alloc_lpt_leb()
175 if (c->ltab[i].tgc || c->ltab[i].cmt) in alloc_lpt_leb()
177 if (c->ltab[i].free == c->leb_size) { in alloc_lpt_leb()
178 c->ltab[i].cmt = 1; in alloc_lpt_leb()
179 *lnum = i + c->lpt_first; in alloc_lpt_leb()
345 int i, n; in realloc_lpt_leb() local
348 for (i = n; i < c->lpt_lebs; i++) in realloc_lpt_leb()
349 if (c->ltab[i].cmt) { in realloc_lpt_leb()
350 c->ltab[i].cmt = 0; in realloc_lpt_leb()
351 *lnum = i + c->lpt_first; in realloc_lpt_leb()
355 for (i = 0; i < n; i++) in realloc_lpt_leb()
356 if (c->ltab[i].cmt) { in realloc_lpt_leb()
357 c->ltab[i].cmt = 0; in realloc_lpt_leb()
358 *lnum = i + c->lpt_first; in realloc_lpt_leb()
627 static struct ubifs_pnode *pnode_lookup(struct ubifs_info *c, int i) in pnode_lookup() argument
637 i <<= UBIFS_LPT_FANOUT_SHIFT; in pnode_lookup()
641 iip = ((i >> shft) & (UBIFS_LPT_FANOUT - 1)); in pnode_lookup()
647 iip = ((i >> shft) & (UBIFS_LPT_FANOUT - 1)); in pnode_lookup()
726 int i; in need_write_all() local
728 for (i = 0; i < c->lpt_lebs; i++) { in need_write_all()
729 if (i + c->lpt_first == c->nhead_lnum) in need_write_all()
731 else if (c->ltab[i].free == c->leb_size) in need_write_all()
733 else if (c->ltab[i].free + c->ltab[i].dirty == c->leb_size) in need_write_all()
752 int i; in lpt_tgc_start() local
754 for (i = 0; i < c->lpt_lebs; i++) { in lpt_tgc_start()
755 if (i + c->lpt_first == c->nhead_lnum) in lpt_tgc_start()
757 if (c->ltab[i].dirty > 0 && in lpt_tgc_start()
758 c->ltab[i].free + c->ltab[i].dirty == c->leb_size) { in lpt_tgc_start()
759 c->ltab[i].tgc = 1; in lpt_tgc_start()
760 c->ltab[i].free = c->leb_size; in lpt_tgc_start()
761 c->ltab[i].dirty = 0; in lpt_tgc_start()
762 dbg_lp("LEB %d", i + c->lpt_first); in lpt_tgc_start()
778 int i, err; in lpt_tgc_end() local
780 for (i = 0; i < c->lpt_lebs; i++) in lpt_tgc_end()
781 if (c->ltab[i].tgc) { in lpt_tgc_end()
782 err = ubifs_leb_unmap(c, i + c->lpt_first); in lpt_tgc_end()
785 c->ltab[i].tgc = 0; in lpt_tgc_end()
786 dbg_lp("LEB %d", i + c->lpt_first); in lpt_tgc_end()
807 int i, cnt = 0; in populate_lsave() local
834 for (i = 0; i < heap->cnt; i++) { in populate_lsave()
835 c->lsave[cnt++] = heap->arr[i]->lnum; in populate_lsave()
840 for (i = 0; i < heap->cnt; i++) { in populate_lsave()
841 c->lsave[cnt++] = heap->arr[i]->lnum; in populate_lsave()
846 for (i = 0; i < heap->cnt; i++) { in populate_lsave()
847 c->lsave[cnt++] = heap->arr[i]->lnum; in populate_lsave()
864 static struct ubifs_nnode *nnode_lookup(struct ubifs_info *c, int i) in nnode_lookup() argument
876 iip = i & (UBIFS_LPT_FANOUT - 1); in nnode_lookup()
877 i >>= UBIFS_LPT_FANOUT_SHIFT; in nnode_lookup()
878 if (!i) in nnode_lookup()
1194 int i, lnum = -1, dirty = 0; in lpt_gc() local
1197 for (i = 0; i < c->lpt_lebs; i++) { in lpt_gc()
1198 ubifs_assert(!c->ltab[i].tgc); in lpt_gc()
1199 if (i + c->lpt_first == c->nhead_lnum || in lpt_gc()
1200 c->ltab[i].free + c->ltab[i].dirty == c->leb_size) in lpt_gc()
1202 if (c->ltab[i].dirty > dirty) { in lpt_gc()
1203 dirty = c->ltab[i].dirty; in lpt_gc()
1204 lnum = i + c->lpt_first; in lpt_gc()
1380 int h, i, found; in first_nnode() local
1388 for (i = 0; i < UBIFS_LPT_FANOUT; i++) { in first_nnode()
1389 if (nnode->nbranch[i].nnode) { in first_nnode()
1391 nnode = nnode->nbranch[i].nnode; in first_nnode()
1415 int iip, h, i, found; in next_nnode() local
1435 for (i = 0; i < UBIFS_LPT_FANOUT; i++) { in next_nnode()
1436 if (nnode->nbranch[i].nnode) { in next_nnode()
1438 nnode = nnode->nbranch[i].nnode; in next_nnode()
1457 int i, hght; in ubifs_lpt_free() local
1477 for (i = 0; i < UBIFS_LPT_FANOUT; i++) in ubifs_lpt_free()
1478 kfree(nnode->nbranch[i].nnode); in ubifs_lpt_free()
1481 for (i = 0; i < LPROPS_HEAP_CNT; i++) in ubifs_lpt_free()
1482 kfree(c->lpt_heap[i].arr); in ubifs_lpt_free()
1500 int i; in dbg_is_all_ff() local
1502 for (i = 0; i < len; i++) in dbg_is_all_ff()
1503 if (buf[i] != 0xff) in dbg_is_all_ff()
1551 int i, cnt; in dbg_is_pnode_dirty() local
1554 for (i = 0; i < cnt; i++) { in dbg_is_pnode_dirty()
1559 pnode = pnode_lookup(c, i); in dbg_is_pnode_dirty()
1651 int i, pad_len; in dbg_check_ltab_lnum() local
1665 i = lnum - c->lpt_first; in dbg_check_ltab_lnum()
1666 if (len != c->ltab[i].free) { in dbg_check_ltab_lnum()
1668 lnum, len, c->ltab[i].free); in dbg_check_ltab_lnum()
1671 if (dirty != c->ltab[i].dirty) { in dbg_check_ltab_lnum()
1673 lnum, dirty, c->ltab[i].dirty); in dbg_check_ltab_lnum()
1701 int lnum, err, i, cnt; in dbg_check_ltab() local
1708 for (i = 0; i < cnt; i++) { in dbg_check_ltab()
1711 pnode = pnode_lookup(c, i); in dbg_check_ltab()
1744 int i; in dbg_chk_lpt_free_spc() local
1749 for (i = 0; i < c->lpt_lebs; i++) { in dbg_chk_lpt_free_spc()
1750 if (c->ltab[i].tgc || c->ltab[i].cmt) in dbg_chk_lpt_free_spc()
1752 if (i + c->lpt_first == c->nhead_lnum) in dbg_chk_lpt_free_spc()
1754 else if (c->ltab[i].free == c->leb_size) in dbg_chk_lpt_free_spc()
1929 int i; in dump_lpt_leb() local
1945 for (i = 0; i < UBIFS_LPT_FANOUT; i++) { in dump_lpt_leb()
1946 pr_cont("%d:%d", nnode.nbranch[i].lnum, in dump_lpt_leb()
1947 nnode.nbranch[i].offs); in dump_lpt_leb()
1948 if (i != UBIFS_LPT_FANOUT - 1) in dump_lpt_leb()
1986 int i; in ubifs_dump_lpt_lebs() local
1989 for (i = 0; i < c->lpt_lebs; i++) in ubifs_dump_lpt_lebs()
1990 dump_lpt_leb(c, i + c->lpt_first); in ubifs_dump_lpt_lebs()
2007 int i; in dbg_populate_lsave() local
2014 for (i = 0; i < c->lsave_cnt; i++) in dbg_populate_lsave()
2015 c->lsave[i] = c->main_first; in dbg_populate_lsave()
2025 for (i = 0; i < heap->cnt; i++) in dbg_populate_lsave()
2026 c->lsave[prandom_u32() % c->lsave_cnt] = heap->arr[i]->lnum; in dbg_populate_lsave()
2028 for (i = 0; i < heap->cnt; i++) in dbg_populate_lsave()
2029 c->lsave[prandom_u32() % c->lsave_cnt] = heap->arr[i]->lnum; in dbg_populate_lsave()
2031 for (i = 0; i < heap->cnt; i++) in dbg_populate_lsave()
2032 c->lsave[prandom_u32() % c->lsave_cnt] = heap->arr[i]->lnum; in dbg_populate_lsave()