Home
last modified time | relevance | path

Searched refs:leb_size (Results 1 – 25 of 75) sorted by relevance

123

/openbmc/u-boot/fs/ubifs/
H A Dlprops.c407 if (lprops->free == c->leb_size) { in ubifs_categorize_lprops()
412 if (lprops->free + lprops->dirty == c->leb_size) { in ubifs_categorize_lprops()
562 if ((lprops->flags & LPROPS_TAKEN) && lprops->free == c->leb_size) in ubifs_change_lp()
574 c->lst.total_used -= c->leb_size - old_spc; in ubifs_change_lp()
582 if (free == c->leb_size) { in ubifs_change_lp()
583 if (lprops->free != c->leb_size) in ubifs_change_lp()
585 } else if (lprops->free == c->leb_size) in ubifs_change_lp()
615 c->lst.total_used += c->leb_size - new_spc; in ubifs_change_lp()
618 if ((lprops->flags & LPROPS_TAKEN) && lprops->free == c->leb_size) in ubifs_change_lp()
795 ubifs_assert(lprops->free == c->leb_size); in ubifs_fast_find_empty()
[all …]
H A Dlpt_commit.c164 if (c->ltab[i].free == c->leb_size) { in alloc_lpt_leb()
174 if (c->ltab[i].free == c->leb_size) { in alloc_lpt_leb()
205 if (!done_lsave && offs + c->lsave_sz <= c->leb_size) { in layout_cnodes()
213 if (offs + c->ltab_sz <= c->leb_size) { in layout_cnodes()
229 while (offs + len > c->leb_size) { in layout_cnodes()
231 upd_ltab(c, lnum, c->leb_size - alen, alen - offs); in layout_cnodes()
232 dbg_chk_lpt_sz(c, 2, c->leb_size - offs); in layout_cnodes()
272 if (offs + c->lsave_sz > c->leb_size) { in layout_cnodes()
274 upd_ltab(c, lnum, c->leb_size - alen, alen - offs); in layout_cnodes()
275 dbg_chk_lpt_sz(c, 2, c->leb_size - offs); in layout_cnodes()
[all …]
H A Dsb.c100 if (jnl_lebs * c->leb_size > DEFAULT_MAX_JNL) in create_default_filesystem()
101 jnl_lebs = DEFAULT_MAX_JNL / c->leb_size; in create_default_filesystem()
109 tmp = 2 * (c->ref_node_alsz * jnl_lebs) + c->leb_size - 1; in create_default_filesystem()
110 log_lebs = tmp / c->leb_size; in create_default_filesystem()
160 tmp64 = (long long)max_buds * c->leb_size; in create_default_filesystem()
168 sup->leb_size = cpu_to_le32(c->leb_size); in create_default_filesystem()
187 main_bytes = (long long)main_lebs * c->leb_size; in create_default_filesystem()
371 if (le32_to_cpu(sup->leb_size) != c->leb_size) { in validate_sb()
373 le32_to_cpu(sup->leb_size), c->leb_size); in validate_sb()
411 max_bytes = (long long)c->leb_size * UBIFS_MIN_BUD_LEBS; in validate_sb()
[all …]
H A Dlpt.c77 c->space_bits = fls(c->leb_size) - 3; in do_calc_lpt_geom()
79 c->lpt_offs_bits = fls(c->leb_size - 1); in do_calc_lpt_geom()
80 c->lpt_spc_bits = fls(c->leb_size); in do_calc_lpt_geom()
117 while (sz > c->leb_size) { in do_calc_lpt_geom()
119 sz -= c->leb_size; in do_calc_lpt_geom()
141 lebs_needed = div_u64(sz + c->leb_size - 1, c->leb_size); in ubifs_calc_lpt_geom()
148 if (c->ltab_sz > c->leb_size) { in ubifs_calc_lpt_geom()
191 if (c->lpt_sz > c->leb_size) { in calc_dflt_lpt_geom()
200 lebs_needed = div_u64(sz + c->leb_size - 1, c->leb_size); in calc_dflt_lpt_geom()
210 if (c->ltab_sz > c->leb_size) { in calc_dflt_lpt_geom()
[all …]
H A Dio.c246 ubifs_assert(!(offs & 7) && offs < c->leb_size); in ubifs_check_node()
265 if (node_len + offs > c->leb_size) in ubifs_check_node()
511 ubifs_assert(wbuf->offs + wbuf->size <= c->leb_size); in ubifs_wbuf_sync_nolock()
516 if (c->leb_size - wbuf->offs >= c->max_write_size) in ubifs_wbuf_sync_nolock()
546 if (c->leb_size - wbuf->offs < c->max_write_size) in ubifs_wbuf_sync_nolock()
547 wbuf->size = c->leb_size - wbuf->offs; in ubifs_wbuf_sync_nolock()
559 c->leb_size - wbuf->offs, dirt); in ubifs_wbuf_sync_nolock()
579 ubifs_assert(offs >= 0 && offs <= c->leb_size); in ubifs_wbuf_seek_nolock()
587 if (c->leb_size - wbuf->offs < c->max_write_size) in ubifs_wbuf_seek_nolock()
588 wbuf->size = c->leb_size - wbuf->offs; in ubifs_wbuf_seek_nolock()
[all …]
H A Dlog.c97 h = (long long)c->lhead_lnum * c->leb_size + c->lhead_offs; in empty_log_bytes()
98 t = (long long)c->ltail_lnum * c->leb_size; in empty_log_bytes()
147 c->bud_bytes += c->leb_size - bud->start; in ubifs_add_bud()
207 if (c->bud_bytes + c->leb_size - offs > c->max_bud_bytes) { in ubifs_add_bud_to_log()
236 if (c->lhead_offs > c->leb_size - c->ref_node_alsz) { in ubifs_add_bud_to_log()
319 c->cmt_bud_bytes += c->leb_size - bud->start; in remove_buds()
322 c->leb_size - bud->start, c->cmt_bud_bytes); in remove_buds()
383 if (lnum == -1 || offs == c->leb_size) in ubifs_log_start_commit()
421 if (c->lhead_offs == c->leb_size) { in ubifs_log_start_commit()
468 c->min_log_bytes = c->leb_size; in ubifs_log_end_commit()
[all …]
H A Dmaster.c113 c->lhead_offs < 0 || c->lhead_offs >= c->leb_size || in validate_master()
120 c->zroot.offs >= c->leb_size || c->zroot.offs & 7) { in validate_master()
138 c->ihead_offs > c->leb_size || c->ihead_offs & 7) { in validate_master()
143 main_sz = (long long)c->main_lebs * c->leb_size; in validate_master()
150 c->lpt_offs < 0 || c->lpt_offs + c->nnode_sz > c->leb_size) { in validate_master()
157 c->nhead_offs > c->leb_size) { in validate_master()
164 c->ltab_offs + c->ltab_sz > c->leb_size) { in validate_master()
171 c->lsave_offs + c->lsave_sz > c->leb_size)) { in validate_master()
320 c->lst.total_free += growth * (long long)c->leb_size; in ubifs_read_master()
367 if (offs + UBIFS_MST_NODE_SZ > c->leb_size) { in ubifs_write_master()
H A Dgc.c79 c->leb_size - wbuf->offs - wbuf->used); in switch_gc_head()
366 avail = c->leb_size - wbuf->offs - wbuf->used; in move_nodes()
381 avail = c->leb_size - wbuf->offs - wbuf->used; in move_nodes()
471 if (lp->free + lp->dirty == c->leb_size) { in ubifs_garbage_collect_leb()
476 if (lp->free != c->leb_size) { in ubifs_garbage_collect_leb()
485 err = ubifs_change_one_lp(c, lp->lnum, c->leb_size, in ubifs_garbage_collect_leb()
546 err = ubifs_change_one_lp(c, lnum, c->leb_size, 0, 0, in ubifs_garbage_collect_leb()
563 err = ubifs_change_one_lp(c, lnum, c->leb_size, 0, 0, 0, 0); in ubifs_garbage_collect_leb()
710 space_before = c->leb_size - wbuf->offs - wbuf->used; in ubifs_garbage_collect()
750 space_after = c->leb_size - wbuf->offs - wbuf->used; in ubifs_garbage_collect()
[all …]
H A Drecovery.c108 sbuf = vmalloc(c->leb_size); in get_master_node()
112 err = ubifs_leb_read(c, lnum, sbuf, 0, c->leb_size, 0); in get_master_node()
119 len = c->leb_size; in get_master_node()
120 while (offs + UBIFS_MST_NODE_SZ <= c->leb_size) { in get_master_node()
164 if (offs < c->leb_size) { in get_master_node()
174 if (offs < c->leb_size) in get_master_node()
270 c->leb_size - offs2 - sz < sz) { in ubifs_recover_master_node()
295 if (offs2 + sz + sz <= c->leb_size) in ubifs_recover_master_node()
417 check_len = c->leb_size - empty_offs; in is_last_write()
449 memset(*buf, 0xff, c->leb_size - empty_offs); in clean_buf()
[all …]
H A Dscan.c93 offs + node_len + pad_len > c->leb_size) { in ubifs_scan_a_node()
145 err = ubifs_leb_read(c, lnum, sbuf + offs, offs, c->leb_size - offs, 0); in ubifs_start_scan()
148 c->leb_size - offs, lnum, offs, err); in ubifs_start_scan()
236 len = c->leb_size - offs; in ubifs_scanned_corruption()
263 int err, len = c->leb_size - offs; in ubifs_scan()
H A Dsuper.c696 c->leb_size = c->vi.usable_leb_size; in init_constants_early()
698 c->half_leb_size = c->leb_size / 2; in init_constants_early()
704 if (c->leb_size < UBIFS_MIN_LEB_SZ) { in init_constants_early()
706 c->leb_size, UBIFS_MIN_LEB_SZ); in init_constants_early()
765 c->ranges[UBIFS_ORPH_NODE].max_len = c->leb_size; in init_constants_early()
795 c->leb_overhead = c->leb_size % UBIFS_MAX_DATA_NODE_SZ; in init_constants_early()
799 if (c->max_bu_buf_len > c->leb_size) in init_constants_early()
800 c->max_bu_buf_len = c->leb_size; in init_constants_early()
838 c->main_bytes = (long long)c->main_lebs * c->leb_size; in init_constants_sb()
853 if (tmp > c->leb_size) { in init_constants_sb()
[all …]
/openbmc/linux/fs/ubifs/
H A Dlpt_commit.c157 if (c->ltab[i].free == c->leb_size) { in alloc_lpt_leb()
167 if (c->ltab[i].free == c->leb_size) { in alloc_lpt_leb()
198 if (!done_lsave && offs + c->lsave_sz <= c->leb_size) { in layout_cnodes()
206 if (offs + c->ltab_sz <= c->leb_size) { in layout_cnodes()
222 while (offs + len > c->leb_size) { in layout_cnodes()
224 upd_ltab(c, lnum, c->leb_size - alen, alen - offs); in layout_cnodes()
225 dbg_chk_lpt_sz(c, 2, c->leb_size - offs); in layout_cnodes()
265 if (offs + c->lsave_sz > c->leb_size) { in layout_cnodes()
267 upd_ltab(c, lnum, c->leb_size - alen, alen - offs); in layout_cnodes()
268 dbg_chk_lpt_sz(c, 2, c->leb_size - offs); in layout_cnodes()
[all …]
H A Dlprops.c402 if (lprops->free == c->leb_size) { in ubifs_categorize_lprops()
407 if (lprops->free + lprops->dirty == c->leb_size) { in ubifs_categorize_lprops()
557 if ((lprops->flags & LPROPS_TAKEN) && lprops->free == c->leb_size) in ubifs_change_lp()
569 c->lst.total_used -= c->leb_size - old_spc; in ubifs_change_lp()
577 if (free == c->leb_size) { in ubifs_change_lp()
578 if (lprops->free != c->leb_size) in ubifs_change_lp()
580 } else if (lprops->free == c->leb_size) in ubifs_change_lp()
610 c->lst.total_used += c->leb_size - new_spc; in ubifs_change_lp()
613 if ((lprops->flags & LPROPS_TAKEN) && lprops->free == c->leb_size) in ubifs_change_lp()
790 ubifs_assert(c, lprops->free == c->leb_size); in ubifs_fast_find_empty()
[all …]
H A Dsb.c109 if (jnl_lebs * c->leb_size > DEFAULT_MAX_JNL) in create_default_filesystem()
110 jnl_lebs = DEFAULT_MAX_JNL / c->leb_size; in create_default_filesystem()
118 tmp = 2 * (c->ref_node_alsz * jnl_lebs) + c->leb_size - 1; in create_default_filesystem()
119 log_lebs = tmp / c->leb_size; in create_default_filesystem()
177 tmp64 = (long long)max_buds * c->leb_size; in create_default_filesystem()
197 sup->leb_size = cpu_to_le32(c->leb_size); in create_default_filesystem()
216 main_bytes = (long long)main_lebs * c->leb_size; in create_default_filesystem()
400 if (le32_to_cpu(sup->leb_size) != c->leb_size) { in validate_sb()
402 le32_to_cpu(sup->leb_size), c->leb_size); in validate_sb()
440 max_bytes = (long long)c->leb_size * UBIFS_MIN_BUD_LEBS; in validate_sb()
[all …]
H A Dlog.c94 h = (long long)c->lhead_lnum * c->leb_size + c->lhead_offs; in empty_log_bytes()
95 t = (long long)c->ltail_lnum * c->leb_size; in empty_log_bytes()
144 c->bud_bytes += c->leb_size - bud->start; in ubifs_add_bud()
204 if (c->bud_bytes + c->leb_size - offs > c->max_bud_bytes) { in ubifs_add_bud_to_log()
234 if (c->lhead_offs > c->leb_size - c->ref_node_alsz) { in ubifs_add_bud_to_log()
325 c->cmt_bud_bytes += c->leb_size - bud->start; in remove_buds()
328 c->leb_size - bud->start, c->cmt_bud_bytes); in remove_buds()
397 if (lnum == -1 || offs == c->leb_size) in ubifs_log_start_commit()
441 ubifs_assert(c, c->lhead_offs < c->leb_size); in ubifs_log_start_commit()
485 c->min_log_bytes = c->leb_size; in ubifs_log_end_commit()
[all …]
H A Dlpt.c70 c->space_bits = fls(c->leb_size) - 3; in do_calc_lpt_geom()
72 c->lpt_offs_bits = fls(c->leb_size - 1); in do_calc_lpt_geom()
73 c->lpt_spc_bits = fls(c->leb_size); in do_calc_lpt_geom()
110 while (sz > c->leb_size) { in do_calc_lpt_geom()
112 sz -= c->leb_size; in do_calc_lpt_geom()
134 lebs_needed = div_u64(sz + c->leb_size - 1, c->leb_size); in ubifs_calc_lpt_geom()
141 if (c->ltab_sz > c->leb_size) { in ubifs_calc_lpt_geom()
184 if (c->lpt_sz > c->leb_size) { in calc_dflt_lpt_geom()
193 lebs_needed = div_u64(sz + c->leb_size - 1, c->leb_size); in calc_dflt_lpt_geom()
203 if (c->ltab_sz > c->leb_size) { in calc_dflt_lpt_geom()
[all …]
H A Dio.c252 ubifs_assert(c, !(offs & 7) && offs < c->leb_size); in ubifs_check_node()
273 if (node_len + offs > c->leb_size) in ubifs_check_node()
571 ubifs_assert(c, wbuf->offs + wbuf->size <= c->leb_size); in ubifs_wbuf_sync_nolock()
576 if (c->leb_size - wbuf->offs >= c->max_write_size) in ubifs_wbuf_sync_nolock()
606 if (c->leb_size - wbuf->offs < c->max_write_size) in ubifs_wbuf_sync_nolock()
607 wbuf->size = c->leb_size - wbuf->offs; in ubifs_wbuf_sync_nolock()
619 c->leb_size - wbuf->offs, dirt); in ubifs_wbuf_sync_nolock()
639 ubifs_assert(c, offs >= 0 && offs <= c->leb_size); in ubifs_wbuf_seek_nolock()
647 if (c->leb_size - wbuf->offs < c->max_write_size) in ubifs_wbuf_seek_nolock()
648 wbuf->size = c->leb_size - wbuf->offs; in ubifs_wbuf_seek_nolock()
[all …]
H A Dtnc_commit.c141 if (gap_end == c->leb_size) { in fill_gap()
287 c->ileb_len = c->leb_size; in layout_leb_in_gaps()
288 gap_end = c->leb_size; in layout_leb_in_gaps()
301 if (lp.free == c->leb_size) { in layout_leb_in_gaps()
307 c->leb_size - c->ileb_len, in layout_leb_in_gaps()
314 err = ubifs_change_one_lp(c, lnum, c->leb_size - c->ileb_len, dirt, in layout_leb_in_gaps()
339 cnt -= (c->leb_size - c->ihead_offs) / c->max_idx_node_sz; in get_leb_cnt()
342 d = c->leb_size / c->max_idx_node_sz; in get_leb_cnt()
449 if (buf_offs + next_len > c->leb_size) in layout_in_empty_space()
515 buf_offs + used + next_len <= c->leb_size && in layout_in_empty_space()
[all …]
H A Drecovery.c104 sbuf = vmalloc(c->leb_size); in get_master_node()
108 err = ubifs_leb_read(c, lnum, sbuf, 0, c->leb_size, 0); in get_master_node()
115 len = c->leb_size; in get_master_node()
116 while (offs + UBIFS_MST_NODE_SZ <= c->leb_size) { in get_master_node()
160 if (offs < c->leb_size) { in get_master_node()
170 if (offs < c->leb_size) in get_master_node()
267 c->leb_size - offs2 - sz < sz) { in ubifs_recover_master_node()
292 if (offs2 + sz + sz <= c->leb_size) in ubifs_recover_master_node()
355 ubifs_dump_node(c, mst1, c->leb_size - ((void *)mst1 - buf1)); in ubifs_recover_master_node()
359 ubifs_dump_node(c, mst2, c->leb_size - ((void *)mst2 - buf2)); in ubifs_recover_master_node()
[all …]
H A Dmaster.c193 c->lhead_offs < 0 || c->lhead_offs >= c->leb_size || in validate_master()
200 c->zroot.offs >= c->leb_size || c->zroot.offs & 7) { in validate_master()
218 c->ihead_offs > c->leb_size || c->ihead_offs & 7) { in validate_master()
223 main_sz = (long long)c->main_lebs * c->leb_size; in validate_master()
230 c->lpt_offs < 0 || c->lpt_offs + c->nnode_sz > c->leb_size) { in validate_master()
237 c->nhead_offs > c->leb_size) { in validate_master()
244 c->ltab_offs + c->ltab_sz > c->leb_size) { in validate_master()
251 c->lsave_offs + c->lsave_sz > c->leb_size)) { in validate_master()
402 c->lst.total_free += growth * (long long)c->leb_size; in ubifs_read_master()
446 if (offs + UBIFS_MST_NODE_SZ > c->leb_size) { in ubifs_write_master()
H A Dsuper.c531 c->leb_size = c->vi.usable_leb_size; in init_constants_early()
533 c->half_leb_size = c->leb_size / 2; in init_constants_early()
539 if (c->leb_size < UBIFS_MIN_LEB_SZ) { in init_constants_early()
541 c->leb_size, UBIFS_MIN_LEB_SZ); in init_constants_early()
599 c->ranges[UBIFS_SIG_NODE].max_len = c->leb_size - UBIFS_SB_NODE_SZ; in init_constants_early()
605 c->ranges[UBIFS_ORPH_NODE].max_len = c->leb_size; in init_constants_early()
635 c->leb_overhead = c->leb_size % UBIFS_MAX_DATA_NODE_SZ; in init_constants_early()
639 if (c->max_bu_buf_len > c->leb_size) in init_constants_early()
640 c->max_bu_buf_len = c->leb_size; in init_constants_early()
643 c->min_log_bytes = c->leb_size; in init_constants_early()
[all …]
H A Dgc.c73 c->leb_size - wbuf->offs - wbuf->used); in switch_gc_head()
358 avail = c->leb_size - wbuf->offs - wbuf->used - in move_nodes()
380 avail = c->leb_size - wbuf->offs - wbuf->used - in move_nodes()
503 if (lp->free + lp->dirty == c->leb_size) { in ubifs_garbage_collect_leb()
508 if (lp->free != c->leb_size) { in ubifs_garbage_collect_leb()
517 err = ubifs_change_one_lp(c, lp->lnum, c->leb_size, in ubifs_garbage_collect_leb()
578 err = ubifs_change_one_lp(c, lnum, c->leb_size, 0, 0, in ubifs_garbage_collect_leb()
595 err = ubifs_change_one_lp(c, lnum, c->leb_size, 0, 0, 0, 0); in ubifs_garbage_collect_leb()
745 space_before = c->leb_size - wbuf->offs - wbuf->used; in ubifs_garbage_collect()
796 space_after = c->leb_size - wbuf->offs - wbuf->used; in ubifs_garbage_collect()
[all …]
H A Dscan.c89 offs + node_len + pad_len > c->leb_size) { in ubifs_scan_a_node()
141 err = ubifs_leb_read(c, lnum, sbuf + offs, offs, c->leb_size - offs, 0); in ubifs_start_scan()
144 c->leb_size - offs, lnum, offs, err); in ubifs_start_scan()
231 len = c->leb_size - offs; in ubifs_scanned_corruption()
258 int err, len = c->leb_size - offs; in ubifs_scan()
H A Dfind.c102 if (lprops->free + lprops->dirty == c->leb_size) { in scan_for_dirty_cb()
183 lprops->free + lprops->dirty == c->leb_size)); in scan_for_dirty()
318 (pick_free && lp->free + lp->dirty == c->leb_size)); in ubifs_find_dirty_leb()
369 if (!data->pick_free && lprops->free == c->leb_size) in scan_for_free_cb()
377 if (lprops->free + lprops->dirty == c->leb_size && lprops->dirty > 0) in scan_for_free_cb()
549 *offs = c->leb_size - lprops->free; in ubifs_find_free_space()
564 dbg_find("found LEB %d, free %d", lnum, c->leb_size - *offs); in ubifs_find_free_space()
565 ubifs_assert(c, *offs <= c->leb_size - min_space); in ubifs_find_free_space()
606 if (lprops->free + lprops->dirty != c->leb_size) in scan_for_idx_cb()
639 ubifs_assert(c, lprops->free + lprops->dirty == c->leb_size); in scan_for_leb_for_idx()
[all …]
H A Dorphan.c278 ((c->leb_size - UBIFS_ORPH_NODE_SZ) / sizeof(__le64)); in avail_orphs()
279 gap = c->leb_size - c->ohead_offs; in avail_orphs()
298 ((c->leb_size - UBIFS_ORPH_NODE_SZ) / sizeof(__le64)); in tot_avail_orphs()
350 gap = c->leb_size - c->ohead_offs; in write_orph_node()
354 gap = c->leb_size; in write_orph_node()
389 ubifs_assert(c, c->ohead_offs + len <= c->leb_size); in write_orph_node()
650 c->leb_size - snod->offs); in do_kill_orphans()
679 c->leb_size - snod->offs); in do_kill_orphans()
823 c->orph_buf = vmalloc(c->leb_size); in ubifs_mount_orphans()
984 buf = __vmalloc(c->leb_size, GFP_NOFS); in dbg_scan_orphans()

123