Home
last modified time | relevance | path

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

/linux-4.19.296/fs/ubifs/
Dlpt_commit.c169 if (c->ltab[i].free == c->leb_size) { in alloc_lpt_leb()
179 if (c->ltab[i].free == c->leb_size) { in alloc_lpt_leb()
210 if (!done_lsave && offs + c->lsave_sz <= c->leb_size) { in layout_cnodes()
218 if (offs + c->ltab_sz <= c->leb_size) { in layout_cnodes()
234 while (offs + len > c->leb_size) { in layout_cnodes()
236 upd_ltab(c, lnum, c->leb_size - alen, alen - offs); in layout_cnodes()
237 dbg_chk_lpt_sz(c, 2, c->leb_size - offs); in layout_cnodes()
277 if (offs + c->lsave_sz > c->leb_size) { in layout_cnodes()
279 upd_ltab(c, lnum, c->leb_size - alen, alen - offs); in layout_cnodes()
280 dbg_chk_lpt_sz(c, 2, c->leb_size - offs); in layout_cnodes()
[all …]
Dlprops.c414 if (lprops->free == c->leb_size) { in ubifs_categorize_lprops()
419 if (lprops->free + lprops->dirty == c->leb_size) { in ubifs_categorize_lprops()
569 if ((lprops->flags & LPROPS_TAKEN) && lprops->free == c->leb_size) in ubifs_change_lp()
581 c->lst.total_used -= c->leb_size - old_spc; in ubifs_change_lp()
589 if (free == c->leb_size) { in ubifs_change_lp()
590 if (lprops->free != c->leb_size) in ubifs_change_lp()
592 } else if (lprops->free == c->leb_size) in ubifs_change_lp()
622 c->lst.total_used += c->leb_size - new_spc; in ubifs_change_lp()
625 if ((lprops->flags & LPROPS_TAKEN) && lprops->free == c->leb_size) in ubifs_change_lp()
802 ubifs_assert(c, lprops->free == c->leb_size); in ubifs_fast_find_empty()
[all …]
Dsb.c116 if (jnl_lebs * c->leb_size > DEFAULT_MAX_JNL) in create_default_filesystem()
117 jnl_lebs = DEFAULT_MAX_JNL / c->leb_size; in create_default_filesystem()
125 tmp = 2 * (c->ref_node_alsz * jnl_lebs) + c->leb_size - 1; in create_default_filesystem()
126 log_lebs = tmp / c->leb_size; in create_default_filesystem()
176 tmp64 = (long long)max_buds * c->leb_size; in create_default_filesystem()
185 sup->leb_size = cpu_to_le32(c->leb_size); in create_default_filesystem()
204 main_bytes = (long long)main_lebs * c->leb_size; in create_default_filesystem()
391 if (le32_to_cpu(sup->leb_size) != c->leb_size) { in validate_sb()
393 le32_to_cpu(sup->leb_size), c->leb_size); in validate_sb()
431 max_bytes = (long long)c->leb_size * UBIFS_MIN_BUD_LEBS; in validate_sb()
[all …]
Dlpt.c82 c->space_bits = fls(c->leb_size) - 3; in do_calc_lpt_geom()
84 c->lpt_offs_bits = fls(c->leb_size - 1); in do_calc_lpt_geom()
85 c->lpt_spc_bits = fls(c->leb_size); in do_calc_lpt_geom()
122 while (sz > c->leb_size) { in do_calc_lpt_geom()
124 sz -= c->leb_size; in do_calc_lpt_geom()
146 lebs_needed = div_u64(sz + c->leb_size - 1, c->leb_size); in ubifs_calc_lpt_geom()
153 if (c->ltab_sz > c->leb_size) { in ubifs_calc_lpt_geom()
196 if (c->lpt_sz > c->leb_size) { in calc_dflt_lpt_geom()
205 lebs_needed = div_u64(sz + c->leb_size - 1, c->leb_size); in calc_dflt_lpt_geom()
215 if (c->ltab_sz > c->leb_size) { in calc_dflt_lpt_geom()
[all …]
Dio.c245 ubifs_assert(c, !(offs & 7) && offs < c->leb_size); in ubifs_check_node()
264 if (node_len + offs > c->leb_size) in ubifs_check_node()
301 int safe_len = min3(node_len, c->leb_size - offs, in ubifs_check_node()
525 ubifs_assert(c, wbuf->offs + wbuf->size <= c->leb_size); in ubifs_wbuf_sync_nolock()
530 if (c->leb_size - wbuf->offs >= c->max_write_size) in ubifs_wbuf_sync_nolock()
560 if (c->leb_size - wbuf->offs < c->max_write_size) in ubifs_wbuf_sync_nolock()
561 wbuf->size = c->leb_size - wbuf->offs; in ubifs_wbuf_sync_nolock()
573 c->leb_size - wbuf->offs, dirt); in ubifs_wbuf_sync_nolock()
593 ubifs_assert(c, offs >= 0 && offs <= c->leb_size); in ubifs_wbuf_seek_nolock()
601 if (c->leb_size - wbuf->offs < c->max_write_size) in ubifs_wbuf_seek_nolock()
[all …]
Dlog.c106 h = (long long)c->lhead_lnum * c->leb_size + c->lhead_offs; in empty_log_bytes()
107 t = (long long)c->ltail_lnum * c->leb_size; in empty_log_bytes()
156 c->bud_bytes += c->leb_size - bud->start; in ubifs_add_bud()
216 if (c->bud_bytes + c->leb_size - offs > c->max_bud_bytes) { in ubifs_add_bud_to_log()
245 if (c->lhead_offs > c->leb_size - c->ref_node_alsz) { in ubifs_add_bud_to_log()
328 c->cmt_bud_bytes += c->leb_size - bud->start; in remove_buds()
331 c->leb_size - bud->start, c->cmt_bud_bytes); in remove_buds()
392 if (lnum == -1 || offs == c->leb_size) in ubifs_log_start_commit()
430 if (c->lhead_offs == c->leb_size) { in ubifs_log_start_commit()
477 c->min_log_bytes = c->leb_size; in ubifs_log_end_commit()
[all …]
Dmaster.c120 c->lhead_offs < 0 || c->lhead_offs >= c->leb_size || in validate_master()
127 c->zroot.offs >= c->leb_size || c->zroot.offs & 7) { in validate_master()
145 c->ihead_offs > c->leb_size || c->ihead_offs & 7) { in validate_master()
150 main_sz = (long long)c->main_lebs * c->leb_size; in validate_master()
157 c->lpt_offs < 0 || c->lpt_offs + c->nnode_sz > c->leb_size) { in validate_master()
164 c->nhead_offs > c->leb_size) { in validate_master()
171 c->ltab_offs + c->ltab_sz > c->leb_size) { in validate_master()
178 c->lsave_offs + c->lsave_sz > c->leb_size)) { in validate_master()
327 c->lst.total_free += growth * (long long)c->leb_size; in ubifs_read_master()
371 if (offs + UBIFS_MST_NODE_SZ > c->leb_size) { in ubifs_write_master()
Dtnc_commit.c148 if (gap_end == c->leb_size) { in fill_gap()
294 c->ileb_len = c->leb_size; in layout_leb_in_gaps()
295 gap_end = c->leb_size; in layout_leb_in_gaps()
308 if (lp.free == c->leb_size) { in layout_leb_in_gaps()
314 c->leb_size - c->ileb_len, in layout_leb_in_gaps()
321 err = ubifs_change_one_lp(c, lnum, c->leb_size - c->ileb_len, dirt, in layout_leb_in_gaps()
346 cnt -= (c->leb_size - c->ihead_offs) / c->max_idx_node_sz; in get_leb_cnt()
349 d = c->leb_size / c->max_idx_node_sz; in get_leb_cnt()
456 if (buf_offs + next_len > c->leb_size) in layout_in_empty_space()
522 buf_offs + used + next_len <= c->leb_size && in layout_in_empty_space()
[all …]
Dgc.c89 c->leb_size - wbuf->offs - wbuf->used); in switch_gc_head()
372 avail = c->leb_size - wbuf->offs - wbuf->used; in move_nodes()
387 avail = c->leb_size - wbuf->offs - wbuf->used; in move_nodes()
477 if (lp->free + lp->dirty == c->leb_size) { in ubifs_garbage_collect_leb()
482 if (lp->free != c->leb_size) { in ubifs_garbage_collect_leb()
491 err = ubifs_change_one_lp(c, lp->lnum, c->leb_size, in ubifs_garbage_collect_leb()
552 err = ubifs_change_one_lp(c, lnum, c->leb_size, 0, 0, in ubifs_garbage_collect_leb()
569 err = ubifs_change_one_lp(c, lnum, c->leb_size, 0, 0, 0, 0); in ubifs_garbage_collect_leb()
716 space_before = c->leb_size - wbuf->offs - wbuf->used; in ubifs_garbage_collect()
756 space_after = c->leb_size - wbuf->offs - wbuf->used; in ubifs_garbage_collect()
[all …]
Drecovery.c116 sbuf = vmalloc(c->leb_size); in get_master_node()
120 err = ubifs_leb_read(c, lnum, sbuf, 0, c->leb_size, 0); in get_master_node()
127 len = c->leb_size; in get_master_node()
128 while (offs + UBIFS_MST_NODE_SZ <= c->leb_size) { in get_master_node()
172 if (offs < c->leb_size) { in get_master_node()
182 if (offs < c->leb_size) in get_master_node()
278 c->leb_size - offs2 - sz < sz) { in ubifs_recover_master_node()
303 if (offs2 + sz + sz <= c->leb_size) in ubifs_recover_master_node()
423 check_len = c->leb_size - empty_offs; in is_last_write()
454 memset(*buf, 0xff, c->leb_size - empty_offs); in clean_buf()
[all …]
Dscan.c101 offs + node_len + pad_len > c->leb_size) { in ubifs_scan_a_node()
153 err = ubifs_leb_read(c, lnum, sbuf + offs, offs, c->leb_size - offs, 0); in ubifs_start_scan()
156 c->leb_size - offs, lnum, offs, err); in ubifs_start_scan()
243 len = c->leb_size - offs; in ubifs_scanned_corruption()
270 int err, len = c->leb_size - offs; in ubifs_scan()
Dsuper.c518 c->leb_size = c->vi.usable_leb_size; in init_constants_early()
520 c->half_leb_size = c->leb_size / 2; in init_constants_early()
526 if (c->leb_size < UBIFS_MIN_LEB_SZ) { in init_constants_early()
528 c->leb_size, UBIFS_MIN_LEB_SZ); in init_constants_early()
587 c->ranges[UBIFS_ORPH_NODE].max_len = c->leb_size; in init_constants_early()
617 c->leb_overhead = c->leb_size % UBIFS_MAX_DATA_NODE_SZ; in init_constants_early()
621 if (c->max_bu_buf_len > c->leb_size) in init_constants_early()
622 c->max_bu_buf_len = c->leb_size; in init_constants_early()
660 c->main_bytes = (long long)c->main_lebs * c->leb_size; in init_constants_sb()
675 if (tmp > c->leb_size) { in init_constants_sb()
[all …]
Dfind.c114 if (lprops->free + lprops->dirty == c->leb_size) { in scan_for_dirty_cb()
195 lprops->free + lprops->dirty == c->leb_size)); in scan_for_dirty()
330 (pick_free && lp->free + lp->dirty == c->leb_size)); in ubifs_find_dirty_leb()
381 if (!data->pick_free && lprops->free == c->leb_size) in scan_for_free_cb()
389 if (lprops->free + lprops->dirty == c->leb_size && lprops->dirty > 0) in scan_for_free_cb()
561 *offs = c->leb_size - lprops->free; in ubifs_find_free_space()
576 dbg_find("found LEB %d, free %d", lnum, c->leb_size - *offs); in ubifs_find_free_space()
577 ubifs_assert(c, *offs <= c->leb_size - min_space); in ubifs_find_free_space()
618 if (lprops->free + lprops->dirty != c->leb_size) in scan_for_idx_cb()
651 ubifs_assert(c, lprops->free + lprops->dirty == c->leb_size); in scan_for_leb_for_idx()
[all …]
Dorphan.c208 ((c->leb_size - UBIFS_ORPH_NODE_SZ) / sizeof(__le64)); in avail_orphs()
209 gap = c->leb_size - c->ohead_offs; in avail_orphs()
228 ((c->leb_size - UBIFS_ORPH_NODE_SZ) / sizeof(__le64)); in tot_avail_orphs()
280 gap = c->leb_size - c->ohead_offs; in write_orph_node()
284 gap = c->leb_size; in write_orph_node()
319 ubifs_assert(c, c->ohead_offs + len <= c->leb_size); in write_orph_node()
716 c->orph_buf = vmalloc(c->leb_size); in ubifs_mount_orphans()
888 buf = __vmalloc(c->leb_size, GFP_NOFS, PAGE_KERNEL); in dbg_scan_orphans()
Dreplay.c111 if (b->bud->start == 0 && (lp->free != c->leb_size || lp->dirty != 0)) { in set_bud_lprops()
135 dirty -= c->leb_size - lp->free; in set_bud_lprops()
157 b->bud->lnum, c->leb_size - b->free); in set_bud_lprops()
715 b->free = c->leb_size - sleb->endpt; in replay_bud()
835 lnum < c->main_first || offs > c->leb_size || in validate_ref()
983 if (sleb->endpt || c->lhead_offs >= c->leb_size) { in replay_log_leb()
1055 if (c->ihead_offs != c->leb_size - free) { in ubifs_replay_journal()
Dubifs-media.h644 __le32 leb_size; member
Dtnc_misc.c324 zbr->offs + zbr->len > c->leb_size || zbr->offs & 7) { in read_znode()
Dbudget.c235 available -= (long long)subtract_lebs * c->leb_size; in ubifs_calc_available()
Ddebug.c345 pr_err("\tleb_size %u\n", le32_to_cpu(sup->leb_size)); in ubifs_dump_node()
663 lp->lnum, lp->free, lp->dirty, c->leb_size - spc, spc, in ubifs_dump_lprop()
667 lp->lnum, lp->free, lp->dirty, c->leb_size - spc, spc, in ubifs_dump_lprop()
824 buf = __vmalloc(c->leb_size, GFP_NOFS, PAGE_KERNEL); in ubifs_dump_leb()
Djournal.c124 avail = c->leb_size - wbuf->offs - wbuf->used; in reserve_space()
173 avail = c->leb_size - wbuf->offs - wbuf->used; in reserve_space()
Dubifs.h1323 int leb_size; member
Dfile.c772 ubifs_assert(c, bu->buf_len <= c->leb_size); in ubifs_do_bulk_read()
Dtnc.c1699 ubifs_assert(c, !(offs & 7) && offs < c->leb_size); in read_wbuf()
1700 ubifs_assert(c, offs + len <= c->leb_size); in read_wbuf()
/linux-4.19.296/include/linux/mtd/
Dubi.h191 int leb_size; member