Lines Matching refs:unlikely
104 if (unlikely(!IS_ALIGNED(btrfs_file_extent_##name((leaf), (fi)), \
208 if (unlikely(!IS_ALIGNED(key->offset, sectorsize))) { in check_extent_data_item()
221 if (unlikely(!check_prev_ino(leaf, key, slot, prev_key))) in check_extent_data_item()
230 if (unlikely(item_size < BTRFS_FILE_EXTENT_INLINE_DATA_START)) { in check_extent_data_item()
237 if (unlikely(btrfs_file_extent_type(leaf, fi) >= in check_extent_data_item()
250 if (unlikely(btrfs_file_extent_compression(leaf, fi) >= in check_extent_data_item()
258 if (unlikely(btrfs_file_extent_encryption(leaf, fi))) { in check_extent_data_item()
266 if (unlikely(key->offset)) { in check_extent_data_item()
279 if (unlikely(item_size != BTRFS_FILE_EXTENT_INLINE_DATA_START + in check_extent_data_item()
291 if (unlikely(item_size != sizeof(*fi))) { in check_extent_data_item()
297 if (unlikely(CHECK_FE_ALIGNED(leaf, slot, fi, ram_bytes, sectorsize) || in check_extent_data_item()
305 if (unlikely(check_add_overflow(btrfs_file_extent_num_bytes(leaf, fi), in check_extent_data_item()
327 if (unlikely(prev_end > key->offset)) { in check_extent_data_item()
345 if (unlikely(key->objectid != BTRFS_EXTENT_CSUM_OBJECTID)) { in check_csum_item()
351 if (unlikely(!IS_ALIGNED(key->offset, sectorsize))) { in check_csum_item()
357 if (unlikely(!IS_ALIGNED(btrfs_item_size(leaf, slot), csumsize))) { in check_csum_item()
370 if (unlikely(prev_csum_end > key->offset)) { in check_csum_item()
395 if (unlikely(key->objectid != 0 || key->type != 0 || in check_inode_key()
401 if (unlikely((key->objectid < BTRFS_FIRST_FREE_OBJECTID || in check_inode_key()
422 if (unlikely(key->offset != 0)) { in check_inode_key()
446 if (unlikely(key->objectid == 0)) { in check_root_key()
456 if (unlikely(!is_fstree(key->objectid) && !is_root_item)) { in check_root_key()
472 if (unlikely(key->objectid == BTRFS_TREE_RELOC_OBJECTID && in check_root_key()
489 if (unlikely(!check_prev_ino(leaf, key, slot, prev_key))) in check_dir_item()
504 if (unlikely(cur + sizeof(*di) > item_size)) { in check_dir_item()
515 if (unlikely(ret < 0)) in check_dir_item()
520 if (unlikely(ret < 0)) in check_dir_item()
532 if (unlikely(dir_type >= BTRFS_FT_MAX)) { in check_dir_item()
539 if (unlikely(key->type == BTRFS_XATTR_ITEM_KEY && in check_dir_item()
546 if (unlikely(dir_type == BTRFS_FT_XATTR && in check_dir_item()
560 if (unlikely(name_len > max_name_len)) { in check_dir_item()
566 if (unlikely(name_len + data_len > BTRFS_MAX_XATTR_SIZE(fs_info))) { in check_dir_item()
574 if (unlikely(data_len && dir_type != BTRFS_FT_XATTR)) { in check_dir_item()
584 if (unlikely(cur + total_size > item_size)) { in check_dir_item()
602 if (unlikely(key->offset != name_hash)) { in check_dir_item()
653 if (unlikely(key->offset == 0)) { in check_block_group_item()
659 if (unlikely(item_size != sizeof(bgi))) { in check_block_group_item()
676 if (unlikely(fs_info->nr_global_roots && in check_block_group_item()
684 } else if (unlikely(chunk_objectid != BTRFS_FIRST_CHUNK_TREE_OBJECTID)) { in check_block_group_item()
692 if (unlikely(btrfs_stack_block_group_used(&bgi) > key->offset)) { in check_block_group_item()
700 if (unlikely(hweight64(flags & BTRFS_BLOCK_GROUP_PROFILE_MASK) > 1)) { in check_block_group_item()
709 if (unlikely(type != BTRFS_BLOCK_GROUP_DATA && in check_block_group_item()
801 if (unlikely(!num_stripes)) { in btrfs_check_chunk_valid()
806 if (unlikely(num_stripes < ncopies)) { in btrfs_check_chunk_valid()
812 if (unlikely(nparity && num_stripes == nparity)) { in btrfs_check_chunk_valid()
818 if (unlikely(!IS_ALIGNED(logical, fs_info->sectorsize))) { in btrfs_check_chunk_valid()
824 if (unlikely(btrfs_chunk_sector_size(leaf, chunk) != fs_info->sectorsize)) { in btrfs_check_chunk_valid()
831 if (unlikely(!length || !IS_ALIGNED(length, fs_info->sectorsize))) { in btrfs_check_chunk_valid()
836 if (unlikely(check_add_overflow(logical, length, &chunk_end))) { in btrfs_check_chunk_valid()
842 if (unlikely(!is_power_of_2(stripe_len) || stripe_len != BTRFS_STRIPE_LEN)) { in btrfs_check_chunk_valid()
848 if (unlikely(type & ~(BTRFS_BLOCK_GROUP_TYPE_MASK | in btrfs_check_chunk_valid()
858 if (unlikely(!has_single_bit_set(type & BTRFS_BLOCK_GROUP_PROFILE_MASK) && in btrfs_check_chunk_valid()
865 if (unlikely((type & BTRFS_BLOCK_GROUP_TYPE_MASK) == 0)) { in btrfs_check_chunk_valid()
872 if (unlikely((type & BTRFS_BLOCK_GROUP_SYSTEM) && in btrfs_check_chunk_valid()
886 if (unlikely((type & BTRFS_BLOCK_GROUP_METADATA) && in btrfs_check_chunk_valid()
894 if (unlikely((type & BTRFS_BLOCK_GROUP_RAID10 && in btrfs_check_chunk_valid()
932 if (unlikely(btrfs_item_size(leaf, slot) < sizeof(struct btrfs_chunk))) { in check_leaf_chunk_item()
946 if (unlikely(btrfs_chunk_item_size(num_stripes) != in check_leaf_chunk_item()
987 if (unlikely(key->objectid != BTRFS_DEV_ITEMS_OBJECTID)) { in check_dev_item()
994 if (unlikely(item_size != sizeof(*ditem))) { in check_dev_item()
1001 if (unlikely(btrfs_device_id(leaf, ditem) != key->offset)) { in check_dev_item()
1013 if (unlikely(btrfs_device_bytes_used(leaf, ditem) > in check_dev_item()
1042 if (unlikely(ret < 0)) in check_inode_item()
1045 if (unlikely(item_size != sizeof(*iitem))) { in check_inode_item()
1054 if (unlikely(btrfs_inode_generation(leaf, iitem) > super_gen + 1)) { in check_inode_item()
1062 if (unlikely(btrfs_inode_transid(leaf, iitem) > super_gen + 1)) { in check_inode_item()
1075 if (unlikely(mode & ~valid_mask)) { in check_inode_item()
1088 if (unlikely(!S_ISLNK(mode) && !S_ISBLK(mode) && !S_ISSOCK(mode))) { in check_inode_item()
1095 if (unlikely(S_ISDIR(mode) && btrfs_inode_nlink(leaf, iitem) > 1)) { in check_inode_item()
1102 if (unlikely(flags & ~BTRFS_INODE_FLAG_MASK)) { in check_inode_item()
1107 if (unlikely(!sb_rdonly(fs_info->sb) && in check_inode_item()
1127 if (unlikely(ret < 0)) in check_root_item()
1130 if (unlikely(btrfs_item_size(leaf, slot) != sizeof(ri) && in check_root_item()
1149 if (unlikely(btrfs_root_generation(&ri) > in check_root_item()
1157 if (unlikely(btrfs_root_generation_v2(&ri) > in check_root_item()
1165 if (unlikely(btrfs_root_last_snapshot(&ri) > in check_root_item()
1175 if (unlikely(!IS_ALIGNED(btrfs_root_bytenr(&ri), fs_info->sectorsize))) { in check_root_item()
1181 if (unlikely(btrfs_root_level(&ri) >= BTRFS_MAX_LEVEL)) { in check_root_item()
1187 if (unlikely(btrfs_root_drop_level(&ri) >= BTRFS_MAX_LEVEL)) { in check_root_item()
1195 if (unlikely(btrfs_root_flags(&ri) & ~valid_root_flags)) { in check_root_item()
1250 if (unlikely(key->type == BTRFS_METADATA_ITEM_KEY && in check_extent_item()
1257 if (unlikely(!IS_ALIGNED(key->objectid, fs_info->sectorsize))) { in check_extent_item()
1265 if (unlikely(key->type == BTRFS_METADATA_ITEM_KEY && in check_extent_item()
1292 if (unlikely(item_size < sizeof(*ei))) { in check_extent_item()
1306 if (unlikely(generation > in check_extent_item()
1314 if (unlikely(!has_single_bit_set(flags & (BTRFS_EXTENT_FLAG_DATA | in check_extent_item()
1324 if (unlikely(key->type == BTRFS_EXTENT_ITEM_KEY && in check_extent_item()
1332 if (unlikely(key->type != BTRFS_EXTENT_ITEM_KEY)) { in check_extent_item()
1338 if (unlikely(!IS_ALIGNED(key->offset, fs_info->sectorsize))) { in check_extent_item()
1344 if (unlikely(flags & BTRFS_BLOCK_FLAG_FULL_BACKREF)) { in check_extent_item()
1357 if (unlikely(btrfs_tree_block_level(leaf, info) >= BTRFS_MAX_LEVEL)) { in check_extent_item()
1376 if (unlikely(ptr + sizeof(*iref) > end)) { in check_extent_item()
1385 if (unlikely(ptr + btrfs_extent_inline_ref_size(inline_type) > end)) { in check_extent_item()
1399 if (unlikely(!IS_ALIGNED(inline_offset, in check_extent_item()
1415 if (unlikely(!IS_ALIGNED(dref_offset, in check_extent_item()
1427 if (unlikely(!IS_ALIGNED(inline_offset, in check_extent_item()
1444 if (unlikely(ptr != end)) { in check_extent_item()
1451 if (unlikely(inline_refs > total_refs)) { in check_extent_item()
1467 if (unlikely(prev_end > key->objectid)) { in check_extent_item()
1488 if (unlikely(btrfs_item_size(leaf, slot) != expect_item_size)) { in check_simple_keyed_refs()
1495 if (unlikely(!IS_ALIGNED(key->objectid, leaf->fs_info->sectorsize))) { in check_simple_keyed_refs()
1501 if (unlikely(key->type != BTRFS_TREE_BLOCK_REF_KEY && in check_simple_keyed_refs()
1518 if (unlikely(btrfs_item_size(leaf, slot) % sizeof(*dref) != 0)) { in check_extent_data_ref()
1525 if (unlikely(!IS_ALIGNED(key->objectid, leaf->fs_info->sectorsize))) { in check_extent_data_ref()
1540 if (unlikely(!IS_ALIGNED(offset, leaf->fs_info->sectorsize))) { in check_extent_data_ref()
1560 if (unlikely(!check_prev_ino(leaf, key, slot, prev_key))) in check_inode_ref()
1563 if (unlikely(btrfs_item_size(leaf, slot) <= sizeof(*iref))) { in check_inode_ref()
1576 if (unlikely(ptr + sizeof(iref) > end)) { in check_inode_ref()
1585 if (unlikely(ptr + sizeof(*iref) + namelen > end)) { in check_inode_ref()
1668 if (unlikely(btrfs_header_level(leaf) != 0)) { in check_leaf()
1687 if (unlikely(owner == BTRFS_ROOT_TREE_OBJECTID || in check_leaf()
1699 if (unlikely(owner == 0)) { in check_leaf()
1709 if (unlikely(owner == BTRFS_EXTENT_TREE_OBJECTID)) { in check_leaf()
1719 if (unlikely(nritems == 0)) in check_leaf()
1741 if (unlikely(btrfs_comp_cpu_keys(&prev_key, &key) >= 0)) { in check_leaf()
1762 if (unlikely(item_data_end != item_end_expected)) { in check_leaf()
1774 if (unlikely(item_data_end > BTRFS_LEAF_DATA_SIZE(fs_info))) { in check_leaf()
1782 if (unlikely(btrfs_item_ptr_offset(leaf, slot) < in check_leaf()
1798 if (unlikely(ret < 0)) in check_leaf()
1831 if (unlikely(level <= 0 || level >= BTRFS_MAX_LEVEL)) { in btrfs_check_node()
1837 if (unlikely(nr == 0 || nr > BTRFS_NODEPTRS_PER_BLOCK(fs_info))) { in btrfs_check_node()
1851 if (unlikely(!bytenr)) { in btrfs_check_node()
1857 if (unlikely(!IS_ALIGNED(bytenr, fs_info->sectorsize))) { in btrfs_check_node()
1865 if (unlikely(btrfs_comp_cpu_keys(&key, &next_key) >= 0)) { in btrfs_check_node()
1909 if (unlikely(root_owner != eb_owner)) { in btrfs_check_eb_owner()
1924 if (unlikely(is_subvol != is_fstree(eb_owner))) { in btrfs_check_eb_owner()