| /Linux-v6.6/fs/btrfs/tests/ |
| D | inode-tests.c | 252 BTRFS_I(inode)->root = root; in test_btrfs_get_extent() 253 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, 0, sectorsize); in test_btrfs_get_extent() 264 btrfs_drop_extent_map_range(BTRFS_I(inode), 0, (u64)-1, false); in test_btrfs_get_extent() 273 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, 0, (u64)-1); in test_btrfs_get_extent() 311 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize); in test_btrfs_get_extent() 334 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize); in test_btrfs_get_extent() 362 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize); in test_btrfs_get_extent() 391 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize); in test_btrfs_get_extent() 413 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize); in test_btrfs_get_extent() 447 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize); in test_btrfs_get_extent() [all …]
|
| D | extent-map-tests.c | 585 em_tree = &BTRFS_I(inode)->extent_tree; in test_case_5() 625 btrfs_drop_extent_map_range(BTRFS_I(inode), start, end, false); in test_case_5() 626 ret = validate_range(&BTRFS_I(inode)->extent_tree, 0); in test_case_5() 633 btrfs_drop_extent_map_range(BTRFS_I(inode), start, end, false); in test_case_5() 634 ret = validate_range(&BTRFS_I(inode)->extent_tree, 1); in test_case_5() 641 btrfs_drop_extent_map_range(BTRFS_I(inode), start, end, false); in test_case_5() 642 ret = validate_range(&BTRFS_I(inode)->extent_tree, 2); in test_case_5() 649 btrfs_drop_extent_map_range(BTRFS_I(inode), start, end, false); in test_case_5() 650 ret = validate_range(&BTRFS_I(inode)->extent_tree, 3); in test_case_5() 731 em_tree = &BTRFS_I(inode)->extent_tree; in test_case_7() [all …]
|
| D | btrfs-tests.c | 64 BTRFS_I(inode)->location.type = BTRFS_INODE_ITEM_KEY; in btrfs_new_test_inode() 65 BTRFS_I(inode)->location.objectid = BTRFS_FIRST_FREE_OBJECTID; in btrfs_new_test_inode() 66 BTRFS_I(inode)->location.offset = 0; in btrfs_new_test_inode()
|
| /Linux-v6.6/fs/btrfs/ |
| D | reflink.c | 28 struct btrfs_root *root = BTRFS_I(inode)->root; in clone_finish_inode_update() 43 btrfs_inode_safe_disk_i_size_write(BTRFS_I(inode), 0); in clone_finish_inode_update() 46 ret = btrfs_update_inode(trans, root, BTRFS_I(inode)); in clone_finish_inode_update() 179 struct btrfs_root *root = BTRFS_I(dst)->root; in clone_copy_inline_extent() 188 ret = copy_inline_to_page(BTRFS_I(dst), new_key->offset, in clone_copy_inline_extent() 193 key.objectid = btrfs_ino(BTRFS_I(dst)); in clone_copy_inline_extent() 208 if (key.objectid == btrfs_ino(BTRFS_I(dst)) && in clone_copy_inline_extent() 273 ret = btrfs_drop_extents(trans, root, BTRFS_I(dst), &drop_args); in clone_copy_inline_extent() 284 btrfs_update_inode_bytes(BTRFS_I(dst), datal, drop_args.bytes_found); in clone_copy_inline_extent() 285 btrfs_set_inode_full_sync(BTRFS_I(dst)); in clone_copy_inline_extent() [all …]
|
| D | props.c | 139 set_bit(BTRFS_INODE_HAS_PROPS, &BTRFS_I(inode)->runtime_flags); in btrfs_set_prop() 261 struct btrfs_root *root = BTRFS_I(inode)->root; in inode_prop_iterator() 268 handler->xattr_name, btrfs_ino(BTRFS_I(inode)), in inode_prop_iterator() 271 set_bit(BTRFS_INODE_HAS_PROPS, &BTRFS_I(inode)->runtime_flags); in inode_prop_iterator() 276 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_load_inode_props() 277 u64 ino = btrfs_ino(BTRFS_I(inode)); in btrfs_load_inode_props() 309 BTRFS_I(inode)->flags &= ~BTRFS_INODE_COMPRESS; in prop_compression_apply() 310 BTRFS_I(inode)->flags &= ~BTRFS_INODE_NOCOMPRESS; in prop_compression_apply() 311 BTRFS_I(inode)->prop_compress = BTRFS_COMPRESS_NONE; in prop_compression_apply() 318 BTRFS_I(inode)->flags |= BTRFS_INODE_NOCOMPRESS; in prop_compression_apply() [all …]
|
| D | xattr.c | 31 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_getxattr() 42 di = btrfs_lookup_xattr(NULL, root, path, btrfs_ino(BTRFS_I(inode)), in btrfs_getxattr() 87 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_setxattr() 105 btrfs_ino(BTRFS_I(inode)), name, name_len, -1); in btrfs_setxattr() 125 btrfs_ino(BTRFS_I(inode)), name, name_len, 0); in btrfs_setxattr() 136 ret = btrfs_insert_xattr_item(trans, root, path, btrfs_ino(BTRFS_I(inode)), in btrfs_setxattr() 220 &BTRFS_I(inode)->runtime_flags); in btrfs_setxattr() 221 clear_bit(BTRFS_INODE_NO_XATTRS, &BTRFS_I(inode)->runtime_flags); in btrfs_setxattr() 232 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_setxattr_trans() 268 ret = btrfs_update_inode(trans, root, BTRFS_I(inode)); in btrfs_setxattr_trans() [all …]
|
| D | inode.c | 2852 fixup->inode = BTRFS_I(inode); in btrfs_writepage_cow_fixup() 3002 return insert_reserved_file_extent(trans, BTRFS_I(oe->inode), in insert_ordered_extent_file_extent() 3014 struct btrfs_inode *inode = BTRFS_I(ordered_extent->inode); in btrfs_finish_one_ordered() 3590 ret = btrfs_drop_verity_items(BTRFS_I(inode)); in btrfs_orphan_cleanup() 3714 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_read_locked_inode() 3733 memcpy(&location, &BTRFS_I(inode)->location, sizeof(location)); in btrfs_read_locked_inode() 3753 btrfs_i_size_write(BTRFS_I(inode), btrfs_inode_size(leaf, inode_item)); in btrfs_read_locked_inode() 3754 btrfs_inode_set_file_extent_range(BTRFS_I(inode), 0, in btrfs_read_locked_inode() 3766 BTRFS_I(inode)->i_otime.tv_sec = in btrfs_read_locked_inode() 3768 BTRFS_I(inode)->i_otime.tv_nsec = in btrfs_read_locked_inode() [all …]
|
| D | file.c | 1146 !(BTRFS_I(inode)->flags & (BTRFS_INODE_NODATACOW | BTRFS_INODE_PREALLOC))) in btrfs_write_check() 1167 ret = btrfs_cont_expand(BTRFS_I(inode), oldsize, end_pos); in btrfs_write_check() 1200 ret = btrfs_inode_lock(BTRFS_I(inode), ilock_flags); in btrfs_buffered_write() 1251 ret = btrfs_check_data_free_space(BTRFS_I(inode), in btrfs_buffered_write() 1267 can_nocow = btrfs_check_nocow_lock(BTRFS_I(inode), pos, in btrfs_buffered_write() 1283 ret = btrfs_delalloc_reserve_metadata(BTRFS_I(inode), in btrfs_buffered_write() 1288 btrfs_free_reserved_data_space(BTRFS_I(inode), in btrfs_buffered_write() 1292 btrfs_check_nocow_unlock(BTRFS_I(inode)); in btrfs_buffered_write() 1303 btrfs_delalloc_release_extents(BTRFS_I(inode), reserve_bytes); in btrfs_buffered_write() 1315 btrfs_delalloc_release_extents(BTRFS_I(inode), in btrfs_buffered_write() [all …]
|
| D | export.c | 37 fid->objectid = btrfs_ino(BTRFS_I(inode)); in btrfs_encode_fh() 38 fid->root_objectid = BTRFS_I(inode)->root->root_key.objectid; in btrfs_encode_fh() 44 fid->parent_objectid = BTRFS_I(parent)->location.objectid; in btrfs_encode_fh() 46 parent_root_id = BTRFS_I(parent)->root->root_key.objectid; in btrfs_encode_fh() 151 struct btrfs_root *root = BTRFS_I(dir)->root; in btrfs_get_parent() 163 if (btrfs_ino(BTRFS_I(dir)) == BTRFS_FIRST_FREE_OBJECTID) { in btrfs_get_parent() 169 key.objectid = btrfs_ino(BTRFS_I(dir)); in btrfs_get_parent() 220 struct btrfs_root *root = BTRFS_I(dir)->root; in btrfs_get_name() 233 ino = btrfs_ino(BTRFS_I(inode)); in btrfs_get_name() 240 key.objectid = BTRFS_I(inode)->root->root_key.objectid; in btrfs_get_name() [all …]
|
| D | defrag.c | 272 clear_bit(BTRFS_INODE_IN_DEFRAG, &BTRFS_I(inode)->runtime_flags); in __btrfs_run_defrag_inode() 613 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree; in defrag_lookup_extent() 614 struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; in defrag_lookup_extent() 616 const u32 sectorsize = BTRFS_I(inode)->root->fs_info->sectorsize; in defrag_lookup_extent() 647 em = defrag_get_extent(BTRFS_I(inode), start, newer_than); in defrag_lookup_extent() 1301 btrfs_inode_lock(BTRFS_I(inode), 0); in btrfs_defrag_file() 1304 btrfs_inode_unlock(BTRFS_I(inode), 0); in btrfs_defrag_file() 1308 btrfs_inode_unlock(BTRFS_I(inode), 0); in btrfs_defrag_file() 1312 BTRFS_I(inode)->defrag_compress = compress_type; in btrfs_defrag_file() 1313 ret = defrag_one_cluster(BTRFS_I(inode), ra, cur, in btrfs_defrag_file() [all …]
|
| D | tree-log.c | 677 btrfs_ino(BTRFS_I(inode)), start, 0); in replay_one_extent() 711 ret = btrfs_drop_extents(trans, root, BTRFS_I(inode), &drop_args); in replay_one_extent() 886 ret = btrfs_inode_set_file_extent_range(BTRFS_I(inode), start, in replay_one_extent() 892 btrfs_update_inode_bytes(BTRFS_I(inode), nbytes, drop_args.bytes_found); in replay_one_extent() 893 ret = btrfs_update_inode(trans, root, BTRFS_I(inode)); in replay_one_extent() 957 ret = unlink_inode_for_log_replay(trans, dir, BTRFS_I(inode), &name); in drop_one_dir_item() 1173 BTRFS_I(victim_parent), in __add_inode_ref() 1319 ret = unlink_inode_for_log_replay(trans, BTRFS_I(dir), in unlink_old_inode_refs() 1420 ret = inode_in_dir(root, path, btrfs_ino(BTRFS_I(dir)), in add_inode_ref() 1421 btrfs_ino(BTRFS_I(inode)), ref_index, &name); in add_inode_ref() [all …]
|
| D | delayed-inode.c | 1680 delayed_node = btrfs_get_delayed_node(BTRFS_I(inode)); in btrfs_readdir_get_delayed_items() 1688 btrfs_inode_unlock(BTRFS_I(inode), BTRFS_ILOCK_SHARED); in btrfs_readdir_get_delayed_items() 1689 btrfs_inode_lock(BTRFS_I(inode), 0); in btrfs_readdir_get_delayed_items() 1821 btrfs_set_stack_inode_size(inode_item, BTRFS_I(inode)->disk_i_size); in fill_stack_inode_item() 1826 BTRFS_I(inode)->generation); in fill_stack_inode_item() 1831 flags = btrfs_inode_combine_flags(BTRFS_I(inode)->flags, in fill_stack_inode_item() 1832 BTRFS_I(inode)->ro_flags); in fill_stack_inode_item() 1852 BTRFS_I(inode)->i_otime.tv_sec); in fill_stack_inode_item() 1854 BTRFS_I(inode)->i_otime.tv_nsec); in fill_stack_inode_item() 1859 struct btrfs_fs_info *fs_info = BTRFS_I(inode)->root->fs_info; in btrfs_fill_inode() [all …]
|
| D | ioctl.c | 175 struct btrfs_inode *binode = BTRFS_I(inode); in btrfs_sync_inode_flags_to_i_flags() 240 struct btrfs_inode *binode = BTRFS_I(d_inode(dentry)); in btrfs_fileattr_get() 251 struct btrfs_inode *binode = BTRFS_I(inode); in btrfs_fileattr_set() 388 ret = btrfs_update_inode(trans, root, BTRFS_I(inode)); in btrfs_fileattr_set() 593 struct btrfs_root *root = BTRFS_I(dir)->root; in create_subvol() 732 BTRFS_I(new_inode_args.inode)->root = new_root; in create_subvol() 825 ret = btrfs_subvolume_reserve_metadata(BTRFS_I(dir)->root, in create_snapshot() 984 error = btrfs_check_dir_item_collision(BTRFS_I(dir)->root, in btrfs_mksubvol() 991 if (btrfs_root_refs(&BTRFS_I(dir)->root->root_item) == 0) in btrfs_mksubvol() 1006 btrfs_inode_unlock(BTRFS_I(dir), 0); in btrfs_mksubvol() [all …]
|
| D | verity.c | 584 struct btrfs_inode *inode = BTRFS_I(file_inode(filp)); in btrfs_begin_enable_verity() 633 struct btrfs_inode *inode = BTRFS_I(file_inode(filp)); in btrfs_end_enable_verity() 675 ret = read_key_bytes(BTRFS_I(inode), BTRFS_VERITY_DESC_ITEM_KEY, 0, in btrfs_get_verity_descriptor() 692 ret = read_key_bytes(BTRFS_I(inode), BTRFS_VERITY_DESC_ITEM_KEY, 1, in btrfs_get_verity_descriptor() 765 ret = read_key_bytes(BTRFS_I(inode), BTRFS_VERITY_MERKLE_ITEM_KEY, off, in btrfs_read_merkle_tree_page() 801 return write_key_bytes(BTRFS_I(inode), BTRFS_VERITY_MERKLE_ITEM_KEY, in btrfs_write_merkle_tree_block()
|
| D | relocation.c | 1018 struct btrfs_root *root = BTRFS_I(reloc_inode)->root; in get_new_location() 1028 bytenr -= BTRFS_I(reloc_inode)->index_cnt; in get_new_location() 1030 btrfs_ino(BTRFS_I(reloc_inode)), bytenr, 0); in get_new_location() 1121 } else if (inode && btrfs_ino(BTRFS_I(inode)) < key.objectid) { in replace_file_extents() 1122 btrfs_add_delayed_iput(BTRFS_I(inode)); in replace_file_extents() 1125 if (inode && btrfs_ino(BTRFS_I(inode)) == key.objectid) { in replace_file_extents() 1134 ret = try_lock_extent(&BTRFS_I(inode)->io_tree, in replace_file_extents() 1140 btrfs_drop_extent_map_range(BTRFS_I(inode), in replace_file_extents() 1142 unlock_extent(&BTRFS_I(inode)->io_tree, in replace_file_extents() 1186 btrfs_add_delayed_iput(BTRFS_I(inode)); in replace_file_extents() [all …]
|
| D | ordered-data.c | 210 struct btrfs_inode *inode = BTRFS_I(entry->inode); in insert_ordered_extent() 292 tree = &BTRFS_I(entry->inode)->ordered_tree; in btrfs_add_ordered_sum() 310 struct btrfs_inode *inode = BTRFS_I(ordered->inode); in can_finish_ordered_extent() 362 struct btrfs_inode *inode = BTRFS_I(ordered->inode); in btrfs_queue_ordered_fn() 375 struct btrfs_inode *inode = BTRFS_I(ordered->inode); in btrfs_finish_ordered_extent() 556 trace_btrfs_ordered_extent_put(BTRFS_I(entry->inode), entry); in btrfs_put_ordered_extent() 563 btrfs_add_delayed_iput(BTRFS_I(entry->inode)); in btrfs_put_ordered_extent() 782 struct btrfs_inode *inode = BTRFS_I(entry->inode); in btrfs_start_ordered_extent() 843 ordered = btrfs_lookup_first_ordered_extent(BTRFS_I(inode), end); in btrfs_wait_ordered_range() 1149 struct btrfs_inode *inode = BTRFS_I(ordered->inode); in btrfs_split_ordered_extent()
|
| D | free-space-cache.c | 149 if (!((BTRFS_I(inode)->flags & flags) == flags)) { in lookup_free_space_inode() 151 BTRFS_I(inode)->flags |= BTRFS_INODE_NODATASUM | in lookup_free_space_inode() 261 ret = btrfs_orphan_add(trans, BTRFS_I(inode)); in btrfs_remove_free_space_inode() 263 btrfs_add_delayed_iput(BTRFS_I(inode)); in btrfs_remove_free_space_inode() 277 btrfs_add_delayed_iput(BTRFS_I(inode)); in btrfs_remove_free_space_inode() 300 .inode = BTRFS_I(vfs_inode), in btrfs_truncate_free_space_cache() 302 .ino = btrfs_ino(BTRFS_I(vfs_inode)), in btrfs_truncate_free_space_cache() 306 struct btrfs_inode *inode = BTRFS_I(vfs_inode); in btrfs_truncate_free_space_cache() 476 btrfs_err(BTRFS_I(inode)->root->fs_info, in io_ctl_prepare_pages() 482 btrfs_err(BTRFS_I(inode)->root->fs_info, in io_ctl_prepare_pages() [all …]
|
| D | extent_io.c | 326 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; in find_lock_delalloc_range() 658 endio_readpage_release_extent(&processed, BTRFS_I(inode), in end_bio_extent_readpage() 792 struct btrfs_inode *inode = BTRFS_I(page->mapping->host); in submit_extent_page() 952 em = btrfs_get_extent(BTRFS_I(inode), page, pg_offset, start, len); in __get_extent_map() 983 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; in btrfs_do_readpage() 1122 struct btrfs_inode *inode = BTRFS_I(page->mapping->host); in btrfs_read_folio() 1145 struct btrfs_inode *inode = BTRFS_I(pages[0]->mapping->host); in contiguous_readpages() 1436 ret = writepage_delalloc(BTRFS_I(inode), page, bio_ctrl->wbc); in __extent_writepage() 1442 ret = __extent_writepage_io(BTRFS_I(inode), page, bio_ctrl, i_size, &nr); in __extent_writepage() 1455 btrfs_mark_ordered_io_finished(BTRFS_I(inode), page, page_start, in __extent_writepage() [all …]
|
| D | btrfs_inode.h | 269 static inline struct btrfs_inode *BTRFS_I(const struct inode *inode) in BTRFS_I() function 324 return btrfs_ino(BTRFS_I(inode)) != BTRFS_BTREE_INODE_OBJECTID; in is_data_inode()
|
| D | transaction.c | 1706 parent_root = BTRFS_I(parent_inode)->root; in create_pending_snapshot() 1715 ret = btrfs_set_inode_index(BTRFS_I(parent_inode), &index); in create_pending_snapshot() 1723 btrfs_ino(BTRFS_I(parent_inode)), in create_pending_snapshot() 1818 btrfs_ino(BTRFS_I(parent_inode)), index, in create_pending_snapshot() 1852 BTRFS_I(parent_inode), &key, BTRFS_FT_DIR, in create_pending_snapshot() 1861 btrfs_i_size_write(BTRFS_I(parent_inode), parent_inode->i_size + in create_pending_snapshot() 1864 ret = btrfs_update_inode_fallback(trans, parent_root, BTRFS_I(parent_inode)); in create_pending_snapshot()
|
| D | disk-io.c | 484 fs_info = BTRFS_I(mapping->host)->root->fs_info; in btree_writepages() 507 tree = &BTRFS_I(folio->mapping->host)->io_tree; in btree_invalidate_folio() 511 btrfs_warn(BTRFS_I(folio->mapping->host)->root->fs_info, in btree_invalidate_folio() 1901 RB_CLEAR_NODE(&BTRFS_I(inode)->rb_node); in btrfs_init_btree_inode() 1902 extent_io_tree_init(fs_info, &BTRFS_I(inode)->io_tree, in btrfs_init_btree_inode() 1904 extent_map_tree_init(&BTRFS_I(inode)->extent_tree); in btrfs_init_btree_inode() 1906 BTRFS_I(inode)->root = btrfs_grab_root(fs_info->tree_root); in btrfs_init_btree_inode() 1907 BTRFS_I(inode)->location.objectid = BTRFS_BTREE_INODE_OBJECTID; in btrfs_init_btree_inode() 1908 BTRFS_I(inode)->location.type = 0; in btrfs_init_btree_inode() 1909 BTRFS_I(inode)->location.offset = 0; in btrfs_init_btree_inode() [all …]
|
| D | super.c | 1332 BTRFS_I(d_inode(dentry))->root->root_key.objectid); in btrfs_show_options() 1334 BTRFS_I(d_inode(dentry))->root->root_key.objectid); in btrfs_show_options() 1402 u64 root_objectid = BTRFS_I(root_inode)->root->root_key.objectid; in mount_subvol() 2134 BTRFS_I(d_inode(dentry))->root->root_key.objectid >> 32; in btrfs_statfs() 2136 BTRFS_I(d_inode(dentry))->root->root_key.objectid; in btrfs_statfs()
|
| D | compression.c | 283 struct btrfs_inode *inode = BTRFS_I(ordered->inode); in btrfs_submit_compressed_write() 336 em_tree = &BTRFS_I(inode)->extent_tree; in add_ra_bio_pages() 337 tree = &BTRFS_I(inode)->io_tree; in add_ra_bio_pages()
|
| D | zoned.c | 1668 struct extent_map_tree *em_tree = &BTRFS_I(ordered->inode)->extent_tree; in btrfs_rewrite_logical_zoned() 1687 split_extent_map(BTRFS_I(ordered->inode), ordered->file_offset, in btrfs_zoned_split_ordered() 1701 struct btrfs_inode *inode = BTRFS_I(ordered->inode); in btrfs_finish_ordered_zoned()
|
| /Linux-v6.6/include/trace/events/ |
| D | btrfs.h | 222 __entry->ino = btrfs_ino(BTRFS_I(inode)); 224 __entry->disk_i_size = BTRFS_I(inode)->disk_i_size; 225 __entry->generation = BTRFS_I(inode)->generation; 226 __entry->last_trans = BTRFS_I(inode)->last_trans; 227 __entry->logged_trans = BTRFS_I(inode)->logged_trans; 229 BTRFS_I(inode)->root->root_key.objectid; 714 __entry->ino = btrfs_ino(BTRFS_I(inode)); 725 BTRFS_I(inode)->root->root_key.objectid; 796 __entry->ino = btrfs_ino(BTRFS_I(inode)); 797 __entry->parent = btrfs_ino(BTRFS_I(d_inode(dentry->d_parent))); [all …]
|