/Linux-v5.4/fs/ubifs/ |
D | budget.c | 430 ubifs_assert(c, req->new_page <= 1); in ubifs_budget_space() 431 ubifs_assert(c, req->dirtied_page <= 1); in ubifs_budget_space() 432 ubifs_assert(c, req->new_dent <= 1); in ubifs_budget_space() 433 ubifs_assert(c, req->mod_dent <= 1); in ubifs_budget_space() 434 ubifs_assert(c, req->new_ino <= 1); in ubifs_budget_space() 435 ubifs_assert(c, req->new_ino_d <= UBIFS_MAX_INO_DATA); in ubifs_budget_space() 436 ubifs_assert(c, req->dirtied_ino <= 4); in ubifs_budget_space() 437 ubifs_assert(c, req->dirtied_ino_d <= UBIFS_MAX_INO_DATA * 4); in ubifs_budget_space() 438 ubifs_assert(c, !(req->new_ino_d & 7)); in ubifs_budget_space() 439 ubifs_assert(c, !(req->dirtied_ino_d & 7)); in ubifs_budget_space() [all …]
|
D | io.c | 110 ubifs_assert(c, !c->ro_media && !c->ro_mount); in ubifs_leb_write() 130 ubifs_assert(c, !c->ro_media && !c->ro_mount); in ubifs_leb_change() 150 ubifs_assert(c, !c->ro_media && !c->ro_mount); in ubifs_leb_unmap() 169 ubifs_assert(c, !c->ro_media && !c->ro_mount); in ubifs_leb_map() 232 ubifs_assert(c, lnum >= 0 && lnum < c->leb_cnt && offs >= 0); in ubifs_check_node() 233 ubifs_assert(c, !(offs & 7) && offs < c->leb_size); in ubifs_check_node() 310 ubifs_assert(c, pad >= 0 && !(pad & 7)); in ubifs_pad() 361 ubifs_assert(c, len >= UBIFS_CH_SZ); in ubifs_init_node() 454 ubifs_assert(c, len >= UBIFS_CH_SZ); in ubifs_prep_grp_node() 498 ubifs_assert(c, !hrtimer_active(&wbuf->timer)); in new_wbuf_timer_nolock() [all …]
|
D | gc.c | 74 ubifs_assert(c, gc_lnum != -1); in switch_gc_head() 122 ubifs_assert(c, key_type(c, &sa->key) == UBIFS_DATA_KEY); in data_nodes_cmp() 123 ubifs_assert(c, key_type(c, &sb->key) == UBIFS_DATA_KEY); in data_nodes_cmp() 124 ubifs_assert(c, sa->type == UBIFS_DATA_NODE); in data_nodes_cmp() 125 ubifs_assert(c, sb->type == UBIFS_DATA_NODE); in data_nodes_cmp() 166 ubifs_assert(c, key_type(c, &sa->key) != UBIFS_DATA_KEY && in nondata_nodes_cmp() 168 ubifs_assert(c, sa->type != UBIFS_DATA_NODE && in nondata_nodes_cmp() 180 ubifs_assert(c, key_type(c, &sa->key) == UBIFS_DENT_KEY || in nondata_nodes_cmp() 182 ubifs_assert(c, key_type(c, &sb->key) == UBIFS_DENT_KEY || in nondata_nodes_cmp() 184 ubifs_assert(c, sa->type == UBIFS_DENT_NODE || in nondata_nodes_cmp() [all …]
|
D | lprops.c | 178 ubifs_assert(c, cpos >= b); in add_to_lpt_heap() 179 ubifs_assert(c, cpos < LPT_HEAP_SZ); in add_to_lpt_heap() 180 ubifs_assert(c, cpos < heap->cnt); in add_to_lpt_heap() 221 ubifs_assert(c, hpos >= 0 && hpos < heap->cnt); in remove_from_lpt_heap() 222 ubifs_assert(c, heap->arr[hpos] == lprops); in remove_from_lpt_heap() 287 ubifs_assert(c, 0); in ubifs_add_to_cat() 293 ubifs_assert(c, c->in_a_category_cnt <= c->main_lebs); in ubifs_add_to_cat() 315 ubifs_assert(c, c->freeable_cnt >= 0); in ubifs_remove_from_cat() 320 ubifs_assert(c, !list_empty(&lprops->list)); in ubifs_remove_from_cat() 324 ubifs_assert(c, 0); in ubifs_remove_from_cat() [all …]
|
D | find.c | 174 ubifs_assert(c, data.lnum >= c->main_first && data.lnum < c->leb_cnt); in scan_for_dirty() 179 ubifs_assert(c, lprops->lnum == data.lnum); in scan_for_dirty() 180 ubifs_assert(c, lprops->free + lprops->dirty >= min_space); in scan_for_dirty() 181 ubifs_assert(c, lprops->dirty >= c->dead_wm || in scan_for_dirty() 184 ubifs_assert(c, !(lprops->flags & LPROPS_TAKEN)); in scan_for_dirty() 185 ubifs_assert(c, !exclude_index || !(lprops->flags & LPROPS_INDEX)); in scan_for_dirty() 306 ubifs_assert(c, lp->free + lp->dirty >= c->dead_wm); in ubifs_find_dirty_leb() 317 ubifs_assert(c, lp->dirty >= c->dead_wm || in ubifs_find_dirty_leb() 453 ubifs_assert(c, data.lnum >= c->main_first && data.lnum < c->leb_cnt); in do_find_free_space() 458 ubifs_assert(c, lprops->lnum == data.lnum); in do_find_free_space() [all …]
|
D | tnc_misc.c | 36 ubifs_assert(c, zr); in ubifs_tnc_levelorder_next() 51 ubifs_assert(c, znode->level <= zr->level); in ubifs_tnc_levelorder_next() 78 ubifs_assert(c, znode); in ubifs_tnc_levelorder_next() 104 ubifs_assert(c, zn->level >= 0); in ubifs_tnc_levelorder_next() 133 ubifs_assert(c, end > beg); in ubifs_search_zbranch() 151 ubifs_assert(c, *n >= -1 && *n < znode->child_cnt); in ubifs_search_zbranch() 153 ubifs_assert(c, keys_cmp(c, key, &zbr[0].key) < 0); in ubifs_search_zbranch() 155 ubifs_assert(c, keys_cmp(c, key, &zbr[*n].key) > 0); in ubifs_search_zbranch() 157 ubifs_assert(c, keys_cmp(c, key, &zbr[*n + 1].key) < 0); in ubifs_search_zbranch() 199 ubifs_assert(c, znode); in ubifs_tnc_postorder_next() [all …]
|
D | misc.h | 103 ubifs_assert(c, compr_type >= 0 && compr_type < UBIFS_COMPR_TYPES_CNT); in ubifs_compr_present() 116 ubifs_assert(c, compr_type >= 0 && compr_type < UBIFS_COMPR_TYPES_CNT); in ubifs_compr_name() 256 ubifs_assert(c, mutex_is_locked(&c->lp_mutex)); in ubifs_release_lprops() 257 ubifs_assert(c, c->lst.empty_lebs >= 0 && in ubifs_release_lprops() 283 ubifs_assert(c, max_xattrs < c->max_orphans); in ubifs_xattr_max_cnt()
|
D | tnc.c | 202 ubifs_assert(c, !ubifs_zn_obsolete(znode)); in copy_znode() 312 ubifs_assert(c, !zbr->leaf); in lnc_add() 313 ubifs_assert(c, zbr->len != 0); in lnc_add() 314 ubifs_assert(c, is_hash_key(c, &zbr->key)); in lnc_add() 346 ubifs_assert(c, !zbr->leaf); in lnc_add_directly() 347 ubifs_assert(c, zbr->len != 0); in lnc_add_directly() 389 ubifs_assert(c, is_hash_key(c, &zbr->key)); in tnc_read_hashed_node() 393 ubifs_assert(c, zbr->len != 0); in tnc_read_hashed_node() 717 ubifs_assert(c, *n == 0); in resolve_collision() 757 ubifs_assert(c, 0); in resolve_collision() [all …]
|
D | key.h | 152 ubifs_assert(c, !(hash & ~UBIFS_S_KEY_HASH_MASK)); in dent_key_init() 153 ubifs_assert(c, !nm->hash && !nm->minor_hash); in dent_key_init() 170 ubifs_assert(c, !(hash & ~UBIFS_S_KEY_HASH_MASK)); in dent_key_init_hash() 189 ubifs_assert(c, !(hash & ~UBIFS_S_KEY_HASH_MASK)); in dent_key_init_flash() 222 ubifs_assert(c, !(hash & ~UBIFS_S_KEY_HASH_MASK)); in xent_key_init() 240 ubifs_assert(c, !(hash & ~UBIFS_S_KEY_HASH_MASK)); in xent_key_init_flash() 271 ubifs_assert(c, !(block & ~UBIFS_S_KEY_BLOCK_MASK)); in data_key_init()
|
D | journal.c | 108 ubifs_assert(c, !c->ro_media && !c->ro_mount); in reserve_space() 212 ubifs_assert(c, err < 0); in reserve_space() 235 ubifs_assert(c, len >= auth_node_size); in ubifs_hash_nodes() 240 ubifs_assert(c, len > nodelen); in ubifs_hash_nodes() 241 ubifs_assert(c, ch->magic == cpu_to_le32(UBIFS_NODE_MAGIC)); in ubifs_hash_nodes() 274 ubifs_assert(c, jhead != GCHD); in write_head() 554 ubifs_assert(c, mutex_is_locked(&host_ui->ui_mutex)); in ubifs_jnl_update() 735 ubifs_assert(c, len <= UBIFS_BLOCK_SIZE); in ubifs_jnl_write_data() 768 ubifs_assert(c, compr_len <= UBIFS_BLOCK_SIZE); in ubifs_jnl_write_data() 910 ubifs_assert(c, ubifs_inode(xino)->xattr); in ubifs_jnl_write_inode() [all …]
|
D | file.c | 62 ubifs_assert(c, le64_to_cpu(dn->ch.sqnum) > in read_block() 111 ubifs_assert(c, !PageChecked(page)); in do_readpage() 112 ubifs_assert(c, !PagePrivate(page)); in do_readpage() 433 ubifs_assert(c, ubifs_inode(inode)->ui_size == inode->i_size); in ubifs_write_begin() 434 ubifs_assert(c, !c->ro_media && !c->ro_mount); in ubifs_write_begin() 473 ubifs_assert(c, err == -ENOSPC); in ubifs_write_begin() 490 ubifs_assert(c, mutex_is_locked(&ui->ui_mutex)); in ubifs_write_begin() 587 ubifs_assert(c, mutex_is_locked(&ui->ui_mutex)); in ubifs_write_end() 640 ubifs_assert(c, le64_to_cpu(dn->ch.sqnum) > in populate_page() 759 ubifs_assert(c, bu->buf_len > 0); in ubifs_do_bulk_read() [all …]
|
D | orphan.c | 238 ubifs_assert(c, orphan->new); in ubifs_orphan_start_commit() 239 ubifs_assert(c, !orphan->cmt); in ubifs_orphan_start_commit() 310 ubifs_assert(c, c->ohead_offs == 0); in do_write_orph_node() 342 ubifs_assert(c, c->cmt_orphans > 0); in write_orph_node() 361 ubifs_assert(c, c->orph_buf); in write_orph_node() 368 ubifs_assert(c, orphan->cmt); in write_orph_node() 382 ubifs_assert(c, c->ohead_offs + len <= c->leb_size); in write_orph_node() 383 ubifs_assert(c, c->ohead_lnum >= c->orph_first); in write_orph_node() 384 ubifs_assert(c, c->ohead_lnum <= c->orph_last); in write_orph_node() 454 ubifs_assert(c, cnt == c->tot_orphans - c->new_orphans); in consolidate() [all …]
|
D | tnc_commit.c | 83 ubifs_assert(c, ubifs_zn_dirty(znode)); in make_idx_node() 84 ubifs_assert(c, ubifs_zn_cow(znode)); in make_idx_node() 111 ubifs_assert(c, (gap_start & 7) == 0); in fill_gap() 112 ubifs_assert(c, (gap_end & 7) == 0); in fill_gap() 113 ubifs_assert(c, gap_end >= gap_start); in fill_gap() 127 ubifs_assert(c, alen <= gap_remains); in fill_gap() 255 ubifs_assert(c, snod->type == UBIFS_IDX_NODE); in layout_leb_in_gaps() 369 ubifs_assert(c, p < c->gap_lebs + c->lst.idx_lebs); in layout_in_gaps() 635 ubifs_assert(c, !ubifs_zn_cow(znode)); in get_znodes_to_commit() 650 ubifs_assert(c, cnt == atomic_long_read(&c->dirty_zn_cnt)); in get_znodes_to_commit() [all …]
|
D | xattr.c | 201 ubifs_assert(c, ui->data_len == inode->i_size); in change_xattr() 276 ubifs_assert(c, inode_is_locked(host)); in ubifs_xattr_set() 359 ubifs_assert(c, inode->i_size == ui->data_len); in ubifs_xattr_get() 360 ubifs_assert(c, ubifs_inode(host)->xattr_size > ui->data_len); in ubifs_xattr_get() 447 ubifs_assert(c, written <= size); in ubifs_listxattr() 460 ubifs_assert(c, ui->data_len == inode->i_size); in remove_xattr() 528 ubifs_assert(c, ubifs_inode(xino)->xattr); in ubifs_purge_xattrs() 586 ubifs_assert(c, inode_is_locked(host)); in ubifs_xattr_remove() 609 ubifs_assert(c, inode->i_nlink == 1); in ubifs_xattr_remove()
|
D | dir.c | 229 ubifs_assert(c, fname_len(&nm) == 0); in ubifs_lookup() 230 ubifs_assert(c, fname_name(&nm) == NULL); in ubifs_lookup() 393 ubifs_assert(c, inode->i_op == &ubifs_file_inode_operations); in do_tmpfile() 410 ubifs_assert(c, ui->dirty); in do_tmpfile() 545 ubifs_assert(c, !file->private_data); in ubifs_readdir() 586 ubifs_assert(c, le64_to_cpu(dent->ch.sqnum) > in ubifs_readdir() 705 ubifs_assert(c, inode_is_locked(dir)); in ubifs_link() 706 ubifs_assert(c, inode_is_locked(inode)); in ubifs_link() 791 ubifs_assert(c, inode_is_locked(dir)); in ubifs_unlink() 792 ubifs_assert(c, inode_is_locked(inode)); in ubifs_unlink() [all …]
|
D | crypto.c | 35 ubifs_assert(c, pad_len <= *out_len); in ubifs_encrypt() 66 ubifs_assert(c, dlen <= UBIFS_BLOCK_SIZE); in ubifs_decrypt()
|
D | log.c | 123 ubifs_assert(c, bud->lnum != b->lnum); in ubifs_add_bud() 136 ubifs_assert(c, c->replaying && c->ro_mount); in ubifs_add_bud() 180 ubifs_assert(c, !c->ro_media && !c->ro_mount); in ubifs_add_bud_to_log() 236 ubifs_assert(c, c->lhead_lnum != c->ltail_lnum); in ubifs_add_bud_to_log() 301 ubifs_assert(c, list_empty(&c->old_buds)); in remove_buds() 423 ubifs_assert(c, c->lhead_lnum != c->ltail_lnum); in ubifs_log_start_commit() 441 ubifs_assert(c, c->lhead_offs < c->leb_size); in ubifs_log_start_commit()
|
D | replay.c | 217 ubifs_assert(c, rino->deletion); in inode_still_linked() 218 ubifs_assert(c, key_type(c, &rino->key) == UBIFS_INO_KEY); in inode_still_linked() 225 ubifs_assert(c, r->sqnum >= rino->sqnum); in inode_still_linked() 231 ubifs_assert(c, 0); in inode_still_linked() 313 ubifs_assert(c, ra->sqnum != rb->sqnum); in replay_entries_cmp() 832 ubifs_assert(c, ubifs_search_bud(c, lnum)); in replay_bud() 833 ubifs_assert(c, sleb->endpt - offs >= used); in replay_bud() 834 ubifs_assert(c, sleb->endpt % c->min_io_size == 0); in replay_bud() 870 ubifs_assert(c, b->sqnum > prev_sqnum); in replay_buds() 1258 ubifs_assert(c, c->bud_bytes <= c->max_bud_bytes || c->need_recovery); in ubifs_replay_journal()
|
D | lpt.c | 227 ubifs_assert(c, nrbits > 0); in pack_bits() 228 ubifs_assert(c, nrbits <= 32); in pack_bits() 229 ubifs_assert(c, *pos >= 0); in pack_bits() 230 ubifs_assert(c, *pos < 8); in pack_bits() 231 ubifs_assert(c, (val >> nrbits) == 0 || nrbits == 32); in pack_bits() 281 ubifs_assert(c, nrbits > 0); in ubifs_unpack_bits() 282 ubifs_assert(c, nrbits <= 32); in ubifs_unpack_bits() 283 ubifs_assert(c, *pos >= 0); in ubifs_unpack_bits() 284 ubifs_assert(c, *pos < 8); in ubifs_unpack_bits() 330 ubifs_assert(c, (val >> nrbits) == 0 || nrbits - b == 32); in ubifs_unpack_bits() [all …]
|
D | lpt_commit.c | 32 ubifs_assert(c, nnode); in first_dirty_cnode() 66 ubifs_assert(c, cnode); in next_dirty_cnode() 105 ubifs_assert(c, !test_bit(COW_CNODE, &cnode->flags)); in get_cnodes_to_commit() 118 ubifs_assert(c, cnt == c->dirty_nn_cnt + c->dirty_pn_cnt); in get_cnodes_to_commit() 134 ubifs_assert(c, lnum >= c->lpt_first && lnum <= c->lpt_last); in upd_ltab() 230 ubifs_assert(c, lnum >= c->lpt_first && in layout_cnodes() 273 ubifs_assert(c, lnum >= c->lpt_first && in layout_cnodes() 293 ubifs_assert(c, lnum >= c->lpt_first && in layout_cnodes() 416 ubifs_assert(c, lnum >= c->lpt_first && in write_cnodes() 473 ubifs_assert(c, lnum >= c->lpt_first && in write_cnodes() [all …]
|
D | super.c | 283 ubifs_assert(c, !ui->xattr); in ubifs_write_inode() 346 ubifs_assert(c, !atomic_read(&inode->i_count)); in ubifs_evict_inode() 384 ubifs_assert(c, mutex_is_locked(&ui->ui_mutex)); in ubifs_dirty_inode() 414 ubifs_assert(c, buf->f_bfree <= c->block_cnt); in ubifs_statfs() 1162 ubifs_assert(c, c->bulk_read == 1); in bu_init() 1193 ubifs_assert(c, c->dark_wm > 0); in check_free_space() 1496 ubifs_assert(c, c->lst.taken_empty_lebs > 0); in mount_ubifs() 1499 ubifs_assert(c, c->lst.taken_empty_lebs > 0); in mount_ubifs() 1700 ubifs_assert(c, c->tot_orphans == 0); in ubifs_remount_rw() 1836 ubifs_assert(c, !c->need_recovery); in ubifs_remount_ro() [all …]
|
D | shrinker.c | 64 ubifs_assert(c, mutex_is_locked(&c->umount_mutex)); in shrink_tnc() 65 ubifs_assert(c, mutex_is_locked(&c->tnc_mutex)); in shrink_tnc()
|
D | recovery.c | 436 ubifs_assert(c, !(*offs & 7)); in clean_buf() 636 ubifs_assert(c, len >= 8); in ubifs_recover_leb() 958 ubifs_assert(c, !c->ro_mount || c->remounting_rw); in ubifs_recover_inl_heads() 1179 ubifs_assert(c, !(lp.flags & LPROPS_INDEX)); in ubifs_rcvry_gc_commit() 1180 ubifs_assert(c, lp.free + lp.dirty >= wbuf->offs); in ubifs_rcvry_gc_commit() 1208 ubifs_assert(c, err == LEB_RETAINED); in ubifs_rcvry_gc_commit() 1465 ubifs_assert(c, !e->inode); in inode_fix_size() 1563 ubifs_assert(c, !(c->ro_mount && in_place)); in ubifs_recover_size()
|
D | sb.c | 660 ubifs_assert(c, !c->ro_media || c->ro_mount); in ubifs_read_superblock() 798 ubifs_assert(c, len >= 0); in fixup_leb() 799 ubifs_assert(c, len % c->min_io_size == 0); in fixup_leb() 800 ubifs_assert(c, len < c->leb_size); in fixup_leb() 910 ubifs_assert(c, c->space_fixup); in ubifs_fixup_free_space() 911 ubifs_assert(c, !c->ro_mount); in ubifs_fixup_free_space()
|
D | commit.c | 82 ubifs_assert(c, atomic_long_read(&c->dirty_zn_cnt) == 0); in nothing_to_commit() 83 ubifs_assert(c, c->dirty_pn_cnt == 0); in nothing_to_commit() 84 ubifs_assert(c, c->dirty_nn_cnt == 0); in nothing_to_commit() 104 ubifs_assert(c, !c->ro_media && !c->ro_mount); in do_commit()
|