/openbmc/u-boot/fs/ubifs/ |
H A D | lprops.c | 407 if (lprops->free == c->leb_size) { in ubifs_categorize_lprops() 582 if (free == c->leb_size) { in ubifs_change_lp() 583 if (lprops->free != c->leb_size) in ubifs_change_lp() 1093 if (lp->free == c->leb_size) { in scan_check_cb() 1095 lst->total_free += c->leb_size; in scan_check_cb() 1148 free = c->leb_size - sleb->endpt; in scan_check_cb() 1151 if (free > c->leb_size || free < 0 || dirty > c->leb_size || in scan_check_cb() 1159 free + dirty == c->leb_size) in scan_check_cb() 1162 lp->free == c->leb_size) { in scan_check_cb() 1196 if (free == c->leb_size) in scan_check_cb() [all …]
|
H A D | lpt_commit.c | 229 while (offs + len > c->leb_size) { in layout_cnodes() 409 while (offs + len > c->leb_size) { in write_cnodes() 731 free += c->leb_size; in need_write_all() 733 free += c->leb_size; in need_write_all() 759 c->ltab[i].free = c->leb_size; in lpt_tgc_start() 1082 offs = c->leb_size - len; in get_pad_len() 1173 offs = c->leb_size - len; in lpt_gc_lnum() 1667 lnum, c->leb_size - len); in dbg_check_ltab_lnum() 1760 free += c->leb_size; in dbg_chk_lpt_free_spc() 1822 chk_lpt_sz = c->leb_size; in dbg_chk_lpt_sz() [all …]
|
H A D | sb.c | 100 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() 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() 418 max_bytes = (long long)c->leb_size * c->main_lebs; in validate_sb() 685 ubifs_assert(len < c->leb_size); in fixup_leb() [all …]
|
H A D | lpt.c | 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() 629 buf = vmalloc(c->leb_size); in ubifs_create_dflt_lpt() 641 ltab[i].free = c->leb_size; in ubifs_create_dflt_lpt() 1042 dirty > c->leb_size || free + dirty > c->leb_size) in unpack_ltab() [all …]
|
H A D | io.c | 246 ubifs_assert(!(offs & 7) && offs < c->leb_size); in ubifs_check_node() 265 if (node_len + offs > c->leb_size) in ubifs_check_node() 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() 588 wbuf->size = c->leb_size - wbuf->offs; in ubifs_wbuf_seek_nolock() 732 wbuf->size = c->leb_size - wbuf->offs; in ubifs_wbuf_write_nolock() 821 wbuf->size = c->leb_size - wbuf->offs; in ubifs_wbuf_write_nolock() 914 ubifs_assert(!(offs & 7) && offs < c->leb_size); in ubifs_read_node_wbuf() [all …]
|
H A D | log.c | 97 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() 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() 634 buf = vmalloc(c->leb_size); in ubifs_consolidate_log() [all …]
|
H A D | master.c | 113 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 D | gc.c | 79 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() 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() 854 lp = ubifs_change_lp(c, lp, c->leb_size, 0, lp->flags, 0); in ubifs_gc_start_commit() [all …]
|
H A D | recovery.c | 108 sbuf = vmalloc(c->leb_size); in get_master_node() 119 len = 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() 774 len = c->leb_size - offs; in ubifs_recover_leb() 924 if (offs + len > c->leb_size) in recover_head() 925 len = c->leb_size - offs; in recover_head() [all …]
|
H A D | scan.c | 93 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 D | super.c | 696 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() 706 c->leb_size, UBIFS_MIN_LEB_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() 853 if (tmp > c->leb_size) { in init_constants_sb() 855 c->leb_size, tmp); in init_constants_sb() 866 tmp /= c->leb_size; in init_constants_sb() 1391 c->sbuf = vmalloc(c->leb_size); in mount_ubifs() 1622 c->leb_size, c->leb_size >> 10, c->min_io_size, in mount_ubifs() [all …]
|
/openbmc/linux/fs/ubifs/ |
H A D | lpt_commit.c | 222 while (offs + len > c->leb_size) { in layout_cnodes() 401 while (offs + len > c->leb_size) { in write_cnodes() 690 free += c->leb_size; in need_write_all() 692 free += c->leb_size; in need_write_all() 718 c->ltab[i].free = c->leb_size; in lpt_tgc_start() 1039 offs = c->leb_size - len; in get_pad_len() 1130 offs = c->leb_size - len; in lpt_gc_lnum() 1624 lnum, c->leb_size - len); in dbg_check_ltab_lnum() 1717 free += c->leb_size; in dbg_chk_lpt_free_spc() 1779 chk_lpt_sz = c->leb_size; in dbg_chk_lpt_sz() [all …]
|
H A D | lprops.c | 402 if (lprops->free == c->leb_size) { in ubifs_categorize_lprops() 577 if (free == c->leb_size) { in ubifs_change_lp() 578 if (lprops->free != c->leb_size) in ubifs_change_lp() 1084 if (lp->free == c->leb_size) { in scan_check_cb() 1086 lst->total_free += c->leb_size; in scan_check_cb() 1143 free = c->leb_size - sleb->endpt; in scan_check_cb() 1146 if (free > c->leb_size || free < 0 || dirty > c->leb_size || in scan_check_cb() 1154 free + dirty == c->leb_size) in scan_check_cb() 1157 lp->free == c->leb_size) { in scan_check_cb() 1191 if (free == c->leb_size) in scan_check_cb() [all …]
|
H A D | sb.c | 109 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() 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() 447 max_bytes = (long long)c->leb_size * c->main_lebs; in validate_sb() 801 ubifs_assert(c, len < c->leb_size); in fixup_leb() [all …]
|
H A D | log.c | 94 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() 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() 652 buf = vmalloc(c->leb_size); in ubifs_consolidate_log() [all …]
|
H A D | io.c | 252 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() 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() 795 wbuf->size = c->leb_size - wbuf->offs; in ubifs_wbuf_write_nolock() [all …]
|
H A D | lpt.c | 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() 630 buf = vmalloc(c->leb_size); in ubifs_create_dflt_lpt() 643 ltab[i].free = c->leb_size; in ubifs_create_dflt_lpt() 1057 dirty > c->leb_size || free + dirty > c->leb_size) in unpack_ltab() [all …]
|
H A D | tnc_commit.c | 141 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() 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() 528 if (buf_offs + next_len > c->leb_size) { in layout_in_empty_space() 530 c->leb_size - buf_offs, blen - used, in layout_in_empty_space() 849 if (buf_offs + next_len > c->leb_size) { in write_index() [all …]
|
H A D | recovery.c | 104 sbuf = vmalloc(c->leb_size); in get_master_node() 115 len = 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() 412 check_len = c->leb_size - empty_offs; in is_last_write() 766 len = c->leb_size - offs; in ubifs_recover_leb() 916 if (offs + len > c->leb_size) in recover_head() 917 len = c->leb_size - offs; in recover_head() [all …]
|
H A D | master.c | 193 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 D | super.c | 531 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() 541 c->leb_size, UBIFS_MIN_LEB_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() 697 if (tmp > c->leb_size) { in init_constants_sb() 699 c->leb_size, tmp); in init_constants_sb() 710 tmp /= c->leb_size; in init_constants_sb() 1312 c->sbuf = vmalloc(c->leb_size); in mount_ubifs() [all …]
|
H A D | gc.c | 73 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() 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() 897 lp = ubifs_change_lp(c, lp, c->leb_size, 0, lp->flags, 0); in ubifs_gc_start_commit() [all …]
|
H A D | scan.c | 89 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 D | find.c | 102 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 D | orphan.c | 278 ((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()
|