/openbmc/linux/fs/btrfs/tests/ |
H A D | inode-tests.c | 260 BTRFS_I(inode)->root = root; in test_btrfs_get_extent() 261 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, 0, sectorsize); in test_btrfs_get_extent() 272 btrfs_drop_extent_map_range(BTRFS_I(inode), 0, (u64)-1, false); in test_btrfs_get_extent() 281 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, 0, (u64)-1); in test_btrfs_get_extent() 319 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize); in test_btrfs_get_extent() 342 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize); in test_btrfs_get_extent() 370 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize); in test_btrfs_get_extent() 399 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize); in test_btrfs_get_extent() 421 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize); in test_btrfs_get_extent() 455 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize); in test_btrfs_get_extent() [all …]
|
H A 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 …]
|
H A 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()
|
H A D | extent-io-tests.c | 146 tmp = &BTRFS_I(inode)->io_tree; in test_find_delalloc() 147 BTRFS_I(inode)->root = root; in test_find_delalloc()
|
/openbmc/linux/fs/btrfs/ |
H A 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 …]
|
H A 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 …]
|
H A 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 …]
|
H A D | inode.c | 2854 fixup->inode = BTRFS_I(inode); in btrfs_writepage_cow_fixup() 3004 return insert_reserved_file_extent(trans, BTRFS_I(oe->inode), in insert_ordered_extent_file_extent() 3016 struct btrfs_inode *inode = BTRFS_I(ordered_extent->inode); in btrfs_finish_one_ordered() 3607 ret = btrfs_drop_verity_items(BTRFS_I(inode)); in btrfs_orphan_cleanup() 3731 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_read_locked_inode() 3750 memcpy(&location, &BTRFS_I(inode)->location, sizeof(location)); in btrfs_read_locked_inode() 3770 btrfs_i_size_write(BTRFS_I(inode), btrfs_inode_size(leaf, inode_item)); in btrfs_read_locked_inode() 3771 btrfs_inode_set_file_extent_range(BTRFS_I(inode), 0, in btrfs_read_locked_inode() 3783 BTRFS_I(inode)->i_otime.tv_sec = in btrfs_read_locked_inode() 3785 BTRFS_I(inode)->i_otime.tv_nsec = in btrfs_read_locked_inode() [all …]
|
H A D | file.c | 1145 !(BTRFS_I(inode)->flags & (BTRFS_INODE_NODATACOW | BTRFS_INODE_PREALLOC))) in btrfs_write_check() 1165 ret = btrfs_cont_expand(BTRFS_I(inode), oldsize, end_pos); in btrfs_write_check() 1198 ret = btrfs_inode_lock(BTRFS_I(inode), ilock_flags); in btrfs_buffered_write() 1249 ret = btrfs_check_data_free_space(BTRFS_I(inode), in btrfs_buffered_write() 1265 can_nocow = btrfs_check_nocow_lock(BTRFS_I(inode), pos, in btrfs_buffered_write() 1281 ret = btrfs_delalloc_reserve_metadata(BTRFS_I(inode), in btrfs_buffered_write() 1286 btrfs_free_reserved_data_space(BTRFS_I(inode), in btrfs_buffered_write() 1290 btrfs_check_nocow_unlock(BTRFS_I(inode)); in btrfs_buffered_write() 1301 btrfs_delalloc_release_extents(BTRFS_I(inode), reserve_bytes); in btrfs_buffered_write() 1313 btrfs_delalloc_release_extents(BTRFS_I(inode), in btrfs_buffered_write() [all …]
|
H A 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() 227 struct btrfs_root *root = BTRFS_I(dir)->root; in btrfs_get_name() 240 ino = btrfs_ino(BTRFS_I(inode)); in btrfs_get_name() 247 key.objectid = BTRFS_I(inode)->root->root_key.objectid; in btrfs_get_name() [all …]
|
H A 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 …]
|
H A D | tree-log.c | 696 btrfs_ino(BTRFS_I(inode)), start, 0); in replay_one_extent() 730 ret = btrfs_drop_extents(trans, root, BTRFS_I(inode), &drop_args); in replay_one_extent() 905 ret = btrfs_inode_set_file_extent_range(BTRFS_I(inode), start, in replay_one_extent() 911 btrfs_update_inode_bytes(BTRFS_I(inode), nbytes, drop_args.bytes_found); in replay_one_extent() 912 ret = btrfs_update_inode(trans, root, BTRFS_I(inode)); in replay_one_extent() 976 ret = unlink_inode_for_log_replay(trans, dir, BTRFS_I(inode), &name); in drop_one_dir_item() 1192 BTRFS_I(victim_parent), in __add_inode_ref() 1338 ret = unlink_inode_for_log_replay(trans, BTRFS_I(dir), in unlink_old_inode_refs() 1439 ret = inode_in_dir(root, path, btrfs_ino(BTRFS_I(dir)), in add_inode_ref() 1440 btrfs_ino(BTRFS_I(inode)), ref_index, &name); in add_inode_ref() [all …]
|
H A D | delayed-inode.c | 1681 delayed_node = btrfs_get_delayed_node(BTRFS_I(inode)); in btrfs_readdir_get_delayed_items() 1689 btrfs_inode_unlock(BTRFS_I(inode), BTRFS_ILOCK_SHARED); in btrfs_readdir_get_delayed_items() 1690 btrfs_inode_lock(BTRFS_I(inode), 0); in btrfs_readdir_get_delayed_items() 1822 btrfs_set_stack_inode_size(inode_item, BTRFS_I(inode)->disk_i_size); in fill_stack_inode_item() 1827 BTRFS_I(inode)->generation); in fill_stack_inode_item() 1832 flags = btrfs_inode_combine_flags(BTRFS_I(inode)->flags, in fill_stack_inode_item() 1833 BTRFS_I(inode)->ro_flags); in fill_stack_inode_item() 1853 BTRFS_I(inode)->i_otime.tv_sec); in fill_stack_inode_item() 1855 BTRFS_I(inode)->i_otime.tv_nsec); in fill_stack_inode_item() 1860 struct btrfs_fs_info *fs_info = BTRFS_I(inode)->root->fs_info; in btrfs_fill_inode() [all …]
|
H A 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() 591 struct btrfs_root *root = BTRFS_I(dir)->root; in create_subvol() 649 ret = btrfs_record_root_in_trans(trans, BTRFS_I(dir)->root); in create_subvol() 740 BTRFS_I(new_inode_args.inode)->root = new_root; in create_subvol() 840 ret = btrfs_subvolume_reserve_metadata(BTRFS_I(dir)->root, block_rsv, in create_snapshot() 857 ret = btrfs_record_root_in_trans(trans, BTRFS_I(dir)->root); in create_snapshot() 1008 error = btrfs_check_dir_item_collision(BTRFS_I(dir)->root, in btrfs_mksubvol() [all …]
|
H A 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()
|
H A D | relocation.c | 950 struct btrfs_root *root = BTRFS_I(reloc_inode)->root; in get_new_location() 960 bytenr -= BTRFS_I(reloc_inode)->index_cnt; in get_new_location() 962 btrfs_ino(BTRFS_I(reloc_inode)), bytenr, 0); in get_new_location() 1053 } else if (inode && btrfs_ino(BTRFS_I(inode)) < key.objectid) { in replace_file_extents() 1054 btrfs_add_delayed_iput(BTRFS_I(inode)); in replace_file_extents() 1057 if (inode && btrfs_ino(BTRFS_I(inode)) == key.objectid) { in replace_file_extents() 1066 ret = try_lock_extent(&BTRFS_I(inode)->io_tree, in replace_file_extents() 1072 btrfs_drop_extent_map_range(BTRFS_I(inode), in replace_file_extents() 1074 unlock_extent(&BTRFS_I(inode)->io_tree, in replace_file_extents() 1118 btrfs_add_delayed_iput(BTRFS_I(inode)); in replace_file_extents() [all …]
|
H A D | ordered-data.c | 211 struct btrfs_inode *inode = BTRFS_I(entry->inode); in insert_ordered_extent() 293 tree = &BTRFS_I(entry->inode)->ordered_tree; in btrfs_add_ordered_sum() 311 struct btrfs_inode *inode = BTRFS_I(ordered->inode); in can_finish_ordered_extent() 363 struct btrfs_inode *inode = BTRFS_I(ordered->inode); in btrfs_queue_ordered_fn() 376 struct btrfs_inode *inode = BTRFS_I(ordered->inode); in btrfs_finish_ordered_extent() 557 trace_btrfs_ordered_extent_put(BTRFS_I(entry->inode), entry); in btrfs_put_ordered_extent() 564 btrfs_add_delayed_iput(BTRFS_I(entry->inode)); in btrfs_put_ordered_extent() 785 struct btrfs_inode *inode = BTRFS_I(entry->inode); in btrfs_start_ordered_extent() 846 ordered = btrfs_lookup_first_ordered_extent(BTRFS_I(inode), end); in btrfs_wait_ordered_range() 1152 struct btrfs_inode *inode = BTRFS_I(ordered->inode); in btrfs_split_ordered_extent()
|
H A 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 …]
|
H A 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() 787 struct btrfs_inode *inode = BTRFS_I(page->mapping->host); in submit_extent_page() 947 em = btrfs_get_extent(BTRFS_I(inode), page, pg_offset, start, len); in __get_extent_map() 978 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; in btrfs_do_readpage() 1117 struct btrfs_inode *inode = BTRFS_I(page->mapping->host); in btrfs_read_folio() 1140 struct btrfs_inode *inode = BTRFS_I(pages[0]->mapping->host); in contiguous_readpages() 1431 ret = writepage_delalloc(BTRFS_I(inode), page, bio_ctrl->wbc); in __extent_writepage() 1437 ret = __extent_writepage_io(BTRFS_I(inode), page, bio_ctrl, i_size, &nr); in __extent_writepage() 1450 btrfs_mark_ordered_io_finished(BTRFS_I(inode), page, page_start, in __extent_writepage() [all …]
|
H A D | btrfs_inode.h | 274 static inline struct btrfs_inode *BTRFS_I(const struct inode *inode) in BTRFS_I() function 329 return btrfs_ino(BTRFS_I(inode)) != BTRFS_BTREE_INODE_OBJECTID; in is_data_inode()
|
H A D | transaction.c | 1705 parent_root = BTRFS_I(parent_inode)->root; in create_pending_snapshot() 1714 ret = btrfs_set_inode_index(BTRFS_I(parent_inode), &index); in create_pending_snapshot() 1722 btrfs_ino(BTRFS_I(parent_inode)), in create_pending_snapshot() 1817 btrfs_ino(BTRFS_I(parent_inode)), index, in create_pending_snapshot() 1851 BTRFS_I(parent_inode), &key, BTRFS_FT_DIR, in create_pending_snapshot() 1860 btrfs_i_size_write(BTRFS_I(parent_inode), parent_inode->i_size + in create_pending_snapshot() 1863 ret = btrfs_update_inode_fallback(trans, parent_root, BTRFS_I(parent_inode)); in create_pending_snapshot()
|
H A 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() 1910 RB_CLEAR_NODE(&BTRFS_I(inode)->rb_node); in btrfs_init_btree_inode() 1911 extent_io_tree_init(fs_info, &BTRFS_I(inode)->io_tree, in btrfs_init_btree_inode() 1913 extent_map_tree_init(&BTRFS_I(inode)->extent_tree); in btrfs_init_btree_inode() 1915 BTRFS_I(inode)->root = btrfs_grab_root(fs_info->tree_root); in btrfs_init_btree_inode() 1916 BTRFS_I(inode)->location.objectid = BTRFS_BTREE_INODE_OBJECTID; in btrfs_init_btree_inode() 1917 BTRFS_I(inode)->location.type = 0; in btrfs_init_btree_inode() 1918 BTRFS_I(inode)->location.offset = 0; in btrfs_init_btree_inode() [all …]
|
H A D | super.c | 1335 BTRFS_I(d_inode(dentry))->root->root_key.objectid); in btrfs_show_options() 1337 BTRFS_I(d_inode(dentry))->root->root_key.objectid); in btrfs_show_options() 1405 u64 root_objectid = BTRFS_I(root_inode)->root->root_key.objectid; in mount_subvol() 2137 BTRFS_I(d_inode(dentry))->root->root_key.objectid >> 32; in btrfs_statfs() 2139 BTRFS_I(d_inode(dentry))->root->root_key.objectid; in btrfs_statfs()
|
H A 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()
|
/openbmc/linux/include/trace/events/ |
H A 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 …]
|