/linux-2.6.39/fs/ubifs/ |
D | lpt_commit.c | 165 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 …]
|
D | lprops.c | 410 if (lprops->free == c->leb_size) { in ubifs_categorize_lprops() 415 if (lprops->free + lprops->dirty == c->leb_size) { in ubifs_categorize_lprops() 565 if ((lprops->flags & LPROPS_TAKEN) && lprops->free == c->leb_size) in ubifs_change_lp() 577 c->lst.total_used -= c->leb_size - old_spc; in ubifs_change_lp() 585 if (free == c->leb_size) { in ubifs_change_lp() 586 if (lprops->free != c->leb_size) in ubifs_change_lp() 588 } else if (lprops->free == c->leb_size) in ubifs_change_lp() 618 c->lst.total_used += c->leb_size - new_spc; in ubifs_change_lp() 621 if ((lprops->flags & LPROPS_TAKEN) && lprops->free == c->leb_size) in ubifs_change_lp() 798 ubifs_assert(lprops->free == c->leb_size); in ubifs_fast_find_empty() [all …]
|
D | sb.c | 103 if (jnl_lebs * c->leb_size > DEFAULT_MAX_JNL) in create_default_filesystem() 104 jnl_lebs = DEFAULT_MAX_JNL / c->leb_size; in create_default_filesystem() 112 tmp = 2 * (c->ref_node_alsz * jnl_lebs) + c->leb_size - 1; in create_default_filesystem() 113 log_lebs = tmp / c->leb_size; in create_default_filesystem() 165 tmp64 = (long long)max_buds * c->leb_size; in create_default_filesystem() 173 sup->leb_size = cpu_to_le32(c->leb_size); in create_default_filesystem() 192 main_bytes = (long long)main_lebs * c->leb_size; in create_default_filesystem() 377 if (le32_to_cpu(sup->leb_size) != c->leb_size) { in validate_sb() 379 le32_to_cpu(sup->leb_size), c->leb_size); in validate_sb() 417 if (c->max_bud_bytes < (long long)c->leb_size * UBIFS_MIN_BUD_LEBS || in validate_sb() [all …]
|
D | io.c | 129 ubifs_assert(!(offs & 7) && offs < c->leb_size); in ubifs_check_node() 148 if (node_len + offs > c->leb_size) in ubifs_check_node() 390 ubifs_assert(wbuf->offs + wbuf->size <= c->leb_size); in ubifs_wbuf_sync_nolock() 395 if (c->leb_size - wbuf->offs >= c->max_write_size) in ubifs_wbuf_sync_nolock() 430 if (c->leb_size - wbuf->offs < c->max_write_size) in ubifs_wbuf_sync_nolock() 431 wbuf->size = c->leb_size - wbuf->offs; in ubifs_wbuf_sync_nolock() 443 c->leb_size - wbuf->offs, dirt); in ubifs_wbuf_sync_nolock() 465 ubifs_assert(offs >= 0 && offs <= c->leb_size); in ubifs_wbuf_seek_nolock() 479 if (c->leb_size - wbuf->offs < c->max_write_size) in ubifs_wbuf_seek_nolock() 480 wbuf->size = c->leb_size - wbuf->offs; in ubifs_wbuf_seek_nolock() [all …]
|
D | tnc_commit.c | 143 if (gap_end == c->leb_size) { in fill_gap() 289 c->ileb_len = c->leb_size; in layout_leb_in_gaps() 290 gap_end = c->leb_size; in layout_leb_in_gaps() 303 if (lp.free == c->leb_size) { in layout_leb_in_gaps() 309 c->leb_size - c->ileb_len, in layout_leb_in_gaps() 316 err = ubifs_change_one_lp(c, lnum, c->leb_size - c->ileb_len, dirt, in layout_leb_in_gaps() 342 cnt -= (c->leb_size - c->ihead_offs) / c->max_idx_node_sz; in get_leb_cnt() 345 d = c->leb_size / c->max_idx_node_sz; in get_leb_cnt() 434 if (buf_offs + next_len > c->leb_size) in layout_in_empty_space() 499 if (buf_offs + next_len <= c->leb_size) in layout_in_empty_space() [all …]
|
D | lpt.c | 82 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 …]
|
D | log.c | 124 h = (long long)c->lhead_lnum * c->leb_size + c->lhead_offs; in empty_log_bytes() 125 t = (long long)c->ltail_lnum * c->leb_size; in empty_log_bytes() 170 c->bud_bytes += c->leb_size - bud->start; in ubifs_add_bud() 230 if (c->bud_bytes + c->leb_size - offs > c->max_bud_bytes) { in ubifs_add_bud_to_log() 259 if (c->lhead_offs > c->leb_size - c->ref_node_alsz) { in ubifs_add_bud_to_log() 344 c->cmt_bud_bytes += c->leb_size - bud->start; in remove_buds() 347 dbg_jhead(bud->jhead), c->leb_size - bud->start, in remove_buds() 409 if (lnum == -1 || offs == c->leb_size) in ubifs_log_start_commit() 448 if (c->lhead_offs == c->leb_size) { in ubifs_log_start_commit() 495 c->min_log_bytes = c->leb_size; in ubifs_log_end_commit() [all …]
|
D | master.c | 120 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() 372 if (offs + UBIFS_MST_NODE_SZ > c->leb_size) { in ubifs_write_master()
|
D | recovery.c | 116 sbuf = vmalloc(c->leb_size); in get_master_node() 120 err = ubi_read(c->ubi, lnum, sbuf, 0, c->leb_size); 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() 277 } else if (offs1 == 0 && offs2 + sz >= c->leb_size) { in ubifs_recover_master_node() 302 if (offs2 + sz + sz <= c->leb_size) in ubifs_recover_master_node() 422 check_len = c->leb_size - empty_offs; in is_last_write() 454 memset(*buf, 0xff, c->leb_size - empty_offs); in clean_buf() [all …]
|
D | gc.c | 89 c->leb_size - wbuf->offs - wbuf->used); in switch_gc_head() 371 avail = c->leb_size - wbuf->offs - wbuf->used; in move_nodes() 386 avail = c->leb_size - wbuf->offs - wbuf->used; in move_nodes() 520 err = ubifs_change_one_lp(c, lnum, c->leb_size, 0, 0, in ubifs_garbage_collect_leb() 537 err = ubifs_change_one_lp(c, lnum, c->leb_size, 0, 0, 0, 0); in ubifs_garbage_collect_leb() 635 int space_before = c->leb_size - wbuf->offs - wbuf->used; in ubifs_garbage_collect() 685 if (lp.free + lp.dirty == c->leb_size) { in ubifs_garbage_collect() 693 if (lp.free != c->leb_size) { in ubifs_garbage_collect() 704 c->leb_size, 0, 0, 0, in ubifs_garbage_collect() 716 space_before = c->leb_size - wbuf->offs - wbuf->used; in ubifs_garbage_collect() [all …]
|
D | super.c | 514 c->leb_size = c->vi.usable_leb_size; in init_constants_early() 516 c->half_leb_size = c->leb_size / 2; in init_constants_early() 522 if (c->leb_size < UBIFS_MIN_LEB_SZ) { in init_constants_early() 524 c->leb_size, UBIFS_MIN_LEB_SZ); in init_constants_early() 583 c->ranges[UBIFS_ORPH_NODE].max_len = c->leb_size; in init_constants_early() 613 c->leb_overhead = c->leb_size % UBIFS_MAX_DATA_NODE_SZ; in init_constants_early() 617 if (c->max_bu_buf_len > c->leb_size) in init_constants_early() 618 c->max_bu_buf_len = c->leb_size; in init_constants_early() 656 c->main_bytes = (long long)c->main_lebs * c->leb_size; in init_constants_sb() 671 if (tmp > c->leb_size) { in init_constants_sb() [all …]
|
D | scan.c | 100 offs + node_len + pad_len > c->leb_size) { in ubifs_scan_a_node() 151 err = ubi_read(c->ubi, lnum, sbuf + offs, offs, c->leb_size - offs); in ubifs_start_scan() 154 " error %d", c->leb_size - offs, lnum, offs, err); in ubifs_start_scan() 245 len = c->leb_size - offs; in ubifs_scanned_corruption() 272 int err, len = c->leb_size - offs; in ubifs_scan()
|
D | find.c | 114 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(*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(lprops->free + lprops->dirty == c->leb_size); in scan_for_leb_for_idx() [all …]
|
D | orphan.c | 209 ((c->leb_size - UBIFS_ORPH_NODE_SZ) / sizeof(__le64)); in avail_orphs() 210 gap = c->leb_size - c->ohead_offs; in avail_orphs() 229 ((c->leb_size - UBIFS_ORPH_NODE_SZ) / sizeof(__le64)); in tot_avail_orphs() 282 gap = c->leb_size - c->ohead_offs; in write_orph_node() 286 gap = c->leb_size; in write_orph_node() 319 ubifs_assert(c->ohead_offs + len <= c->leb_size); in write_orph_node() 714 c->orph_buf = vmalloc(c->leb_size); in ubifs_mount_orphans() 901 buf = __vmalloc(c->leb_size, GFP_NOFS, PAGE_KERNEL); in dbg_scan_orphans()
|
D | replay.c | 122 if (r->offs == 0 && (lp->free != c->leb_size || lp->dirty != 0)) { in set_bud_lprops() 145 dirty -= c->leb_size - lp->free; in set_bud_lprops() 167 c->leb_size - r->free, UBI_SHORTTERM); in set_bud_lprops() 638 *free = c->leb_size - sleb->endpt; in replay_bud() 809 lnum < c->main_first || offs > c->leb_size || in validate_ref() 958 if (sleb->endpt || c->lhead_offs >= c->leb_size) { in replay_log_leb() 1030 if (c->ihead_offs != c->leb_size - free) { in ubifs_replay_journal()
|
D | ubifs-media.h | 627 __le32 leb_size; member
|
D | tnc_misc.c | 318 zbr->offs + zbr->len > c->leb_size || zbr->offs & 7) { in read_znode()
|
/linux-2.6.39/drivers/mtd/ubi/ |
D | vtbl.c | 219 if (alignment > ubi->leb_size || alignment == 0) { in vtbl_check() 230 n = ubi->leb_size % alignment; in vtbl_check() 572 vol->usable_leb_size = ubi->leb_size - vol->data_pad; in init_volumes() 649 vol->usable_leb_size = ubi->leb_size; in init_volumes() 653 (long long)vol->used_ebs * (ubi->leb_size - vol->data_pad); in init_volumes() 804 ubi->vtbl_slots = ubi->leb_size / UBI_VTBL_RECORD_SIZE; in ubi_read_volume_table()
|
D | vmt.c | 257 vol->usable_leb_size = ubi->leb_size - ubi->leb_size % req->alignment; in ubi_create_volume() 276 vol->data_pad = ubi->leb_size % vol->alignment; in ubi_create_volume() 749 if (vol->alignment > ubi->leb_size || vol->alignment == 0) { in paranoid_check_volume() 760 n = ubi->leb_size % vol->alignment; in paranoid_check_volume() 782 n = ubi->leb_size - vol->data_pad; in paranoid_check_volume() 783 if (vol->usable_leb_size != ubi->leb_size - vol->data_pad) { in paranoid_check_volume()
|
D | scan.c | 792 memset(ubi->peb_buf1, 0x00, ubi->leb_size); in check_corruption() 795 ubi->leb_size); in check_corruption() 811 if (ubi_check_pattern(ubi->peb_buf1, 0xFF, ubi->leb_size)) in check_corruption() 819 pnum, ubi->leb_start, ubi->leb_size); in check_corruption() 821 ubi->peb_buf1, ubi->leb_size, 1); in check_corruption() 1393 if (sv->data_pad > ubi->leb_size / 2) { in paranoid_check_si()
|
D | kapi.c | 42 di->leb_size = ubi->leb_size; in ubi_do_get_device_info()
|
D | build.c | 337 ret = sprintf(buf, "%d\n", ubi->leb_size); in dev_attribute_show() 773 ubi->leb_size = ubi->peb_size - ubi->leb_start; in io_init() 783 ubi_msg("logical eraseblock size: %d bytes", ubi->leb_size); in io_init()
|
D | upd.c | 161 vol->upd_buf = vmalloc(ubi->leb_size); in ubi_start_update()
|
D | ubi.h | 459 int leb_size; member
|
/linux-2.6.39/include/linux/mtd/ |
D | ubi.h | 149 int leb_size; member
|