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_nr(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()
651 if (unlikely(key->offset == 0)) { in check_block_group_item()
657 if (unlikely(item_size != sizeof(bgi))) { in check_block_group_item()
666 if (unlikely(btrfs_stack_block_group_chunk_objectid(&bgi) != in check_block_group_item()
675 if (unlikely(btrfs_stack_block_group_used(&bgi) > key->offset)) { in check_block_group_item()
683 if (unlikely(hweight64(flags & BTRFS_BLOCK_GROUP_PROFILE_MASK) > 1)) { in check_block_group_item()
692 if (unlikely(type != BTRFS_BLOCK_GROUP_DATA && in check_block_group_item()
784 if (unlikely(!num_stripes)) { in btrfs_check_chunk_valid()
789 if (unlikely(num_stripes < ncopies)) { in btrfs_check_chunk_valid()
795 if (unlikely(nparity && num_stripes == nparity)) { in btrfs_check_chunk_valid()
801 if (unlikely(!IS_ALIGNED(logical, fs_info->sectorsize))) { in btrfs_check_chunk_valid()
807 if (unlikely(btrfs_chunk_sector_size(leaf, chunk) != fs_info->sectorsize)) { in btrfs_check_chunk_valid()
814 if (unlikely(!length || !IS_ALIGNED(length, fs_info->sectorsize))) { in btrfs_check_chunk_valid()
819 if (unlikely(check_add_overflow(logical, length, &chunk_end))) { in btrfs_check_chunk_valid()
825 if (unlikely(!is_power_of_2(stripe_len) || stripe_len != BTRFS_STRIPE_LEN)) { in btrfs_check_chunk_valid()
831 if (unlikely(type & ~(BTRFS_BLOCK_GROUP_TYPE_MASK | in btrfs_check_chunk_valid()
841 if (unlikely(!has_single_bit_set(type & BTRFS_BLOCK_GROUP_PROFILE_MASK) && in btrfs_check_chunk_valid()
848 if (unlikely((type & BTRFS_BLOCK_GROUP_TYPE_MASK) == 0)) { in btrfs_check_chunk_valid()
855 if (unlikely((type & BTRFS_BLOCK_GROUP_SYSTEM) && in btrfs_check_chunk_valid()
869 if (unlikely((type & BTRFS_BLOCK_GROUP_METADATA) && in btrfs_check_chunk_valid()
877 if (unlikely((type & BTRFS_BLOCK_GROUP_RAID10 && in btrfs_check_chunk_valid()
915 if (unlikely(btrfs_item_size_nr(leaf, slot) < sizeof(struct btrfs_chunk))) { in check_leaf_chunk_item()
929 if (unlikely(btrfs_chunk_item_size(num_stripes) != in check_leaf_chunk_item()
969 if (unlikely(key->objectid != BTRFS_DEV_ITEMS_OBJECTID)) { in check_dev_item()
976 if (unlikely(btrfs_device_id(leaf, ditem) != key->offset)) { in check_dev_item()
988 if (unlikely(btrfs_device_bytes_used(leaf, ditem) > in check_dev_item()
1016 if (unlikely(ret < 0)) in check_inode_item()
1022 if (unlikely(btrfs_inode_generation(leaf, iitem) > super_gen + 1)) { in check_inode_item()
1030 if (unlikely(btrfs_inode_transid(leaf, iitem) > super_gen + 1)) { in check_inode_item()
1043 if (unlikely(mode & ~valid_mask)) { in check_inode_item()
1056 if (unlikely(!S_ISLNK(mode) && !S_ISBLK(mode) && !S_ISSOCK(mode))) { in check_inode_item()
1063 if (unlikely(S_ISDIR(mode) && btrfs_inode_nlink(leaf, iitem) > 1)) { in check_inode_item()
1070 if (unlikely(flags & ~BTRFS_INODE_FLAG_MASK)) { in check_inode_item()
1075 if (unlikely(!sb_rdonly(fs_info->sb) && in check_inode_item()
1095 if (unlikely(ret < 0)) in check_root_item()
1098 if (unlikely(btrfs_item_size_nr(leaf, slot) != sizeof(ri) && in check_root_item()
1117 if (unlikely(btrfs_root_generation(&ri) > in check_root_item()
1125 if (unlikely(btrfs_root_generation_v2(&ri) > in check_root_item()
1133 if (unlikely(btrfs_root_last_snapshot(&ri) > in check_root_item()
1143 if (unlikely(!IS_ALIGNED(btrfs_root_bytenr(&ri), fs_info->sectorsize))) { in check_root_item()
1149 if (unlikely(btrfs_root_level(&ri) >= BTRFS_MAX_LEVEL)) { in check_root_item()
1155 if (unlikely(btrfs_root_drop_level(&ri) >= BTRFS_MAX_LEVEL)) { in check_root_item()
1163 if (unlikely(btrfs_root_flags(&ri) & ~valid_root_flags)) { in check_root_item()
1217 if (unlikely(key->type == BTRFS_METADATA_ITEM_KEY && in check_extent_item()
1224 if (unlikely(!IS_ALIGNED(key->objectid, fs_info->sectorsize))) { in check_extent_item()
1232 if (unlikely(key->type == BTRFS_METADATA_ITEM_KEY && in check_extent_item()
1259 if (unlikely(item_size < sizeof(*ei))) { in check_extent_item()
1273 if (unlikely(generation > in check_extent_item()
1281 if (unlikely(!has_single_bit_set(flags & (BTRFS_EXTENT_FLAG_DATA | in check_extent_item()
1291 if (unlikely(key->type == BTRFS_EXTENT_ITEM_KEY && in check_extent_item()
1299 if (unlikely(key->type != BTRFS_EXTENT_ITEM_KEY)) { in check_extent_item()
1305 if (unlikely(!IS_ALIGNED(key->offset, fs_info->sectorsize))) { in check_extent_item()
1311 if (unlikely(flags & BTRFS_BLOCK_FLAG_FULL_BACKREF)) { in check_extent_item()
1324 if (unlikely(btrfs_tree_block_level(leaf, info) >= BTRFS_MAX_LEVEL)) { in check_extent_item()
1343 if (unlikely(ptr + sizeof(*iref) > end)) { in check_extent_item()
1352 if (unlikely(ptr + btrfs_extent_inline_ref_size(inline_type) > end)) { in check_extent_item()
1366 if (unlikely(!IS_ALIGNED(inline_offset, in check_extent_item()
1382 if (unlikely(!IS_ALIGNED(dref_offset, in check_extent_item()
1394 if (unlikely(!IS_ALIGNED(inline_offset, in check_extent_item()
1411 if (unlikely(ptr != end)) { in check_extent_item()
1418 if (unlikely(inline_refs > total_refs)) { in check_extent_item()
1435 if (unlikely(btrfs_item_size_nr(leaf, slot) != expect_item_size)) { in check_simple_keyed_refs()
1442 if (unlikely(!IS_ALIGNED(key->objectid, leaf->fs_info->sectorsize))) { in check_simple_keyed_refs()
1448 if (unlikely(key->type != BTRFS_TREE_BLOCK_REF_KEY && in check_simple_keyed_refs()
1465 if (unlikely(btrfs_item_size_nr(leaf, slot) % sizeof(*dref) != 0)) { in check_extent_data_ref()
1472 if (unlikely(!IS_ALIGNED(key->objectid, leaf->fs_info->sectorsize))) { in check_extent_data_ref()
1487 if (unlikely(!IS_ALIGNED(offset, leaf->fs_info->sectorsize))) { in check_extent_data_ref()
1507 if (unlikely(!check_prev_ino(leaf, key, slot, prev_key))) in check_inode_ref()
1510 if (unlikely(btrfs_item_size_nr(leaf, slot) <= sizeof(*iref))) { in check_inode_ref()
1523 if (unlikely(ptr + sizeof(iref) > end)) { in check_inode_ref()
1532 if (unlikely(ptr + sizeof(*iref) + namelen > end)) { in check_inode_ref()
1615 if (unlikely(btrfs_header_level(leaf) != 0)) { in check_leaf()
1634 if (unlikely(owner == BTRFS_ROOT_TREE_OBJECTID || in check_leaf()
1646 if (unlikely(owner == 0)) { in check_leaf()
1654 if (unlikely(nritems == 0)) in check_leaf()
1675 if (unlikely(btrfs_comp_cpu_keys(&prev_key, &key) >= 0)) { in check_leaf()
1694 if (unlikely(btrfs_item_end_nr(leaf, slot) != item_end_expected)) { in check_leaf()
1707 if (unlikely(btrfs_item_end_nr(leaf, slot) > in check_leaf()
1717 if (unlikely(btrfs_item_ptr_offset(leaf, slot) < in check_leaf()
1733 if (unlikely(ret < 0)) in check_leaf()
1766 if (unlikely(level <= 0 || level >= BTRFS_MAX_LEVEL)) { in btrfs_check_node()
1772 if (unlikely(nr == 0 || nr > BTRFS_NODEPTRS_PER_BLOCK(fs_info))) { in btrfs_check_node()
1786 if (unlikely(!bytenr)) { in btrfs_check_node()
1792 if (unlikely(!IS_ALIGNED(bytenr, fs_info->sectorsize))) { in btrfs_check_node()
1800 if (unlikely(btrfs_comp_cpu_keys(&key, &next_key) >= 0)) { in btrfs_check_node()