Home
last modified time | relevance | path

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

12

/rk3399_rockchip-uboot/fs/ubifs/
H A Dlprops.c408 if (lprops->free == c->leb_size) { in ubifs_categorize_lprops()
413 if (lprops->free + lprops->dirty == c->leb_size) { in ubifs_categorize_lprops()
563 if ((lprops->flags & LPROPS_TAKEN) && lprops->free == c->leb_size) in ubifs_change_lp()
575 c->lst.total_used -= c->leb_size - old_spc; in ubifs_change_lp()
583 if (free == c->leb_size) { in ubifs_change_lp()
584 if (lprops->free != c->leb_size) in ubifs_change_lp()
586 } else if (lprops->free == c->leb_size) in ubifs_change_lp()
616 c->lst.total_used += c->leb_size - new_spc; in ubifs_change_lp()
619 if ((lprops->flags & LPROPS_TAKEN) && lprops->free == c->leb_size) in ubifs_change_lp()
796 ubifs_assert(lprops->free == c->leb_size); in ubifs_fast_find_empty()
[all …]
H A Dlpt_commit.c165 if (c->ltab[i].free == c->leb_size) { in alloc_lpt_leb()
175 if (c->ltab[i].free == c->leb_size) { in alloc_lpt_leb()
206 if (!done_lsave && offs + c->lsave_sz <= c->leb_size) { in layout_cnodes()
214 if (offs + c->ltab_sz <= c->leb_size) { in layout_cnodes()
230 while (offs + len > c->leb_size) { in layout_cnodes()
232 upd_ltab(c, lnum, c->leb_size - alen, alen - offs); in layout_cnodes()
233 dbg_chk_lpt_sz(c, 2, c->leb_size - offs); in layout_cnodes()
273 if (offs + c->lsave_sz > c->leb_size) { in layout_cnodes()
275 upd_ltab(c, lnum, c->leb_size - alen, alen - offs); in layout_cnodes()
276 dbg_chk_lpt_sz(c, 2, c->leb_size - offs); in layout_cnodes()
[all …]
H A Dsb.c101 if (jnl_lebs * c->leb_size > DEFAULT_MAX_JNL) in create_default_filesystem()
102 jnl_lebs = DEFAULT_MAX_JNL / c->leb_size; in create_default_filesystem()
110 tmp = 2 * (c->ref_node_alsz * jnl_lebs) + c->leb_size - 1; in create_default_filesystem()
111 log_lebs = tmp / c->leb_size; in create_default_filesystem()
161 tmp64 = (long long)max_buds * c->leb_size; in create_default_filesystem()
169 sup->leb_size = cpu_to_le32(c->leb_size); in create_default_filesystem()
188 main_bytes = (long long)main_lebs * c->leb_size; in create_default_filesystem()
372 if (le32_to_cpu(sup->leb_size) != c->leb_size) { in validate_sb()
374 le32_to_cpu(sup->leb_size), c->leb_size); in validate_sb()
412 max_bytes = (long long)c->leb_size * UBIFS_MIN_BUD_LEBS; in validate_sb()
[all …]
H A Dlpt.c78 c->space_bits = fls(c->leb_size) - 3; in do_calc_lpt_geom()
80 c->lpt_offs_bits = fls(c->leb_size - 1); in do_calc_lpt_geom()
81 c->lpt_spc_bits = fls(c->leb_size); in do_calc_lpt_geom()
118 while (sz > c->leb_size) { in do_calc_lpt_geom()
120 sz -= c->leb_size; in do_calc_lpt_geom()
142 lebs_needed = div_u64(sz + c->leb_size - 1, c->leb_size); in ubifs_calc_lpt_geom()
149 if (c->ltab_sz > c->leb_size) { in ubifs_calc_lpt_geom()
192 if (c->lpt_sz > c->leb_size) { in calc_dflt_lpt_geom()
201 lebs_needed = div_u64(sz + c->leb_size - 1, c->leb_size); in calc_dflt_lpt_geom()
211 if (c->ltab_sz > c->leb_size) { in calc_dflt_lpt_geom()
[all …]
H A Dio.c247 ubifs_assert(!(offs & 7) && offs < c->leb_size); in ubifs_check_node()
266 if (node_len + offs > c->leb_size) in ubifs_check_node()
512 ubifs_assert(wbuf->offs + wbuf->size <= c->leb_size); in ubifs_wbuf_sync_nolock()
517 if (c->leb_size - wbuf->offs >= c->max_write_size) in ubifs_wbuf_sync_nolock()
547 if (c->leb_size - wbuf->offs < c->max_write_size) in ubifs_wbuf_sync_nolock()
548 wbuf->size = c->leb_size - wbuf->offs; in ubifs_wbuf_sync_nolock()
560 c->leb_size - wbuf->offs, dirt); in ubifs_wbuf_sync_nolock()
580 ubifs_assert(offs >= 0 && offs <= c->leb_size); in ubifs_wbuf_seek_nolock()
588 if (c->leb_size - wbuf->offs < c->max_write_size) in ubifs_wbuf_seek_nolock()
589 wbuf->size = c->leb_size - wbuf->offs; in ubifs_wbuf_seek_nolock()
[all …]
H A Dlog.c98 h = (long long)c->lhead_lnum * c->leb_size + c->lhead_offs; in empty_log_bytes()
99 t = (long long)c->ltail_lnum * c->leb_size; in empty_log_bytes()
148 c->bud_bytes += c->leb_size - bud->start; in ubifs_add_bud()
208 if (c->bud_bytes + c->leb_size - offs > c->max_bud_bytes) { in ubifs_add_bud_to_log()
237 if (c->lhead_offs > c->leb_size - c->ref_node_alsz) { in ubifs_add_bud_to_log()
320 c->cmt_bud_bytes += c->leb_size - bud->start; in remove_buds()
323 c->leb_size - bud->start, c->cmt_bud_bytes); in remove_buds()
384 if (lnum == -1 || offs == c->leb_size) in ubifs_log_start_commit()
422 if (c->lhead_offs == c->leb_size) { in ubifs_log_start_commit()
469 c->min_log_bytes = c->leb_size; in ubifs_log_end_commit()
[all …]
H A Dmaster.c114 c->lhead_offs < 0 || c->lhead_offs >= c->leb_size || in validate_master()
121 c->zroot.offs >= c->leb_size || c->zroot.offs & 7) { in validate_master()
139 c->ihead_offs > c->leb_size || c->ihead_offs & 7) { in validate_master()
144 main_sz = (long long)c->main_lebs * c->leb_size; in validate_master()
151 c->lpt_offs < 0 || c->lpt_offs + c->nnode_sz > c->leb_size) { in validate_master()
158 c->nhead_offs > c->leb_size) { in validate_master()
165 c->ltab_offs + c->ltab_sz > c->leb_size) { in validate_master()
172 c->lsave_offs + c->lsave_sz > c->leb_size)) { in validate_master()
321 c->lst.total_free += growth * (long long)c->leb_size; in ubifs_read_master()
368 if (offs + UBIFS_MST_NODE_SZ > c->leb_size) { in ubifs_write_master()
H A Dgc.c80 c->leb_size - wbuf->offs - wbuf->used); in switch_gc_head()
367 avail = c->leb_size - wbuf->offs - wbuf->used; in move_nodes()
382 avail = c->leb_size - wbuf->offs - wbuf->used; in move_nodes()
472 if (lp->free + lp->dirty == c->leb_size) { in ubifs_garbage_collect_leb()
477 if (lp->free != c->leb_size) { in ubifs_garbage_collect_leb()
486 err = ubifs_change_one_lp(c, lp->lnum, c->leb_size, in ubifs_garbage_collect_leb()
547 err = ubifs_change_one_lp(c, lnum, c->leb_size, 0, 0, in ubifs_garbage_collect_leb()
564 err = ubifs_change_one_lp(c, lnum, c->leb_size, 0, 0, 0, 0); in ubifs_garbage_collect_leb()
711 space_before = c->leb_size - wbuf->offs - wbuf->used; in ubifs_garbage_collect()
751 space_after = c->leb_size - wbuf->offs - wbuf->used; in ubifs_garbage_collect()
[all …]
H A Dscan.c94 offs + node_len + pad_len > c->leb_size) { in ubifs_scan_a_node()
146 err = ubifs_leb_read(c, lnum, sbuf + offs, offs, c->leb_size - offs, 0); in ubifs_start_scan()
149 c->leb_size - offs, lnum, offs, err); in ubifs_start_scan()
237 len = c->leb_size - offs; in ubifs_scanned_corruption()
264 int err, len = c->leb_size - offs; in ubifs_scan()
H A Drecovery.c109 sbuf = vmalloc(c->leb_size); in get_master_node()
113 err = ubifs_leb_read(c, lnum, sbuf, 0, c->leb_size, 0); in get_master_node()
120 len = c->leb_size; in get_master_node()
121 while (offs + UBIFS_MST_NODE_SZ <= c->leb_size) { in get_master_node()
165 if (offs < c->leb_size) { in get_master_node()
175 if (offs < c->leb_size) in get_master_node()
271 c->leb_size - offs2 - sz < sz) { in ubifs_recover_master_node()
296 if (offs2 + sz + sz <= c->leb_size) in ubifs_recover_master_node()
418 check_len = c->leb_size - empty_offs; in is_last_write()
450 memset(*buf, 0xff, c->leb_size - empty_offs); in clean_buf()
[all …]
H A Dsuper.c697 c->leb_size = c->vi.usable_leb_size; in init_constants_early()
699 c->half_leb_size = c->leb_size / 2; in init_constants_early()
705 if (c->leb_size < UBIFS_MIN_LEB_SZ) { in init_constants_early()
707 c->leb_size, UBIFS_MIN_LEB_SZ); in init_constants_early()
766 c->ranges[UBIFS_ORPH_NODE].max_len = c->leb_size; in init_constants_early()
796 c->leb_overhead = c->leb_size % UBIFS_MAX_DATA_NODE_SZ; in init_constants_early()
800 if (c->max_bu_buf_len > c->leb_size) in init_constants_early()
801 c->max_bu_buf_len = c->leb_size; in init_constants_early()
839 c->main_bytes = (long long)c->main_lebs * c->leb_size; in init_constants_sb()
854 if (tmp > c->leb_size) { in init_constants_sb()
[all …]
H A Dorphan.c198 ((c->leb_size - UBIFS_ORPH_NODE_SZ) / sizeof(__le64)); in avail_orphs()
199 gap = c->leb_size - c->ohead_offs; in avail_orphs()
218 ((c->leb_size - UBIFS_ORPH_NODE_SZ) / sizeof(__le64)); in tot_avail_orphs()
270 gap = c->leb_size - c->ohead_offs; in write_orph_node()
274 gap = c->leb_size; in write_orph_node()
309 ubifs_assert(c->ohead_offs + len <= c->leb_size); in write_orph_node()
706 c->orph_buf = vmalloc(c->leb_size); in ubifs_mount_orphans()
878 buf = __vmalloc(c->leb_size, GFP_NOFS, PAGE_KERNEL); in dbg_scan_orphans()
H A Dreplay.c105 if (b->bud->start == 0 && (lp->free != c->leb_size || lp->dirty != 0)) { in set_bud_lprops()
129 dirty -= c->leb_size - lp->free; in set_bud_lprops()
151 b->bud->lnum, c->leb_size - b->free); in set_bud_lprops()
673 b->free = c->leb_size - sleb->endpt; in replay_bud()
793 lnum < c->main_first || offs > c->leb_size || in validate_ref()
941 if (sleb->endpt || c->lhead_offs >= c->leb_size) { in replay_log_leb()
1013 if (c->ihead_offs != c->leb_size - free) { in ubifs_replay_journal()
H A Dubifs-media.h622 __le32 leb_size; member
/rk3399_rockchip-uboot/drivers/mtd/ubi/
H A Dwl.h16 *count += (ubi->fm_size / ubi->leb_size) * 2; in ubi_fastmap_init()
H A Dvtbl.c206 if (alignment > ubi->leb_size || alignment == 0) {
217 n = ubi->leb_size % alignment;
553 vol->usable_leb_size = ubi->leb_size - vol->data_pad;
630 vol->usable_leb_size = ubi->leb_size;
634 (long long)vol->used_ebs * (ubi->leb_size - vol->data_pad);
785 ubi->vtbl_slots = ubi->leb_size / UBI_VTBL_RECORD_SIZE;
H A Dvmt.c206 vol->usable_leb_size = ubi->leb_size - ubi->leb_size % req->alignment; in ubi_create_volume()
226 vol->data_pad = ubi->leb_size % vol->alignment; in ubi_create_volume()
673 if (vol->alignment > ubi->leb_size || vol->alignment == 0) { in self_check_volume()
684 n = ubi->leb_size % vol->alignment; in self_check_volume()
706 n = ubi->leb_size - vol->data_pad; in self_check_volume()
707 if (vol->usable_leb_size != ubi->leb_size - vol->data_pad) { in self_check_volume()
H A Dattach.c765 memset(ubi->peb_buf, 0x00, ubi->leb_size); in check_corruption()
768 ubi->leb_size); in check_corruption()
784 if (ubi_check_pattern(ubi->peb_buf, 0xFF, ubi->leb_size)) in check_corruption()
792 pnum, ubi->leb_start, ubi->leb_size); in check_corruption()
794 ubi->peb_buf, ubi->leb_size, 1); in check_corruption()
1551 if (av->data_pad > ubi->leb_size / 2) { in self_check_ai()
H A Dfastmap.c101 return roundup(size, ubi->leb_size); in ubi_calc_fm_size()
934 fm_size = ubi->leb_size * used_blocks; in ubi_scan_fastmap()
1017 ret = ubi_io_read(ubi, ubi->fm_buf + (ubi->leb_size * i), pnum, in ubi_scan_fastmap()
1018 ubi->leb_start, ubi->leb_size); in ubi_scan_fastmap()
1331 ret = ubi_io_write(ubi, fm_raw + (i * ubi->leb_size), in ubi_write_fastmap()
1332 new_fm->e[i]->pnum, ubi->leb_start, ubi->leb_size); in ubi_write_fastmap()
1521 new_fm->used_blocks = ubi->fm_size / ubi->leb_size; in ubi_update_fastmap()
H A Dkapi.c35 di->leb_size = ubi->leb_size; in ubi_do_get_device_info()
H A Dbuild.c393 ret = sprintf(buf, "%d\n", ubi->leb_size); in dev_attribute_show()
788 ubi->leb_size = ubi->peb_size - ubi->leb_start; in io_init()
1038 ubi->peb_size, ubi->peb_size >> 10, ubi->leb_size); in ubi_attach_mtd_dev()
/rk3399_rockchip-uboot/drivers/mtd/ubispl/
H A Dubispl.h92 unsigned long leb_size; member
H A Dubispl.c35 return roundup(size, ubi->leb_size); in ubi_calc_fm_size()
534 fm_size = ubi->leb_size * used_blocks; in ubi_scan_fastmap()
615 ret = ubi_io_read(ubi, ubi->fm_buf + (ubi->leb_size * i), pnum, in ubi_scan_fastmap()
616 ubi->leb_start, ubi->leb_size); in ubi_scan_fastmap()
892 ubi->leb_size = info->peb_size - ubi->leb_start; in ubispl_load_volumes()
/rk3399_rockchip-uboot/cmd/
H A Dubi.c71 ubi_msg("logical eraseblock size: %d bytes", ubi->leb_size); in display_ubi_info()
147 if (req->alignment > ubi->leb_size) in verify_mkvol_req()
310 rsvd_bytes = vol->reserved_pebs * (ubi->leb_size - vol->data_pad); in ubi_volume_begin_write()
609 size = (int64_t)ubi->avail_pebs * ubi->leb_size; in do_ubi()
/rk3399_rockchip-uboot/include/linux/mtd/
H A Dubi.h183 int leb_size; member

12