Lines Matching refs:unlikely
108 if (unlikely(!IS_ALIGNED(btrfs_file_extent_##name((leaf), (fi)), \
212 if (unlikely(!IS_ALIGNED(key->offset, sectorsize))) { in check_extent_data_item()
225 if (unlikely(!check_prev_ino(leaf, key, slot, prev_key))) in check_extent_data_item()
234 if (unlikely(item_size < BTRFS_FILE_EXTENT_INLINE_DATA_START)) { in check_extent_data_item()
241 if (unlikely(btrfs_file_extent_type(leaf, fi) >= in check_extent_data_item()
254 if (unlikely(btrfs_file_extent_compression(leaf, fi) >= in check_extent_data_item()
262 if (unlikely(btrfs_file_extent_encryption(leaf, fi))) { in check_extent_data_item()
270 if (unlikely(key->offset)) { in check_extent_data_item()
283 if (unlikely(item_size != BTRFS_FILE_EXTENT_INLINE_DATA_START + in check_extent_data_item()
295 if (unlikely(item_size != sizeof(*fi))) { in check_extent_data_item()
301 if (unlikely(CHECK_FE_ALIGNED(leaf, slot, fi, ram_bytes, sectorsize) || in check_extent_data_item()
309 if (unlikely(check_add_overflow(btrfs_file_extent_num_bytes(leaf, fi), in check_extent_data_item()
331 if (unlikely(prev_end > key->offset)) { in check_extent_data_item()
349 if (unlikely(key->objectid != BTRFS_EXTENT_CSUM_OBJECTID)) { in check_csum_item()
355 if (unlikely(!IS_ALIGNED(key->offset, sectorsize))) { in check_csum_item()
361 if (unlikely(!IS_ALIGNED(btrfs_item_size(leaf, slot), csumsize))) { in check_csum_item()
374 if (unlikely(prev_csum_end > key->offset)) { in check_csum_item()
399 if (unlikely(key->objectid != 0 || key->type != 0 || in check_inode_key()
405 if (unlikely((key->objectid < BTRFS_FIRST_FREE_OBJECTID || in check_inode_key()
426 if (unlikely(key->offset != 0)) { in check_inode_key()
455 if (unlikely(is_root_item && key->objectid == BTRFS_TREE_RELOC_OBJECTID && in check_root_key()
464 if (unlikely(key->objectid == 0)) { in check_root_key()
474 if (unlikely(!is_fstree(key->objectid) && !is_root_item)) { in check_root_key()
490 if (unlikely(key->objectid == BTRFS_TREE_RELOC_OBJECTID && in check_root_key()
507 if (unlikely(!check_prev_ino(leaf, key, slot, prev_key))) in check_dir_item()
522 if (unlikely(cur + sizeof(*di) > item_size)) { in check_dir_item()
533 if (unlikely(ret < 0)) in check_dir_item()
538 if (unlikely(ret < 0)) in check_dir_item()
550 if (unlikely(dir_type >= BTRFS_FT_MAX)) { in check_dir_item()
557 if (unlikely(key->type == BTRFS_XATTR_ITEM_KEY && in check_dir_item()
564 if (unlikely(dir_type == BTRFS_FT_XATTR && in check_dir_item()
578 if (unlikely(name_len > max_name_len)) { in check_dir_item()
584 if (unlikely(name_len + data_len > BTRFS_MAX_XATTR_SIZE(fs_info))) { in check_dir_item()
592 if (unlikely(data_len && dir_type != BTRFS_FT_XATTR)) { in check_dir_item()
602 if (unlikely(cur + total_size > item_size)) { in check_dir_item()
620 if (unlikely(key->offset != name_hash)) { in check_dir_item()
671 if (unlikely(key->offset == 0)) { in check_block_group_item()
677 if (unlikely(item_size != sizeof(bgi))) { in check_block_group_item()
694 if (unlikely(fs_info->nr_global_roots && in check_block_group_item()
702 } else if (unlikely(chunk_objectid != BTRFS_FIRST_CHUNK_TREE_OBJECTID)) { in check_block_group_item()
710 if (unlikely(btrfs_stack_block_group_used(&bgi) > key->offset)) { in check_block_group_item()
718 if (unlikely(hweight64(flags & BTRFS_BLOCK_GROUP_PROFILE_MASK) > 1)) { in check_block_group_item()
727 if (unlikely(type != BTRFS_BLOCK_GROUP_DATA && in check_block_group_item()
819 if (unlikely(!num_stripes)) { in btrfs_check_chunk_valid()
824 if (unlikely(num_stripes < ncopies)) { in btrfs_check_chunk_valid()
830 if (unlikely(nparity && num_stripes == nparity)) { in btrfs_check_chunk_valid()
836 if (unlikely(!IS_ALIGNED(logical, fs_info->sectorsize))) { in btrfs_check_chunk_valid()
842 if (unlikely(btrfs_chunk_sector_size(leaf, chunk) != fs_info->sectorsize)) { in btrfs_check_chunk_valid()
849 if (unlikely(!length || !IS_ALIGNED(length, fs_info->sectorsize))) { in btrfs_check_chunk_valid()
854 if (unlikely(check_add_overflow(logical, length, &chunk_end))) { in btrfs_check_chunk_valid()
860 if (unlikely(!is_power_of_2(stripe_len) || stripe_len != BTRFS_STRIPE_LEN)) { in btrfs_check_chunk_valid()
874 if (unlikely(length >= btrfs_stripe_nr_to_offset(U32_MAX))) { in btrfs_check_chunk_valid()
880 if (unlikely(type & ~(BTRFS_BLOCK_GROUP_TYPE_MASK | in btrfs_check_chunk_valid()
890 if (unlikely(!has_single_bit_set(type & BTRFS_BLOCK_GROUP_PROFILE_MASK) && in btrfs_check_chunk_valid()
897 if (unlikely((type & BTRFS_BLOCK_GROUP_TYPE_MASK) == 0)) { in btrfs_check_chunk_valid()
904 if (unlikely((type & BTRFS_BLOCK_GROUP_SYSTEM) && in btrfs_check_chunk_valid()
918 if (unlikely((type & BTRFS_BLOCK_GROUP_METADATA) && in btrfs_check_chunk_valid()
926 if (unlikely((type & BTRFS_BLOCK_GROUP_RAID10 && in btrfs_check_chunk_valid()
964 if (unlikely(btrfs_item_size(leaf, slot) < sizeof(struct btrfs_chunk))) { in check_leaf_chunk_item()
978 if (unlikely(btrfs_chunk_item_size(num_stripes) != in check_leaf_chunk_item()
1019 if (unlikely(key->objectid != BTRFS_DEV_ITEMS_OBJECTID)) { in check_dev_item()
1026 if (unlikely(item_size != sizeof(*ditem))) { in check_dev_item()
1033 if (unlikely(btrfs_device_id(leaf, ditem) != key->offset)) { in check_dev_item()
1045 if (unlikely(btrfs_device_bytes_used(leaf, ditem) > in check_dev_item()
1074 if (unlikely(ret < 0)) in check_inode_item()
1077 if (unlikely(item_size != sizeof(*iitem))) { in check_inode_item()
1086 if (unlikely(btrfs_inode_generation(leaf, iitem) > super_gen + 1)) { in check_inode_item()
1094 if (unlikely(btrfs_inode_transid(leaf, iitem) > super_gen + 1)) { in check_inode_item()
1107 if (unlikely(mode & ~valid_mask)) { in check_inode_item()
1120 if (unlikely(!S_ISLNK(mode) && !S_ISBLK(mode) && !S_ISSOCK(mode))) { in check_inode_item()
1127 if (unlikely(S_ISDIR(mode) && btrfs_inode_nlink(leaf, iitem) > 1)) { in check_inode_item()
1134 if (unlikely(flags & ~BTRFS_INODE_FLAG_MASK)) { in check_inode_item()
1139 if (unlikely(!sb_rdonly(fs_info->sb) && in check_inode_item()
1159 if (unlikely(ret < 0)) in check_root_item()
1162 if (unlikely(btrfs_item_size(leaf, slot) != sizeof(ri) && in check_root_item()
1181 if (unlikely(btrfs_root_generation(&ri) > in check_root_item()
1189 if (unlikely(btrfs_root_generation_v2(&ri) > in check_root_item()
1197 if (unlikely(btrfs_root_last_snapshot(&ri) > in check_root_item()
1207 if (unlikely(!IS_ALIGNED(btrfs_root_bytenr(&ri), fs_info->sectorsize))) { in check_root_item()
1213 if (unlikely(btrfs_root_level(&ri) >= BTRFS_MAX_LEVEL)) { in check_root_item()
1219 if (unlikely(btrfs_root_drop_level(&ri) >= BTRFS_MAX_LEVEL)) { in check_root_item()
1227 if (unlikely(btrfs_root_flags(&ri) & ~valid_root_flags)) { in check_root_item()
1282 if (unlikely(key->type == BTRFS_METADATA_ITEM_KEY && in check_extent_item()
1289 if (unlikely(!IS_ALIGNED(key->objectid, fs_info->sectorsize))) { in check_extent_item()
1297 if (unlikely(key->type == BTRFS_METADATA_ITEM_KEY && in check_extent_item()
1324 if (unlikely(item_size < sizeof(*ei))) { in check_extent_item()
1338 if (unlikely(generation > in check_extent_item()
1346 if (unlikely(!has_single_bit_set(flags & (BTRFS_EXTENT_FLAG_DATA | in check_extent_item()
1356 if (unlikely(key->type == BTRFS_EXTENT_ITEM_KEY && in check_extent_item()
1364 if (unlikely(key->type != BTRFS_EXTENT_ITEM_KEY)) { in check_extent_item()
1370 if (unlikely(!IS_ALIGNED(key->offset, fs_info->sectorsize))) { in check_extent_item()
1376 if (unlikely(flags & BTRFS_BLOCK_FLAG_FULL_BACKREF)) { in check_extent_item()
1389 if (unlikely(btrfs_tree_block_level(leaf, info) >= BTRFS_MAX_LEVEL)) { in check_extent_item()
1408 if (unlikely(ptr + sizeof(*iref) > end)) { in check_extent_item()
1417 if (unlikely(ptr + btrfs_extent_inline_ref_size(inline_type) > end)) { in check_extent_item()
1431 if (unlikely(!IS_ALIGNED(inline_offset, in check_extent_item()
1447 if (unlikely(!IS_ALIGNED(dref_offset, in check_extent_item()
1459 if (unlikely(!IS_ALIGNED(inline_offset, in check_extent_item()
1476 if (unlikely(ptr != end)) { in check_extent_item()
1483 if (unlikely(inline_refs > total_refs)) { in check_extent_item()
1499 if (unlikely(prev_end > key->objectid)) { in check_extent_item()
1520 if (unlikely(btrfs_item_size(leaf, slot) != expect_item_size)) { in check_simple_keyed_refs()
1527 if (unlikely(!IS_ALIGNED(key->objectid, leaf->fs_info->sectorsize))) { in check_simple_keyed_refs()
1533 if (unlikely(key->type != BTRFS_TREE_BLOCK_REF_KEY && in check_simple_keyed_refs()
1550 if (unlikely(btrfs_item_size(leaf, slot) % sizeof(*dref) != 0)) { in check_extent_data_ref()
1557 if (unlikely(!IS_ALIGNED(key->objectid, leaf->fs_info->sectorsize))) { in check_extent_data_ref()
1572 if (unlikely(!IS_ALIGNED(offset, leaf->fs_info->sectorsize))) { in check_extent_data_ref()
1592 if (unlikely(!check_prev_ino(leaf, key, slot, prev_key))) in check_inode_ref()
1595 if (unlikely(btrfs_item_size(leaf, slot) <= sizeof(*iref))) { in check_inode_ref()
1608 if (unlikely(ptr + sizeof(iref) > end)) { in check_inode_ref()
1617 if (unlikely(ptr + sizeof(*iref) + namelen > end)) { in check_inode_ref()
1704 if (unlikely(btrfs_header_level(leaf) != 0)) { in __btrfs_check_leaf()
1723 if (unlikely(owner == BTRFS_ROOT_TREE_OBJECTID || in __btrfs_check_leaf()
1735 if (unlikely(owner == 0)) { in __btrfs_check_leaf()
1745 if (unlikely(owner == BTRFS_EXTENT_TREE_OBJECTID)) { in __btrfs_check_leaf()
1755 if (unlikely(nritems == 0)) in __btrfs_check_leaf()
1776 if (unlikely(btrfs_comp_cpu_keys(&prev_key, &key) >= 0)) { in __btrfs_check_leaf()
1797 if (unlikely(item_data_end != item_end_expected)) { in __btrfs_check_leaf()
1809 if (unlikely(item_data_end > BTRFS_LEAF_DATA_SIZE(fs_info))) { in __btrfs_check_leaf()
1817 if (unlikely(btrfs_item_ptr_offset(leaf, slot) < in __btrfs_check_leaf()
1839 if (unlikely(ret != BTRFS_TREE_BLOCK_CLEAN)) in __btrfs_check_leaf()
1856 if (unlikely(ret != BTRFS_TREE_BLOCK_CLEAN)) in btrfs_check_leaf()
1871 if (unlikely(level <= 0 || level >= BTRFS_MAX_LEVEL)) { in __btrfs_check_node()
1877 if (unlikely(nr == 0 || nr > BTRFS_NODEPTRS_PER_BLOCK(fs_info))) { in __btrfs_check_node()
1891 if (unlikely(!bytenr)) { in __btrfs_check_node()
1896 if (unlikely(!IS_ALIGNED(bytenr, fs_info->sectorsize))) { in __btrfs_check_node()
1903 if (unlikely(btrfs_comp_cpu_keys(&key, &next_key) >= 0)) { in __btrfs_check_node()
1920 if (unlikely(ret != BTRFS_TREE_BLOCK_CLEAN)) in btrfs_check_node()
1955 if (unlikely(root_owner != eb_owner)) { in btrfs_check_eb_owner()
1970 if (unlikely(is_subvol != is_fstree(eb_owner))) { in btrfs_check_eb_owner()