Home
last modified time | relevance | path

Searched refs:lnum (Results 1 – 25 of 32) sorted by relevance

12

/fs/ubifs/
Dlog.c30 struct ubifs_bud *ubifs_search_bud(struct ubifs_info *c, int lnum) in ubifs_search_bud() argument
39 if (lnum < bud->lnum) in ubifs_search_bud()
41 else if (lnum > bud->lnum) in ubifs_search_bud()
59 struct ubifs_wbuf *ubifs_get_wbuf(struct ubifs_info *c, int lnum) in ubifs_get_wbuf() argument
72 if (lnum < bud->lnum) in ubifs_get_wbuf()
74 else if (lnum > bud->lnum) in ubifs_get_wbuf()
123 ubifs_assert(c, bud->lnum != b->lnum); in ubifs_add_bud()
124 if (bud->lnum < b->lnum) in ubifs_add_bud()
146 dbg_log("LEB %d:%d, jhead %s, bud_bytes %lld", bud->lnum, in ubifs_add_bud()
164 int ubifs_add_bud_to_log(struct ubifs_info *c, int jhead, int lnum, int offs) in ubifs_add_bud_to_log() argument
[all …]
Dlpt_commit.c129 static void upd_ltab(struct ubifs_info *c, int lnum, int free, int dirty) in upd_ltab() argument
132 lnum, c->ltab[lnum - c->lpt_first].free, in upd_ltab()
133 c->ltab[lnum - c->lpt_first].dirty, free, dirty); in upd_ltab()
134 ubifs_assert(c, lnum >= c->lpt_first && lnum <= c->lpt_last); in upd_ltab()
135 c->ltab[lnum - c->lpt_first].free = free; in upd_ltab()
136 c->ltab[lnum - c->lpt_first].dirty += dirty; in upd_ltab()
149 static int alloc_lpt_leb(struct ubifs_info *c, int *lnum) in alloc_lpt_leb() argument
153 n = *lnum - c->lpt_first + 1; in alloc_lpt_leb()
159 *lnum = i + c->lpt_first; in alloc_lpt_leb()
169 *lnum = i + c->lpt_first; in alloc_lpt_leb()
[all …]
Dtnc_commit.c26 struct ubifs_znode *znode, int lnum, int offs, int len) in make_idx_node() argument
41 br->lnum = cpu_to_le32(zbr->lnum); in make_idx_node()
45 if (!zbr->lnum || !zbr->len) { in make_idx_node()
57 znode->lnum = lnum; in make_idx_node()
69 zbr->lnum = lnum; in make_idx_node()
74 c->zroot.lnum = lnum; in make_idx_node()
106 static int fill_gap(struct ubifs_info *c, int lnum, int gap_start, int gap_end, in fill_gap() argument
129 lnum, gap_pos, len); in fill_gap()
149 lnum, gap_start, gap_end, gap_end - gap_start, written, pad_len); in fill_gap()
163 static int find_old_idx(struct ubifs_info *c, int lnum, int offs) in find_old_idx() argument
[all …]
Dfind.c30 int lnum; member
109 data->lnum = lprops->lnum; in scan_for_dirty_cb()
167 data.lnum = -1; in scan_for_dirty()
174 ubifs_assert(c, data.lnum >= c->main_first && data.lnum < c->leb_cnt); in scan_for_dirty()
175 c->lscan_lnum = data.lnum; in scan_for_dirty()
176 lprops = ubifs_lpt_lookup_dirty(c, data.lnum); in scan_for_dirty()
179 ubifs_assert(c, lprops->lnum == data.lnum); in scan_for_dirty()
322 lp->lnum, lp->free, lp->dirty, lp->flags); in ubifs_find_dirty_leb()
380 data->lnum = lprops->lnum; in scan_for_free_cb()
447 data.lnum = -1; in do_find_free_space()
[all …]
Drecovery.c97 static int get_master_node(const struct ubifs_info *c, int lnum, void **pbuf, in get_master_node() argument
108 err = ubifs_leb_read(c, lnum, sbuf, 0, c->leb_size, 0); in get_master_node()
132 ret = ubifs_scan_a_node(c, buf, len, lnum, offs, 1); in get_master_node()
138 ret = ubifs_scan_a_node(c, buf, len, lnum, offs, 1); in get_master_node()
152 dbg_rcvry("found a master node at %d:%d", lnum, offs); in get_master_node()
163 dbg_rcvry("found corruption at %d:%d", lnum, offs); in get_master_node()
195 int err = 0, lnum = UBIFS_MST_LNUM, sz = c->mst_node_alsz; in write_rcvrd_mst_node() local
207 err = ubifs_leb_change(c, lnum, mst, sz); in write_rcvrd_mst_node()
210 err = ubifs_leb_change(c, lnum + 1, mst, sz); in write_rcvrd_mst_node()
429 static void clean_buf(const struct ubifs_info *c, void **buf, int lnum, in clean_buf() argument
[all …]
Dio.c87 int ubifs_leb_read(const struct ubifs_info *c, int lnum, void *buf, int offs, in ubifs_leb_read() argument
92 err = ubi_read(c->ubi, lnum, buf, offs, len); in ubifs_leb_read()
99 len, lnum, offs, err); in ubifs_leb_read()
105 int ubifs_leb_write(struct ubifs_info *c, int lnum, const void *buf, int offs, in ubifs_leb_write() argument
114 err = ubi_leb_write(c->ubi, lnum, buf, offs, len); in ubifs_leb_write()
116 err = dbg_leb_write(c, lnum, buf, offs, len); in ubifs_leb_write()
119 len, lnum, offs, err); in ubifs_leb_write()
126 int ubifs_leb_change(struct ubifs_info *c, int lnum, const void *buf, int len) in ubifs_leb_change() argument
134 err = ubi_leb_change(c->ubi, lnum, buf, len); in ubifs_leb_change()
136 err = dbg_leb_change(c, lnum, buf, len); in ubifs_leb_change()
[all …]
Dscan.c57 int ubifs_scan_a_node(const struct ubifs_info *c, void *buf, int len, int lnum, in ubifs_scan_a_node() argument
66 dbg_scan("hit empty space at LEB %d:%d", lnum, offs); in ubifs_scan_a_node()
77 dbg_ntype(ch->node_type), lnum, offs); in ubifs_scan_a_node()
79 if (ubifs_check_node(c, buf, len, lnum, offs, quiet, 1)) in ubifs_scan_a_node()
92 lnum, offs); in ubifs_scan_a_node()
107 lnum, offs, ALIGN(offs + node_len + pad_len, 8)); in ubifs_scan_a_node()
125 struct ubifs_scan_leb *ubifs_start_scan(const struct ubifs_info *c, int lnum, in ubifs_start_scan() argument
131 dbg_scan("scan LEB %d:%d", lnum, offs); in ubifs_start_scan()
137 sleb->lnum = lnum; in ubifs_start_scan()
141 err = ubifs_leb_read(c, lnum, sbuf + offs, offs, c->leb_size - offs, 0); in ubifs_start_scan()
[all …]
Dreplay.c46 int lnum; member
95 lp = ubifs_lpt_lookup_dirty(c, b->bud->lnum); in set_bud_lprops()
122 dbg_mnt("bud LEB %d was GC'd (%d free, %d dirty)", b->bud->lnum, in set_bud_lprops()
124 dbg_gc("bud LEB %d was GC'd (%d free, %d dirty)", b->bud->lnum, in set_bud_lprops()
136 b->bud->lnum, lp->free, lp->dirty, b->free, in set_bud_lprops()
148 b->bud->lnum, c->leb_size - b->free); in set_bud_lprops()
248 r->lnum, r->offs, r->len, r->deletion, r->sqnum); in apply_replay_entry()
254 err = ubifs_tnc_add_nm(c, &r->key, r->lnum, r->offs, in apply_replay_entry()
279 err = ubifs_tnc_add(c, &r->key, r->lnum, r->offs, in apply_replay_entry()
383 static int insert_node(struct ubifs_info *c, int lnum, int offs, int len, in insert_node() argument
[all …]
Dgc.c72 wbuf->lnum, wbuf->offs + wbuf->used, gc_lnum, in switch_gc_head()
260 err = ubifs_tnc_has_node(c, &snod->key, 0, sleb->lnum, in sort_nodes()
306 int err, new_lnum = wbuf->lnum, new_offs = wbuf->offs + wbuf->used; in move_node()
313 err = ubifs_tnc_replace(c, &snod->key, sleb->lnum, in move_node()
337 if (wbuf->lnum == -1) { in move_nodes()
433 ubifs_add_dirt(c, wbuf->lnum, ubifs_auth_node_sz(c)); in move_nodes()
496 int err = 0, lnum = lp->lnum; in ubifs_garbage_collect_leb() local
500 ubifs_assert(c, c->gc_lnum != lnum); in ubifs_garbage_collect_leb()
501 ubifs_assert(c, wbuf->lnum != lnum); in ubifs_garbage_collect_leb()
505 dbg_gc("LEB %d is free, return it", lp->lnum); in ubifs_garbage_collect_leb()
[all …]
Dtnc.c57 if (old_idx->lnum < o->lnum) in do_insert_old_idx()
59 else if (old_idx->lnum > o->lnum) in do_insert_old_idx()
97 static int insert_old_idx(struct ubifs_info *c, int lnum, int offs) in insert_old_idx() argument
104 old_idx->lnum = lnum; in insert_old_idx()
125 return insert_old_idx(c, zbr->lnum, zbr->offs); in insert_old_idx_znode()
128 return insert_old_idx(c, c->zroot.lnum, in insert_old_idx_znode()
150 err = insert_old_idx(c, zbr->lnum, zbr->offs); in ins_clr_old_idx_znode()
153 zbr->lnum = 0; in ins_clr_old_idx_znode()
159 err = insert_old_idx(c, c->zroot.lnum, c->zroot.offs); in ins_clr_old_idx_znode()
162 c->zroot.lnum = 0; in ins_clr_old_idx_znode()
[all …]
Dlpt.c384 int lnum = nnode->nbranch[i].lnum; in ubifs_pack_nnode() local
386 if (lnum == 0) in ubifs_pack_nnode()
387 lnum = c->lpt_last + 1; in ubifs_pack_nnode()
388 pack_bits(c, &addr, &pos, lnum - c->lpt_first, c->lpt_lnum_bits); in ubifs_pack_nnode()
452 void ubifs_add_lpt_dirt(struct ubifs_info *c, int lnum, int dirty) in ubifs_add_lpt_dirt() argument
454 if (!dirty || !lnum) in ubifs_add_lpt_dirt()
457 lnum, dirty, c->ltab[lnum - c->lpt_first].dirty); in ubifs_add_lpt_dirt()
458 ubifs_assert(c, lnum >= c->lpt_first && lnum <= c->lpt_last); in ubifs_add_lpt_dirt()
459 c->ltab[lnum - c->lpt_first].dirty += dirty; in ubifs_add_lpt_dirt()
469 static void set_ltab(struct ubifs_info *c, int lnum, int free, int dirty) in set_ltab() argument
[all …]
Dubifs.h279 int lnum; member
320 int lnum; member
339 int lnum; member
436 int lnum; member
482 int lnum; member
589 int lnum; member
686 int lnum; member
692 int (*sync_callback)(struct ubifs_info *c, int lnum, int free, int pad);
712 int lnum; member
751 int lnum; member
[all …]
Djournal.c81 static void ubifs_add_auth_dirt(struct ubifs_info *c, int lnum) in ubifs_add_auth_dirt() argument
84 ubifs_add_dirt(c, lnum, ubifs_auth_node_sz(c)); in ubifs_add_auth_dirt()
100 int err = 0, err1, retries = 0, avail, lnum, offs, squeeze; in reserve_space() local
119 if (wbuf->lnum != -1 && avail >= len) in reserve_space()
126 lnum = ubifs_find_free_space(c, len, &offs, squeeze); in reserve_space()
127 if (lnum >= 0) in reserve_space()
130 err = lnum; in reserve_space()
142 lnum = ubifs_garbage_collect(c, 0); in reserve_space()
143 if (lnum < 0) { in reserve_space()
144 err = lnum; in reserve_space()
[all …]
Ddebug.c433 pr_err("\tlnum %u\n", le32_to_cpu(ref->lnum)); in ubifs_dump_node()
546 i, le32_to_cpu(br->lnum), le32_to_cpu(br->offs), in ubifs_dump_node()
656 c->jheads[i].wbuf.lnum); in ubifs_dump_budg()
659 pr_err("\tbud LEB %d\n", bud->lnum); in ubifs_dump_budg()
662 pr_err("\told bud LEB %d\n", bud->lnum); in ubifs_dump_budg()
665 idx_gc->lnum, idx_gc->unmap); in ubifs_dump_budg()
694 lp->lnum, lp->free, lp->dirty, c->leb_size - spc, spc, in ubifs_dump_lprop()
698 lp->lnum, lp->free, lp->dirty, c->leb_size - spc, spc, in ubifs_dump_lprop()
747 if (bud->lnum == lp->lnum) { in ubifs_dump_lprop()
756 lp->lnum == c->jheads[i].wbuf.lnum) { in ubifs_dump_lprop()
[all …]
Dsb.c284 br->lnum = cpu_to_le32(main_first + DEFAULT_DATA_LEB); in create_default_filesystem()
795 static int fixup_leb(struct ubifs_info *c, int lnum, int len) in fixup_leb() argument
804 dbg_mnt("unmap empty LEB %d", lnum); in fixup_leb()
805 return ubifs_leb_unmap(c, lnum); in fixup_leb()
808 dbg_mnt("fixup LEB %d, data len %d", lnum, len); in fixup_leb()
809 err = ubifs_leb_read(c, lnum, c->sbuf, 0, len, 1); in fixup_leb()
813 return ubifs_leb_change(c, lnum, c->sbuf, len); in fixup_leb()
825 int lnum, err = 0; in fixup_free_space() local
831 for (lnum = UBIFS_MST_LNUM; lnum < UBIFS_LOG_LNUM; lnum++) { in fixup_free_space()
832 err = fixup_leb(c, lnum, c->mst_offs + c->mst_node_alsz); in fixup_free_space()
[all …]
Dmisc.h161 static inline int ubifs_add_dirt(struct ubifs_info *c, int lnum, int dirty) in ubifs_add_dirt() argument
163 return ubifs_update_one_lp(c, lnum, LPROPS_NC, dirty, 0, 0); in ubifs_add_dirt()
175 static inline int ubifs_return_leb(struct ubifs_info *c, int lnum) in ubifs_return_leb() argument
177 return ubifs_change_one_lp(c, lnum, LPROPS_NC, LPROPS_NC, 0, in ubifs_return_leb()
270 static inline int ubifs_next_log_lnum(const struct ubifs_info *c, int lnum) in ubifs_next_log_lnum() argument
272 lnum += 1; in ubifs_next_log_lnum()
273 if (lnum > c->log_last) in ubifs_next_log_lnum()
274 lnum = UBIFS_LOG_LNUM; in ubifs_next_log_lnum()
276 return lnum; in ubifs_next_log_lnum()
Dlprops.c495 pos = (lprops->lnum - c->main_first) & (UBIFS_LPT_FANOUT - 1); in is_lprops_dirty()
532 lprops->lnum, free, dirty, flags); in ubifs_change_lp()
548 lprops = ubifs_lpt_lookup_dirty(c, lprops->lnum); in ubifs_change_lp()
552 ubifs_assert(c, lprops == ubifs_lpt_lookup_dirty(c, lprops->lnum)); in ubifs_change_lp()
649 int ubifs_change_one_lp(struct ubifs_info *c, int lnum, int free, int dirty, in ubifs_change_one_lp() argument
657 lp = ubifs_lpt_lookup_dirty(c, lnum); in ubifs_change_one_lp()
672 lnum, err); in ubifs_change_one_lp()
688 int ubifs_update_one_lp(struct ubifs_info *c, int lnum, int free, int dirty, in ubifs_update_one_lp() argument
696 lp = ubifs_lpt_lookup_dirty(c, lnum); in ubifs_update_one_lp()
711 lnum, err); in ubifs_update_one_lp()
[all …]
Dtnc_misc.c268 int lnum = zzbr->lnum; in read_znode() local
278 err = ubifs_read_node(c, idx, UBIFS_IDX_NODE, len, lnum, offs); in read_znode()
286 ubifs_bad_hash(c, idx, zzbr->hash, lnum, offs); in read_znode()
295 lnum, offs, znode->level, znode->child_cnt); in read_znode()
311 zbr->lnum = le32_to_cpu(br->lnum); in read_znode()
319 if (zbr->lnum < c->main_first || in read_znode()
320 zbr->lnum >= c->leb_cnt || zbr->offs < 0 || in read_znode()
392 ubifs_err(c, "bad indexing node at LEB %d:%d, error %d", lnum, offs, err); in read_znode()
471 wbuf = ubifs_get_wbuf(c, zbr->lnum); in ubifs_tnc_read_node()
474 zbr->lnum, zbr->offs); in ubifs_tnc_read_node()
[all …]
Dorphan.c416 int lnum; in write_orph_nodes() local
419 for (lnum = c->ohead_lnum + 1; lnum <= c->orph_last; lnum++) { in write_orph_nodes()
420 err = ubifs_leb_unmap(c, lnum); in write_orph_nodes()
561 int lnum, err; in ubifs_clear_orphans() local
563 for (lnum = c->orph_first; lnum <= c->orph_last; lnum++) { in ubifs_clear_orphans()
564 err = ubifs_leb_unmap(c, lnum); in ubifs_clear_orphans()
648 snod->type, sleb->lnum, snod->offs); in do_kill_orphans()
677 cmt_no, sleb->lnum, snod->offs); in do_kill_orphans()
683 dbg_rcvry("out of date LEB %d", sleb->lnum); in do_kill_orphans()
727 cmt_no, sleb->lnum, snod->offs); in do_kill_orphans()
[all …]
Dmaster.c94 int lnum, offs = 0, nodes_cnt, err; in scan_for_master() local
96 lnum = UBIFS_MST_LNUM; in scan_for_master()
98 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 1); in scan_for_master()
112 lnum += 1; in scan_for_master()
114 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 1); in scan_for_master()
159 snod->type, lnum, snod->offs); in scan_for_master()
199 if (c->zroot.lnum >= c->leb_cnt || c->zroot.lnum < c->main_first || in validate_master()
355 c->zroot.lnum = le32_to_cpu(c->mst_node->root_lnum); in ubifs_read_master()
436 int err, lnum, offs, len; in ubifs_write_master() local
442 lnum = UBIFS_MST_LNUM; in ubifs_write_master()
[all …]
Dcommit.c163 c->mst_node->root_lnum = cpu_to_le32(zroot.lnum); in do_commit()
517 int lnum, offs, len, err = 0; in dbg_old_index_check_init() local
521 lnum = d->old_zroot.lnum; in dbg_old_index_check_init()
529 err = ubifs_read_node(c, idx, UBIFS_IDX_NODE, len, lnum, offs); in dbg_old_index_check_init()
555 int lnum, offs, len, err = 0, last_level, child_cnt; in dbg_check_old_index() local
574 lnum = d->old_zroot.lnum; in dbg_check_old_index()
597 err = ubifs_read_node(c, idx, UBIFS_IDX_NODE, len, lnum, offs); in dbg_check_old_index()
685 lnum = le32_to_cpu(br->lnum); in dbg_check_old_index()
Ddebug.h254 void ubifs_dump_leb(const struct ubifs_info *c, int lnum);
292 int dbg_leb_write(struct ubifs_info *c, int lnum, const void *buf, int offs,
294 int dbg_leb_change(struct ubifs_info *c, int lnum, const void *buf, int len);
295 int dbg_leb_unmap(struct ubifs_info *c, int lnum);
296 int dbg_leb_map(struct ubifs_info *c, int lnum);
/fs/reiserfs/
Dibalance.c655 if (tb->lnum[h] == 0 && tb->rnum[h] == 0) { in balance_internal_when_delete()
697 if (tb->L[h] && tb->lnum[h] == -B_NR_ITEMS(tb->L[h]) - 1) { in balance_internal_when_delete()
711 RFALSE(tb->lnum[h] != 0, in balance_internal_when_delete()
713 h, tb->lnum[h]); in balance_internal_when_delete()
722 if (tb->lnum[h] < 0) { in balance_internal_when_delete()
727 -tb->lnum[h]); in balance_internal_when_delete()
733 RFALSE(tb->lnum[h] != 0, in balance_internal_when_delete()
735 h, tb->lnum[h]); in balance_internal_when_delete()
741 if (tb->lnum[h] > 0) { in balance_internal_when_delete()
742 RFALSE(tb->rnum[h] == 0 || tb->lnum[h] + tb->rnum[h] != n + 1, in balance_internal_when_delete()
[all …]
Dfix_node.c205 tb->lnum[h] = cur_free / (DC_SIZE + KEY_SIZE); in check_left()
213 tb->lnum[h] = 0; in check_left()
230 tb->lnum[0] = vn->vn_nr_item; in check_left()
241 tb->lnum[0] = 0; in check_left()
248 tb->lnum[0]++; in check_left()
268 tb->lnum[0]++; in check_left()
621 static void set_parameters(struct tree_balance *tb, int h, int lnum, in set_parameters() argument
625 tb->lnum[h] = lnum; in set_parameters()
641 PROC_INFO_ADD(tb->tb_sb, lnum[h], lnum); in set_parameters()
663 to_left = tb->lnum[0] - ((tb->lbytes != -1) ? 1 : 0); in is_leaf_removable()
[all …]
Ddo_balan.c152 if (tb->lnum[0] == -1) { in balance_leaf_when_delete_left()
206 RFALSE((tb->lnum[0] + tb->rnum[0] < n) || in balance_leaf_when_delete_left()
207 (tb->lnum[0] + tb->rnum[0] > n + 1), in balance_leaf_when_delete_left()
210 tb->rnum[0], tb->lnum[0], n); in balance_leaf_when_delete_left()
211 RFALSE((tb->lnum[0] + tb->rnum[0] == n) && in balance_leaf_when_delete_left()
216 RFALSE((tb->lnum[0] + tb->rnum[0] == n + 1) && in balance_leaf_when_delete_left()
222 leaf_shift_left(tb, tb->lnum[0], tb->lbytes); in balance_leaf_when_delete_left()
271 if (tb->lnum[0]) in balance_leaf_when_delete()
295 if (tb->item_pos == tb->lnum[0] - 1 && tb->lbytes != -1) { in balance_leaf_insert_left()
299 ret = leaf_shift_left(tb, tb->lnum[0] - 1, -1); in balance_leaf_insert_left()
[all …]

12