• Home
  • Raw
  • Download

Lines Matching refs:i

60 	int i, n, bits, per_leb_wastage, max_pnode_cnt;  in do_calc_lpt_geom()  local
77 for (i = 1; i < c->lpt_hght; i++) { in do_calc_lpt_geom()
177 int i, lebs_needed; in calc_dflt_lpt_geom() local
203 for (i = 0; i < 64 ; i++) { in calc_dflt_lpt_geom()
354 int i, pos = 0; in ubifs_pack_pnode() local
360 for (i = 0; i < UBIFS_LPT_FANOUT; i++) { in ubifs_pack_pnode()
361 pack_bits(&addr, &pos, pnode->lprops[i].free >> 3, in ubifs_pack_pnode()
363 pack_bits(&addr, &pos, pnode->lprops[i].dirty >> 3, in ubifs_pack_pnode()
365 if (pnode->lprops[i].flags & LPROPS_INDEX) in ubifs_pack_pnode()
387 int i, pos = 0; in ubifs_pack_nnode() local
393 for (i = 0; i < UBIFS_LPT_FANOUT; i++) { in ubifs_pack_nnode()
394 int lnum = nnode->nbranch[i].lnum; in ubifs_pack_nnode()
399 pack_bits(&addr, &pos, nnode->nbranch[i].offs, in ubifs_pack_nnode()
419 int i, pos = 0; in ubifs_pack_ltab() local
423 for (i = 0; i < c->lpt_lebs; i++) { in ubifs_pack_ltab()
424 pack_bits(&addr, &pos, ltab[i].free, c->lpt_spc_bits); in ubifs_pack_ltab()
425 pack_bits(&addr, &pos, ltab[i].dirty, c->lpt_spc_bits); in ubifs_pack_ltab()
443 int i, pos = 0; in ubifs_pack_lsave() local
447 for (i = 0; i < c->lsave_cnt; i++) in ubifs_pack_lsave()
448 pack_bits(&addr, &pos, lsave[i], c->lnum_bits); in ubifs_pack_lsave()
586 int i, n = c->lpt_hght - 1, pnum = parent->num, num = 0; in calc_pnode_num_from_parent() local
588 for (i = 0; i < n; i++) { in calc_pnode_num_from_parent()
611 int lnum, err = 0, node_sz, iopos, i, j, cnt, len, alen, row; in ubifs_create_dflt_lpt() local
645 for (i = 0; i < c->lpt_lebs; i++) { in ubifs_create_dflt_lpt()
646 ltab[i].free = c->leb_size; in ubifs_create_dflt_lpt()
647 ltab[i].dirty = 0; in ubifs_create_dflt_lpt()
648 ltab[i].tgc = 0; in ubifs_create_dflt_lpt()
649 ltab[i].cmt = 0; in ubifs_create_dflt_lpt()
672 for (i = 2; i < UBIFS_LPT_FANOUT; i++) in ubifs_create_dflt_lpt()
673 pnode->lprops[i].free = c->leb_size; in ubifs_create_dflt_lpt()
699 for (i = 1; i < cnt; i++) { in ubifs_create_dflt_lpt()
722 for (i = UBIFS_LPT_FANOUT; cnt > i; i <<= UBIFS_LPT_FANOUT_SHIFT) in ubifs_create_dflt_lpt()
728 for (i = 0; i < cnt; i++) { in ubifs_create_dflt_lpt()
761 nnode->num = calc_nnode_num(row, i); in ubifs_create_dflt_lpt()
791 for (i = 0; i < c->lsave_cnt && i < *main_lebs; i++) in ubifs_create_dflt_lpt()
792 lsave[i] = c->main_first + i; in ubifs_create_dflt_lpt()
793 for (; i < c->lsave_cnt; i++) in ubifs_create_dflt_lpt()
794 lsave[i] = c->main_first; in ubifs_create_dflt_lpt()
871 int i; in update_cats() local
873 for (i = 0; i < UBIFS_LPT_FANOUT; i++) { in update_cats()
874 int cat = pnode->lprops[i].flags & LPROPS_CAT_MASK; in update_cats()
875 int lnum = pnode->lprops[i].lnum; in update_cats()
879 ubifs_add_to_cat(c, &pnode->lprops[i], cat); in update_cats()
896 int i; in replace_cats() local
898 for (i = 0; i < UBIFS_LPT_FANOUT; i++) { in replace_cats()
899 if (!new_pnode->lprops[i].lnum) in replace_cats()
901 ubifs_replace_cat(c, &old_pnode->lprops[i], in replace_cats()
902 &new_pnode->lprops[i]); in replace_cats()
968 int i, pos = 0, err; in unpack_pnode() local
975 for (i = 0; i < UBIFS_LPT_FANOUT; i++) { in unpack_pnode()
976 struct ubifs_lprops * const lprops = &pnode->lprops[i]; in unpack_pnode()
1005 int i, pos = 0, err; in ubifs_unpack_nnode() local
1012 for (i = 0; i < UBIFS_LPT_FANOUT; i++) { in ubifs_unpack_nnode()
1019 nnode->nbranch[i].lnum = lnum; in ubifs_unpack_nnode()
1020 nnode->nbranch[i].offs = ubifs_unpack_bits(&addr, &pos, in ubifs_unpack_nnode()
1037 int i, pos = 0, err; in unpack_ltab() local
1042 for (i = 0; i < c->lpt_lebs; i++) { in unpack_ltab()
1050 c->ltab[i].free = free; in unpack_ltab()
1051 c->ltab[i].dirty = dirty; in unpack_ltab()
1052 c->ltab[i].tgc = 0; in unpack_ltab()
1053 c->ltab[i].cmt = 0; in unpack_ltab()
1069 int i, pos = 0, err; in unpack_lsave() local
1074 for (i = 0; i < c->lsave_cnt; i++) { in unpack_lsave()
1079 c->lsave[i] = lnum; in unpack_lsave()
1097 int i, lvl, max_offs; in validate_nnode() local
1112 for (i = 0; i < UBIFS_LPT_FANOUT; i++) { in validate_nnode()
1113 int lnum = nnode->nbranch[i].lnum; in validate_nnode()
1114 int offs = nnode->nbranch[i].offs; in validate_nnode()
1141 int i; in validate_pnode() local
1149 for (i = 0; i < UBIFS_LPT_FANOUT; i++) { in validate_pnode()
1150 int free = pnode->lprops[i].free; in validate_pnode()
1151 int dirty = pnode->lprops[i].dirty; in validate_pnode()
1175 int i, lnum; in set_pnode_lnum() local
1178 for (i = 0; i < UBIFS_LPT_FANOUT; i++) { in set_pnode_lnum()
1181 pnode->lprops[i].lnum = lnum++; in set_pnode_lnum()
1281 int i; in read_pnode() local
1285 for (i = 0; i < UBIFS_LPT_FANOUT; i++) { in read_pnode()
1286 struct ubifs_lprops * const lprops = &pnode->lprops[i]; in read_pnode()
1351 int err, i; in read_lsave() local
1364 for (i = 0; i < c->lsave_cnt; i++) { in read_lsave()
1365 int lnum = c->lsave[i]; in read_lsave()
1448 int err, i, h, iip, shft; in ubifs_lpt_lookup() local
1458 i = lnum - c->main_first; in ubifs_lpt_lookup()
1461 iip = ((i >> shft) & (UBIFS_LPT_FANOUT - 1)); in ubifs_lpt_lookup()
1467 iip = ((i >> shft) & (UBIFS_LPT_FANOUT - 1)); in ubifs_lpt_lookup()
1471 iip = (i & (UBIFS_LPT_FANOUT - 1)); in ubifs_lpt_lookup()
1489 int i; in dirty_cow_nnode() local
1510 for (i = 0; i < UBIFS_LPT_FANOUT; i++) { in dirty_cow_nnode()
1511 struct ubifs_nbranch *branch = &n->nbranch[i]; in dirty_cow_nnode()
1579 int err, i, h, iip, shft; in ubifs_lpt_lookup_dirty() local
1592 i = lnum - c->main_first; in ubifs_lpt_lookup_dirty()
1595 iip = ((i >> shft) & (UBIFS_LPT_FANOUT - 1)); in ubifs_lpt_lookup_dirty()
1604 iip = ((i >> shft) & (UBIFS_LPT_FANOUT - 1)); in ubifs_lpt_lookup_dirty()
1611 iip = (i & (UBIFS_LPT_FANOUT - 1)); in ubifs_lpt_lookup_dirty()
1627 int err, i; in lpt_init_rd() local
1633 i = max_t(int, c->nnode_sz, c->pnode_sz); in lpt_init_rd()
1634 c->lpt_nod_buf = kmalloc(i, GFP_KERNEL); in lpt_init_rd()
1638 for (i = 0; i < LPROPS_HEAP_CNT; i++) { in lpt_init_rd()
1639 c->lpt_heap[i].arr = kmalloc(sizeof(void *) * LPT_HEAP_SZ, in lpt_init_rd()
1641 if (!c->lpt_heap[i].arr) in lpt_init_rd()
1643 c->lpt_heap[i].cnt = 0; in lpt_init_rd()
1644 c->lpt_heap[i].max_cnt = LPT_HEAP_SZ; in lpt_init_rd()
1689 int err, i; in lpt_init_wr() local
1708 for (i = 0; i < c->lpt_lebs; i++) in lpt_init_wr()
1709 if (c->ltab[i].free == c->leb_size) { in lpt_init_wr()
1710 err = ubifs_leb_unmap(c, i + c->lpt_first); in lpt_init_wr()
1876 int i; in scan_get_pnode() local
1880 for (i = 0; i < UBIFS_LPT_FANOUT; i++) { in scan_get_pnode()
1881 struct ubifs_lprops * const lprops = &pnode->lprops[i]; in scan_get_pnode()
1922 int err = 0, i, h, iip, shft; in ubifs_lpt_scan_nolock() local
1952 i = start_lnum - c->main_first; in ubifs_lpt_scan_nolock()
1955 iip = ((i >> shft) & (UBIFS_LPT_FANOUT - 1)); in ubifs_lpt_scan_nolock()
1963 iip = ((i >> shft) & (UBIFS_LPT_FANOUT - 1)); in ubifs_lpt_scan_nolock()
1969 iip = (i & (UBIFS_LPT_FANOUT - 1)); in ubifs_lpt_scan_nolock()
2094 int i; in dbg_chk_pnode() local
2101 for (i = 0; i < UBIFS_LPT_FANOUT; i++) { in dbg_chk_pnode()
2102 struct ubifs_lprops *lp, *lprops = &pnode->lprops[i]; in dbg_chk_pnode()
2103 int lnum = (pnode->num << UBIFS_LPT_FANOUT_SHIFT) + i + in dbg_chk_pnode()