/linux-6.1.9/fs/btrfs/ |
D | props.c | 134 set_bit(BTRFS_INODE_HAS_PROPS, &BTRFS_I(inode)->runtime_flags); in btrfs_set_prop() 256 struct btrfs_root *root = BTRFS_I(inode)->root; in inode_prop_iterator() 263 handler->xattr_name, btrfs_ino(BTRFS_I(inode)), in inode_prop_iterator() 266 set_bit(BTRFS_INODE_HAS_PROPS, &BTRFS_I(inode)->runtime_flags); in inode_prop_iterator() 271 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_load_inode_props() 272 u64 ino = btrfs_ino(BTRFS_I(inode)); in btrfs_load_inode_props() 304 BTRFS_I(inode)->flags &= ~BTRFS_INODE_COMPRESS; in prop_compression_apply() 305 BTRFS_I(inode)->flags &= ~BTRFS_INODE_NOCOMPRESS; in prop_compression_apply() 306 BTRFS_I(inode)->prop_compress = BTRFS_COMPRESS_NONE; in prop_compression_apply() 313 BTRFS_I(inode)->flags |= BTRFS_INODE_NOCOMPRESS; in prop_compression_apply() [all …]
|
D | reflink.c | 22 struct btrfs_root *root = BTRFS_I(inode)->root; in clone_finish_inode_update() 38 btrfs_inode_safe_disk_i_size_write(BTRFS_I(inode), 0); in clone_finish_inode_update() 41 ret = btrfs_update_inode(trans, root, BTRFS_I(inode)); in clone_finish_inode_update() 174 struct btrfs_root *root = BTRFS_I(dst)->root; in clone_copy_inline_extent() 183 ret = copy_inline_to_page(BTRFS_I(dst), new_key->offset, in clone_copy_inline_extent() 188 key.objectid = btrfs_ino(BTRFS_I(dst)); in clone_copy_inline_extent() 203 if (key.objectid == btrfs_ino(BTRFS_I(dst)) && in clone_copy_inline_extent() 268 ret = btrfs_drop_extents(trans, root, BTRFS_I(dst), &drop_args); in clone_copy_inline_extent() 279 btrfs_update_inode_bytes(BTRFS_I(dst), datal, drop_args.bytes_found); in clone_copy_inline_extent() 280 btrfs_set_inode_full_sync(BTRFS_I(dst)); in clone_copy_inline_extent() [all …]
|
D | inode.c | 158 down_write(&BTRFS_I(inode)->i_mmap_lock); in btrfs_inode_lock() 171 up_write(&BTRFS_I(inode)->i_mmap_lock); in btrfs_inode_unlock() 632 inode_should_defrag(BTRFS_I(inode), start, end, end - start + 1, in compress_file_range() 674 (start > 0 || end + 1 < BTRFS_I(inode)->disk_i_size)) in compress_file_range() 698 if (inode_need_compress(BTRFS_I(inode), start, end)) { in compress_file_range() 707 if (BTRFS_I(inode)->defrag_compress) in compress_file_range() 708 compress_type = BTRFS_I(inode)->defrag_compress; in compress_file_range() 709 else if (BTRFS_I(inode)->prop_compress) in compress_file_range() 710 compress_type = BTRFS_I(inode)->prop_compress; in compress_file_range() 761 ret = cow_file_range_inline(BTRFS_I(inode), actual_end, in compress_file_range() [all …]
|
D | xattr.c | 27 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_getxattr() 38 di = btrfs_lookup_xattr(NULL, root, path, btrfs_ino(BTRFS_I(inode)), in btrfs_getxattr() 83 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_setxattr() 101 btrfs_ino(BTRFS_I(inode)), name, name_len, -1); in btrfs_setxattr() 121 btrfs_ino(BTRFS_I(inode)), name, name_len, 0); in btrfs_setxattr() 132 ret = btrfs_insert_xattr_item(trans, root, path, btrfs_ino(BTRFS_I(inode)), in btrfs_setxattr() 216 &BTRFS_I(inode)->runtime_flags); in btrfs_setxattr() 217 clear_bit(BTRFS_INODE_NO_XATTRS, &BTRFS_I(inode)->runtime_flags); in btrfs_setxattr() 228 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_setxattr_trans() 264 ret = btrfs_update_inode(trans, root, BTRFS_I(inode)); in btrfs_setxattr_trans() [all …]
|
D | export.c | 35 fid->objectid = btrfs_ino(BTRFS_I(inode)); in btrfs_encode_fh() 36 fid->root_objectid = BTRFS_I(inode)->root->root_key.objectid; in btrfs_encode_fh() 42 fid->parent_objectid = BTRFS_I(parent)->location.objectid; in btrfs_encode_fh() 44 parent_root_id = BTRFS_I(parent)->root->root_key.objectid; in btrfs_encode_fh() 138 struct btrfs_root *root = BTRFS_I(dir)->root; in btrfs_get_parent() 150 if (btrfs_ino(BTRFS_I(dir)) == BTRFS_FIRST_FREE_OBJECTID) { in btrfs_get_parent() 156 key.objectid = btrfs_ino(BTRFS_I(dir)); in btrfs_get_parent() 207 struct btrfs_root *root = BTRFS_I(dir)->root; in btrfs_get_name() 220 ino = btrfs_ino(BTRFS_I(inode)); in btrfs_get_name() 227 key.objectid = BTRFS_I(inode)->root->root_key.objectid; in btrfs_get_name() [all …]
|
D | file.c | 286 clear_bit(BTRFS_INODE_IN_DEFRAG, &BTRFS_I(inode)->runtime_flags); in __btrfs_run_defrag_inode() 1457 !(BTRFS_I(inode)->flags & (BTRFS_INODE_NODATACOW | BTRFS_INODE_PREALLOC))) in btrfs_write_check() 1479 ret = btrfs_cont_expand(BTRFS_I(inode), oldsize, end_pos); in btrfs_write_check() 1565 ret = btrfs_check_data_free_space(BTRFS_I(inode), in btrfs_buffered_write() 1581 can_nocow = btrfs_check_nocow_lock(BTRFS_I(inode), pos, in btrfs_buffered_write() 1597 ret = btrfs_delalloc_reserve_metadata(BTRFS_I(inode), in btrfs_buffered_write() 1602 btrfs_free_reserved_data_space(BTRFS_I(inode), in btrfs_buffered_write() 1606 btrfs_check_nocow_unlock(BTRFS_I(inode)); in btrfs_buffered_write() 1617 btrfs_delalloc_release_extents(BTRFS_I(inode), reserve_bytes); in btrfs_buffered_write() 1629 btrfs_delalloc_release_extents(BTRFS_I(inode), in btrfs_buffered_write() [all …]
|
D | delayed-inode.c | 1636 delayed_node = btrfs_get_delayed_node(BTRFS_I(inode)); in btrfs_readdir_get_delayed_items() 1780 btrfs_set_stack_inode_size(inode_item, BTRFS_I(inode)->disk_i_size); in fill_stack_inode_item() 1785 BTRFS_I(inode)->generation); in fill_stack_inode_item() 1790 flags = btrfs_inode_combine_flags(BTRFS_I(inode)->flags, in fill_stack_inode_item() 1791 BTRFS_I(inode)->ro_flags); in fill_stack_inode_item() 1811 BTRFS_I(inode)->i_otime.tv_sec); in fill_stack_inode_item() 1813 BTRFS_I(inode)->i_otime.tv_nsec); in fill_stack_inode_item() 1818 struct btrfs_fs_info *fs_info = BTRFS_I(inode)->root->fs_info; in btrfs_fill_inode() 1822 delayed_node = btrfs_get_delayed_node(BTRFS_I(inode)); in btrfs_fill_inode() 1837 btrfs_i_size_write(BTRFS_I(inode), btrfs_stack_inode_size(inode_item)); in btrfs_fill_inode() [all …]
|
D | verity.c | 578 struct btrfs_inode *inode = BTRFS_I(file_inode(filp)); in btrfs_begin_enable_verity() 627 struct btrfs_inode *inode = BTRFS_I(file_inode(filp)); in btrfs_end_enable_verity() 669 ret = read_key_bytes(BTRFS_I(inode), BTRFS_VERITY_DESC_ITEM_KEY, 0, in btrfs_get_verity_descriptor() 686 ret = read_key_bytes(BTRFS_I(inode), BTRFS_VERITY_DESC_ITEM_KEY, 1, in btrfs_get_verity_descriptor() 752 ret = read_key_bytes(BTRFS_I(inode), BTRFS_VERITY_MERKLE_ITEM_KEY, off, in btrfs_read_merkle_tree_page() 802 return write_key_bytes(BTRFS_I(inode), BTRFS_VERITY_MERKLE_ITEM_KEY, in btrfs_write_merkle_tree_block()
|
D | ioctl.c | 164 struct btrfs_inode *binode = BTRFS_I(inode); in btrfs_sync_inode_flags_to_i_flags() 229 struct btrfs_inode *binode = BTRFS_I(d_inode(dentry)); in btrfs_fileattr_get() 240 struct btrfs_inode *binode = BTRFS_I(inode); in btrfs_fileattr_set() 377 ret = btrfs_update_inode(trans, root, BTRFS_I(inode)); in btrfs_fileattr_set() 580 struct btrfs_root *root = BTRFS_I(dir)->root; in create_subvol() 717 BTRFS_I(new_inode_args.inode)->root = new_root; in create_subvol() 813 ret = btrfs_subvolume_reserve_metadata(BTRFS_I(dir)->root, in create_snapshot() 971 error = btrfs_check_dir_item_collision(BTRFS_I(dir)->root, in btrfs_mksubvol() 979 if (btrfs_root_refs(&BTRFS_I(dir)->root->root_item) == 0) in btrfs_mksubvol() 1188 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree; in defrag_lookup_extent() [all …]
|
D | tree-log.c | 678 btrfs_ino(BTRFS_I(inode)), start, 0); in replay_one_extent() 712 ret = btrfs_drop_extents(trans, root, BTRFS_I(inode), &drop_args); in replay_one_extent() 888 ret = btrfs_inode_set_file_extent_range(BTRFS_I(inode), start, in replay_one_extent() 894 btrfs_update_inode_bytes(BTRFS_I(inode), nbytes, drop_args.bytes_found); in replay_one_extent() 895 ret = btrfs_update_inode(trans, root, BTRFS_I(inode)); in replay_one_extent() 963 ret = unlink_inode_for_log_replay(trans, dir, BTRFS_I(inode), name, in drop_one_dir_item() 1188 BTRFS_I(victim_parent), in __add_inode_ref() 1344 ret = unlink_inode_for_log_replay(trans, BTRFS_I(dir), in unlink_old_inode_refs() 1447 ret = inode_in_dir(root, path, btrfs_ino(BTRFS_I(dir)), in add_inode_ref() 1448 btrfs_ino(BTRFS_I(inode)), ref_index, in add_inode_ref() [all …]
|
D | relocation.c | 1008 struct btrfs_root *root = BTRFS_I(reloc_inode)->root; in get_new_location() 1018 bytenr -= BTRFS_I(reloc_inode)->index_cnt; in get_new_location() 1020 btrfs_ino(BTRFS_I(reloc_inode)), bytenr, 0); in get_new_location() 1111 } else if (inode && btrfs_ino(BTRFS_I(inode)) < key.objectid) { in replace_file_extents() 1115 if (inode && btrfs_ino(BTRFS_I(inode)) == key.objectid) { in replace_file_extents() 1122 ret = try_lock_extent(&BTRFS_I(inode)->io_tree, in replace_file_extents() 1127 btrfs_drop_extent_map_range(BTRFS_I(inode), in replace_file_extents() 1129 unlock_extent(&BTRFS_I(inode)->io_tree, in replace_file_extents() 1528 ino = btrfs_ino(BTRFS_I(inode)); in invalidate_extent_cache() 1569 lock_extent(&BTRFS_I(inode)->io_tree, start, end, NULL); in invalidate_extent_cache() [all …]
|
D | ordered-data.c | 269 tree = &BTRFS_I(entry->inode)->ordered_tree; in btrfs_add_ordered_sum() 497 trace_btrfs_ordered_extent_put(BTRFS_I(entry->inode), entry); in btrfs_put_ordered_extent() 726 struct btrfs_inode *inode = BTRFS_I(entry->inode); in btrfs_start_ordered_extent() 789 ordered = btrfs_lookup_first_ordered_extent(BTRFS_I(inode), end); in btrfs_wait_ordered_range() 1094 struct btrfs_fs_info *fs_info = BTRFS_I(inode)->root->fs_info; in clone_ordered_extent() 1106 return btrfs_add_ordered_extent(BTRFS_I(inode), file_offset, len, len, in clone_ordered_extent() 1115 struct btrfs_ordered_inode_tree *tree = &BTRFS_I(inode)->ordered_tree; in btrfs_split_ordered_extent() 1120 trace_btrfs_ordered_extent_split(BTRFS_I(inode), ordered); in btrfs_split_ordered_extent()
|
D | btrfs_inode.h | 256 static inline struct btrfs_inode *BTRFS_I(const struct inode *inode) in BTRFS_I() function 311 return btrfs_ino(BTRFS_I(inode)) != BTRFS_BTREE_INODE_OBJECTID; in is_data_inode()
|
D | free-space-cache.c | 140 if (!((BTRFS_I(inode)->flags & flags) == flags)) { in lookup_free_space_inode() 142 BTRFS_I(inode)->flags |= BTRFS_INODE_NODATASUM | in lookup_free_space_inode() 252 ret = btrfs_orphan_add(trans, BTRFS_I(inode)); in btrfs_remove_free_space_inode() 310 .inode = BTRFS_I(vfs_inode), in btrfs_truncate_free_space_cache() 312 .ino = btrfs_ino(BTRFS_I(vfs_inode)), in btrfs_truncate_free_space_cache() 316 struct btrfs_inode *inode = BTRFS_I(vfs_inode); in btrfs_truncate_free_space_cache() 486 btrfs_err(BTRFS_I(inode)->root->fs_info, in io_ctl_prepare_pages() 492 btrfs_err(BTRFS_I(inode)->root->fs_info, in io_ctl_prepare_pages() 786 if (!BTRFS_I(inode)->generation) { in __load_free_space_cache() 793 if (BTRFS_I(inode)->generation != generation) { in __load_free_space_cache() [all …]
|
D | transaction.c | 1052 atomic_inc(&BTRFS_I(fs_info->btree_inode)->sync_writers); in btrfs_write_marked_extents() 1088 atomic_dec(&BTRFS_I(fs_info->btree_inode)->sync_writers); in btrfs_write_marked_extents() 1662 parent_root = BTRFS_I(parent_inode)->root; in create_pending_snapshot() 1671 ret = btrfs_set_inode_index(BTRFS_I(parent_inode), &index); in create_pending_snapshot() 1676 btrfs_ino(BTRFS_I(parent_inode)), in create_pending_snapshot() 1772 btrfs_ino(BTRFS_I(parent_inode)), index, in create_pending_snapshot() 1806 dentry->d_name.len, BTRFS_I(parent_inode), in create_pending_snapshot() 1815 btrfs_i_size_write(BTRFS_I(parent_inode), parent_inode->i_size + in create_pending_snapshot() 1819 ret = btrfs_update_inode_fallback(trans, parent_root, BTRFS_I(parent_inode)); in create_pending_snapshot()
|
D | extent_io.c | 396 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; in find_lock_delalloc_range() 749 failrec = get_failrec(BTRFS_I(inode), start); in btrfs_get_io_failure_record() 794 ret = insert_failrec(BTRFS_I(inode), failrec); in btrfs_get_io_failure_record() 838 free_io_failure(BTRFS_I(inode), failrec); in btrfs_repair_one_sector() 902 struct btrfs_inode *inode = BTRFS_I(page->mapping->host); in end_sector_io() 987 inode = BTRFS_I(page->mapping->host); in end_extent_writepage() 1245 btrfs_clean_io_failure(BTRFS_I(inode), start, page, 0); in end_bio_extent_readpage() 1294 endio_readpage_release_extent(&processed, BTRFS_I(inode), in end_bio_extent_readpage() 1575 struct btrfs_inode *inode = BTRFS_I(page->mapping->host); in submit_extent_page() 1725 em = btrfs_get_extent(BTRFS_I(inode), page, pg_offset, start, len); in __get_extent_map() [all …]
|
D | disk-io.c | 269 io_tree = &BTRFS_I(fs_info->btree_inode)->io_tree; in btrfs_read_extent_buffer() 693 struct btrfs_fs_info *fs_info = BTRFS_I(inode)->root->fs_info; in btrfs_wq_submit_bio() 728 root = BTRFS_I(bvec->bv_page->mapping->host)->root; in btree_csum_one_bio() 776 if (should_async_write(fs_info, BTRFS_I(inode)) && in btrfs_submit_metadata_bio() 823 fs_info = BTRFS_I(mapping->host)->root->fs_info; in btree_writepages() 846 tree = &BTRFS_I(folio->mapping->host)->io_tree; in btree_invalidate_folio() 850 btrfs_warn(BTRFS_I(folio->mapping->host)->root->fs_info, in btree_invalidate_folio() 2239 RB_CLEAR_NODE(&BTRFS_I(inode)->rb_node); in btrfs_init_btree_inode() 2240 extent_io_tree_init(fs_info, &BTRFS_I(inode)->io_tree, in btrfs_init_btree_inode() 2242 extent_map_tree_init(&BTRFS_I(inode)->extent_tree); in btrfs_init_btree_inode() [all …]
|
D | compression.c | 174 struct btrfs_inode *bi = BTRFS_I(inode); in end_compressed_bio_read() 261 btrfs_writepage_endio_finish_ordered(BTRFS_I(inode), NULL, in finish_compressed_bio_write() 529 em_tree = &BTRFS_I(inode)->extent_tree; in add_ra_bio_pages() 530 tree = &BTRFS_I(inode)->io_tree; in add_ra_bio_pages() 681 em_tree = &BTRFS_I(inode)->extent_tree; in btrfs_submit_compressed_read()
|
D | file-item.c | 378 struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; in btrfs_lookup_bio_sums() 391 if ((BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM) || in btrfs_lookup_bio_sums() 442 if (btrfs_is_free_space_inode(BTRFS_I(inode))) { in btrfs_lookup_bio_sums() 490 if (BTRFS_I(inode)->root->root_key.objectid == in btrfs_lookup_bio_sums()
|
D | super.c | 1631 BTRFS_I(d_inode(dentry))->root->root_key.objectid); in btrfs_show_options() 1633 BTRFS_I(d_inode(dentry))->root->root_key.objectid); in btrfs_show_options() 1701 u64 root_objectid = BTRFS_I(root_inode)->root->root_key.objectid; in mount_subvol() 2431 BTRFS_I(d_inode(dentry))->root->root_key.objectid >> 32; in btrfs_statfs() 2433 BTRFS_I(d_inode(dentry))->root->root_key.objectid; in btrfs_statfs()
|
D | extent-io-tree.c | 68 btrfs_debug_rl(BTRFS_I(inode)->root->fs_info, in __btrfs_debug_check_extent_io_range() 70 caller, btrfs_ino(BTRFS_I(inode)), isize, start, end); in __btrfs_debug_check_extent_io_range()
|
/linux-6.1.9/fs/btrfs/tests/ |
D | inode-tests.c | 258 BTRFS_I(inode)->root = root; in test_btrfs_get_extent() 259 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, 0, sectorsize); in test_btrfs_get_extent() 270 btrfs_drop_extent_map_range(BTRFS_I(inode), 0, (u64)-1, false); in test_btrfs_get_extent() 279 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, 0, (u64)-1); in test_btrfs_get_extent() 301 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize); in test_btrfs_get_extent() 329 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize); in test_btrfs_get_extent() 352 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize); in test_btrfs_get_extent() 380 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize); in test_btrfs_get_extent() 409 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize); in test_btrfs_get_extent() 431 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize); in test_btrfs_get_extent() [all …]
|
D | btrfs-tests.c | 63 BTRFS_I(inode)->location.type = BTRFS_INODE_ITEM_KEY; in btrfs_new_test_inode() 64 BTRFS_I(inode)->location.objectid = BTRFS_FIRST_FREE_OBJECTID; in btrfs_new_test_inode() 65 BTRFS_I(inode)->location.offset = 0; in btrfs_new_test_inode()
|
D | extent-io-tests.c | 129 tmp = &BTRFS_I(inode)->io_tree; in test_find_delalloc()
|
/linux-6.1.9/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; 685 __entry->ino = btrfs_ino(BTRFS_I(inode)); 696 BTRFS_I(inode)->root->root_key.objectid; 767 __entry->ino = btrfs_ino(BTRFS_I(inode)); 768 __entry->parent = btrfs_ino(BTRFS_I(d_inode(dentry->d_parent))); [all …]
|