| /linux/fs/btrfs/tests/ |
| H A D | inode-tests.c | 284 BTRFS_I(inode)->root = root; in test_btrfs_get_extent() 285 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, sectorsize); in test_btrfs_get_extent() 296 btrfs_drop_extent_map_range(BTRFS_I(inode), 0, (u64)-1, false); in test_btrfs_get_extent() 305 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, (u64)-1); in test_btrfs_get_extent() 344 em = btrfs_get_extent(BTRFS_I(inode), NULL, offset, sectorsize); in test_btrfs_get_extent() 371 em = btrfs_get_extent(BTRFS_I(inode), NULL, offset, sectorsize); in test_btrfs_get_extent() 399 em = btrfs_get_extent(BTRFS_I(inode), NULL, offset, sectorsize); in test_btrfs_get_extent() 421 em = btrfs_get_extent(BTRFS_I(inode), NULL, offset, sectorsize); in test_btrfs_get_extent() 455 em = btrfs_get_extent(BTRFS_I(inode), NULL, offset, sectorsize); in test_btrfs_get_extent() 483 em = btrfs_get_extent(BTRFS_I(inode), NULL, offset, sectorsize); in test_btrfs_get_extent() [all …]
|
| H A D | extent-map-tests.c | 1162 BTRFS_I(inode)->root = root; in btrfs_test_extent_map() 1164 ret = test_case_1(fs_info, BTRFS_I(inode)); in btrfs_test_extent_map() 1167 ret = test_case_2(fs_info, BTRFS_I(inode)); in btrfs_test_extent_map() 1170 ret = test_case_3(fs_info, BTRFS_I(inode)); in btrfs_test_extent_map() 1173 ret = test_case_4(fs_info, BTRFS_I(inode)); in btrfs_test_extent_map() 1176 ret = test_case_5(fs_info, BTRFS_I(inode)); in btrfs_test_extent_map() 1179 ret = test_case_6(fs_info, BTRFS_I(inode)); in btrfs_test_extent_map() 1182 ret = test_case_7(fs_info, BTRFS_I(inode)); in btrfs_test_extent_map() 1185 ret = test_case_8(fs_info, BTRFS_I(inode)); in btrfs_test_extent_map()
|
| H A D | btrfs-tests.c | 66 btrfs_set_inode_number(BTRFS_I(inode), BTRFS_FIRST_FREE_OBJECTID); in btrfs_new_test_inode()
|
| H A D | extent-io-tests.c | 145 tmp = &BTRFS_I(inode)->io_tree; in test_find_delalloc() 146 BTRFS_I(inode)->root = root; in test_find_delalloc()
|
| /linux/fs/btrfs/ |
| H A D | xattr.c | 31 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_getxattr() 41 di = btrfs_lookup_xattr(NULL, root, path, btrfs_ino(BTRFS_I(inode)), in btrfs_getxattr() 75 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_setxattr() 92 btrfs_ino(BTRFS_I(inode)), name, name_len, -1); in btrfs_setxattr() 110 btrfs_assert_inode_locked(BTRFS_I(inode)); in btrfs_setxattr() 112 btrfs_ino(BTRFS_I(inode)), name, name_len, 0); in btrfs_setxattr() 123 ret = btrfs_insert_xattr_item(trans, root, path, btrfs_ino(BTRFS_I(inode)), in btrfs_setxattr() 205 &BTRFS_I(inode)->runtime_flags); in btrfs_setxattr() 206 clear_bit(BTRFS_INODE_NO_XATTRS, &BTRFS_I(inode)->runtime_flags); in btrfs_setxattr() 217 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_setxattr_trans() [all …]
|
| H A D | direct-io.c | 41 struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; in lock_extent_direct() 68 ordered = btrfs_lookup_ordered_range(BTRFS_I(inode), lockstart, in lock_extent_direct() 243 ((BTRFS_I(inode)->flags & BTRFS_INODE_NODATACOW) && in btrfs_get_blocks_direct_write() 252 if (can_nocow_extent(BTRFS_I(inode), start, &len, &file_extent, in btrfs_get_blocks_direct_write() 265 ret = btrfs_delalloc_reserve_metadata(BTRFS_I(inode), len, len, in btrfs_get_blocks_direct_write() 278 em2 = btrfs_create_dio_extent(BTRFS_I(inode), dio_data, start, in btrfs_get_blocks_direct_write() 316 ret = btrfs_delalloc_reserve_metadata(BTRFS_I(inode), len, len, in btrfs_get_blocks_direct_write() 322 em = btrfs_new_extent_direct(BTRFS_I(inode), dio_data, start, len); in btrfs_get_blocks_direct_write() 330 btrfs_delalloc_release_metadata(BTRFS_I(inode), in btrfs_get_blocks_direct_write() 338 btrfs_delalloc_release_extents(BTRFS_I(inode), prev_len); in btrfs_get_blocks_direct_write() [all …]
|
| H A D | reflink.c | 43 btrfs_inode_safe_disk_i_size_write(BTRFS_I(inode), 0); in clone_finish_inode_update() 46 ret = btrfs_update_inode(trans, BTRFS_I(inode)); in clone_finish_inode_update() 367 key.objectid = btrfs_ino(BTRFS_I(src)); in btrfs_clone() 383 ret = btrfs_search_slot(NULL, BTRFS_I(src)->root, &key, path, in btrfs_clone() 402 ret = btrfs_next_leaf(BTRFS_I(src)->root, path); in btrfs_clone() 414 key.objectid != btrfs_ino(BTRFS_I(src))) in btrfs_clone() 461 new_key.objectid = btrfs_ino(BTRFS_I(inode)); in btrfs_clone() 505 ret = btrfs_replace_file_extents(BTRFS_I(inode), path, in btrfs_clone() 529 ret = clone_copy_inline_extent(BTRFS_I(inode), path, &new_key, in btrfs_clone() 552 BTRFS_I(src)->last_reflink_trans = trans->transid; in btrfs_clone() [all …]
|
| H A D | inode.c | 3006 btrfs_root_id(BTRFS_I(inode)->root), in btrfs_writepage_cow_fixup() 3007 btrfs_ino(BTRFS_I(inode)), in btrfs_writepage_cow_fixup() 3038 fixup->inode = BTRFS_I(inode); in btrfs_writepage_cow_fixup() 4281 btrfs_set_inode_size(leaf, item, BTRFS_I(inode)->disk_i_size); in fill_inode_item() 4294 btrfs_set_timespec_sec(leaf, &item->otime, BTRFS_I(inode)->i_otime_sec); in fill_inode_item() 4295 btrfs_set_timespec_nsec(leaf, &item->otime, BTRFS_I(inode)->i_otime_nsec); in fill_inode_item() 4298 btrfs_set_inode_generation(leaf, item, BTRFS_I(inode)->generation); in fill_inode_item() 4302 flags = btrfs_inode_combine_flags(BTRFS_I(inode)->flags, in fill_inode_item() 4303 BTRFS_I(inode)->ro_flags); in fill_inode_item() 4548 trans = __unlink_start_trans(BTRFS_I(dir)); in btrfs_unlink() [all …]
|
| H A D | export.c | 26 if (btrfs_root_id(BTRFS_I(inode)->root) != in btrfs_encode_fh() 27 btrfs_root_id(BTRFS_I(parent)->root)) in btrfs_encode_fh() 40 fid->objectid = btrfs_ino(BTRFS_I(inode)); in btrfs_encode_fh() 41 fid->root_objectid = btrfs_root_id(BTRFS_I(inode)->root); in btrfs_encode_fh() 47 fid->parent_objectid = btrfs_ino(BTRFS_I(parent)); in btrfs_encode_fh() 49 parent_root_id = btrfs_root_id(BTRFS_I(parent)->root); in btrfs_encode_fh() 154 struct btrfs_inode *dir = BTRFS_I(d_inode(child)); in btrfs_get_parent() 233 struct btrfs_inode *inode = BTRFS_I(d_inode(child)); in btrfs_get_name() 234 struct btrfs_inode *dir = BTRFS_I(d_inode(parent)); in btrfs_get_name()
|
| H A D | file.c | 1061 !(BTRFS_I(inode)->flags & (BTRFS_INODE_NODATACOW | BTRFS_INODE_PREALLOC))) in btrfs_write_check() 1084 ret = btrfs_cont_expand(BTRFS_I(inode), oldsize, end_pos); in btrfs_write_check() 1364 ret = btrfs_inode_lock(BTRFS_I(inode), ilock_flags); in btrfs_buffered_write() 1385 ret = copy_one_range(BTRFS_I(inode), iter, &data_reserved, pos, nowait); in btrfs_buffered_write() 1399 btrfs_inode_unlock(BTRFS_I(inode), ilock_flags); in btrfs_buffered_write() 1411 btrfs_inode_lock(BTRFS_I(inode), 0); in btrfs_encoded_write() 1430 btrfs_inode_unlock(BTRFS_I(inode), 0); in btrfs_encoded_write() 1438 struct btrfs_inode *inode = BTRFS_I(file_inode(file)); in btrfs_do_write_iter() 1499 &BTRFS_I(inode)->runtime_flags)) in btrfs_release_file() 1560 struct btrfs_inode *inode = BTRFS_I(d_inode(dentry)); in btrfs_sync_file() [all …]
|
| H A D | verity.c | 571 struct btrfs_inode *inode = BTRFS_I(file_inode(filp)); in btrfs_begin_enable_verity() 623 struct btrfs_inode *inode = BTRFS_I(file_inode(filp)); in btrfs_end_enable_verity() 665 ret = read_key_bytes(BTRFS_I(inode), BTRFS_VERITY_DESC_ITEM_KEY, 0, in btrfs_get_verity_descriptor() 682 ret = read_key_bytes(BTRFS_I(inode), BTRFS_VERITY_DESC_ITEM_KEY, 1, in btrfs_get_verity_descriptor() 753 ret = read_key_bytes(BTRFS_I(inode), BTRFS_VERITY_MERKLE_ITEM_KEY, off, in btrfs_read_merkle_tree_page() 790 return write_key_bytes(BTRFS_I(inode), BTRFS_VERITY_MERKLE_ITEM_KEY, in btrfs_write_merkle_tree_block()
|
| H A D | ioctl.c | 250 const struct btrfs_inode *inode = BTRFS_I(d_inode(dentry)); in btrfs_fileattr_get() 259 struct btrfs_inode *inode = BTRFS_I(d_inode(dentry)); in btrfs_fileattr_set() 509 struct btrfs_root *root = BTRFS_I(dir)->root; in create_subvol() 651 BTRFS_I(new_inode_args.inode)->root = new_root; in create_subvol() 667 btrfs_record_new_subvolume(trans, BTRFS_I(dir)); in create_subvol() 758 ret = btrfs_subvolume_reserve_metadata(BTRFS_I(dir)->root, block_rsv, in create_snapshot() 767 pending_snapshot->dir = BTRFS_I(dir); in create_snapshot() 775 ret = btrfs_record_root_in_trans(trans, BTRFS_I(dir)->root); in create_snapshot() 853 ret = btrfs_check_dir_item_collision(BTRFS_I(dir)->root, dir->i_ino, &name_str); in btrfs_mksubvol() 859 if (btrfs_root_refs(&BTRFS_I(dir)->root->root_item) == 0) in btrfs_mksubvol() [all …]
|
| H A D | props.c | 263 struct btrfs_root *root = BTRFS_I(inode)->root; in inode_prop_iterator() 266 ret = handler->apply(BTRFS_I(inode), value, len); in inode_prop_iterator() 270 handler->xattr_name, btrfs_ino(BTRFS_I(inode)), in inode_prop_iterator() 273 set_bit(BTRFS_INODE_HAS_PROPS, &BTRFS_I(inode)->runtime_flags); in inode_prop_iterator()
|
| H A D | free-space-cache.c | 153 if (!((BTRFS_I(inode)->flags & flags) == flags)) { in lookup_free_space_inode() 155 BTRFS_I(inode)->flags |= BTRFS_INODE_NODATASUM | in lookup_free_space_inode() 161 block_group->inode = BTRFS_I(igrab(inode)); in lookup_free_space_inode() 263 ret = btrfs_orphan_add(trans, BTRFS_I(inode)); in btrfs_remove_free_space_inode() 265 btrfs_add_delayed_iput(BTRFS_I(inode)); in btrfs_remove_free_space_inode() 279 btrfs_add_delayed_iput(BTRFS_I(inode)); in btrfs_remove_free_space_inode() 299 .inode = BTRFS_I(vfs_inode), in btrfs_truncate_free_space_cache() 301 .ino = btrfs_ino(BTRFS_I(vfs_inode)), in btrfs_truncate_free_space_cache() 305 struct btrfs_inode *inode = BTRFS_I(vfs_inode); in btrfs_truncate_free_space_cache() 477 btrfs_err(BTRFS_I(inode)->root->fs_info, in io_ctl_prepare_pages() [all …]
|
| H A D | relocation.c | 816 struct btrfs_root *root = BTRFS_I(reloc_inode)->root; in get_new_location() 826 bytenr -= BTRFS_I(reloc_inode)->reloc_block_group_start; in get_new_location() 828 btrfs_ino(BTRFS_I(reloc_inode)), bytenr, 0); in get_new_location() 2666 struct btrfs_inode *inode = BTRFS_I(rc->data_inode); in prealloc_file_extent_cluster() 2729 struct btrfs_inode *inode = BTRFS_I(rc->data_inode); in setup_relocation_extent_mapping() 2786 u64 offset = BTRFS_I(inode)->reloc_block_group_start; in relocate_one_folio() 2866 ret = btrfs_delalloc_reserve_metadata(BTRFS_I(inode), in relocate_one_folio() 2873 btrfs_lock_extent(&BTRFS_I(inode)->io_tree, clamped_start, in relocate_one_folio() 2875 ret = btrfs_set_extent_delalloc(BTRFS_I(inode), clamped_start, in relocate_one_folio() 2878 btrfs_clear_extent_bit(&BTRFS_I(inode)->io_tree, in relocate_one_folio() [all …]
|
| H A D | extent_io.c | 374 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; in find_lock_delalloc_range() 1057 em = get_extent_map(BTRFS_I(inode), folio, cur, locked_end - cur + 1, em_cached); in btrfs_do_readpage() 1339 struct btrfs_inode *inode = BTRFS_I(vfs_inode); in btrfs_read_folio() 1837 struct btrfs_inode *inode = BTRFS_I(folio->mapping->host); in extent_writepage() 2253 BTRFS_I(fs_info->btree_inode), eb->start, in write_one_eb() 2510 &BTRFS_I(inode)->runtime_flags)) in extent_write_cache_pages() 2618 btrfs_add_delayed_iput(BTRFS_I(inode)); in extent_write_cache_pages() 2662 btrfs_mark_ordered_io_finished(BTRFS_I(inode), NULL, in extent_write_locked_range() 2681 ret = extent_writepage_io(BTRFS_I(inode), folio, cur, cur_len, in extent_write_locked_range() 2712 btrfs_zoned_data_reloc_lock(BTRFS_I(inode)); in btrfs_writepages() [all …]
|
| H A D | subpage.h | 111 ASSERT(is_data_inode(BTRFS_I(folio->mapping->host))); in btrfs_is_subpage()
|
| H A D | defrag.c | 737 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree; in defrag_lookup_extent() 738 struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; in defrag_lookup_extent() 740 const u32 sectorsize = BTRFS_I(inode)->root->fs_info->sectorsize; in defrag_lookup_extent() 771 em = defrag_get_extent(BTRFS_I(inode), start, newer_than); in defrag_lookup_extent()
|
| H A D | fs.h | 961 #define folio_to_inode(_folio) (BTRFS_I(_Generic((_folio), \ 966 #define inode_to_fs_info(_inode) (BTRFS_I(_Generic((_inode), \
|
| H A D | compression.c | 387 em_tree = &BTRFS_I(inode)->extent_tree; in add_ra_bio_pages() 388 tree = &BTRFS_I(inode)->io_tree; in add_ra_bio_pages() 979 struct btrfs_inode *inode = BTRFS_I(mapping->host); in btrfs_compress_filemap_get_folio()
|
| H A D | super.c | 1151 seq_printf(seq, ",subvolid=%llu", btrfs_root_id(BTRFS_I(d_inode(dentry))->root)); in btrfs_show_options() 1153 btrfs_root_id(BTRFS_I(d_inode(dentry))->root)); in btrfs_show_options() 1204 u64 root_objectid = btrfs_root_id(BTRFS_I(root_inode)->root); in mount_subvol() 1827 buf->f_fsid.val[0] ^= btrfs_root_id(BTRFS_I(d_inode(dentry))->root) >> 32; in btrfs_statfs() 1828 buf->f_fsid.val[1] ^= btrfs_root_id(BTRFS_I(d_inode(dentry))->root); in btrfs_statfs()
|
| H A D | btrfs_inode.h | 357 #define BTRFS_I(_inode) \ macro
|
| H A D | tree-log.c | 4619 u64 gen = BTRFS_I(inode)->generation; in fill_inode_item() 4634 ASSERT(data_race(BTRFS_I(inode)->logged_trans) > 0); in fill_inode_item() 4635 if (data_race(BTRFS_I(inode)->logged_trans) < trans->transid) in fill_inode_item() 4659 btrfs_set_timespec_sec(leaf, &item->otime, BTRFS_I(inode)->i_otime_sec); in fill_inode_item() 4660 btrfs_set_timespec_nsec(leaf, &item->otime, BTRFS_I(inode)->i_otime_nsec); in fill_inode_item() 4674 flags = btrfs_inode_combine_flags(BTRFS_I(inode)->flags, in fill_inode_item() 4675 BTRFS_I(inode)->ro_flags); in fill_inode_item() 7431 inode = BTRFS_I(d_inode(parent)); in log_new_ancestors_fast() 7673 ret = btrfs_log_inode_parent(trans, BTRFS_I(d_inode(dentry)), parent, in btrfs_log_dentry_safe() 7988 struct btrfs_inode *inode = BTRFS_I(d_inode(old_dentry)); in btrfs_log_new_name()
|
| H A D | disk-io.c | 1878 btrfs_set_inode_number(BTRFS_I(inode), BTRFS_BTREE_INODE_OBJECTID); in btrfs_init_btree_inode() 1889 btrfs_extent_io_tree_init(fs_info, &BTRFS_I(inode)->io_tree, in btrfs_init_btree_inode() 1891 btrfs_extent_map_tree_init(&BTRFS_I(inode)->extent_tree); in btrfs_init_btree_inode() 1893 BTRFS_I(inode)->root = btrfs_grab_root(fs_info->tree_root); in btrfs_init_btree_inode() 1894 set_bit(BTRFS_INODE_DUMMY, &BTRFS_I(inode)->runtime_flags); in btrfs_init_btree_inode() 4756 BTRFS_I(inode)->generation = 0; in btrfs_cleanup_bg_io()
|
| /linux/include/trace/events/ |
| H A D | btrfs.h | 221 __entry->ino = btrfs_ino(BTRFS_I(inode)); 223 __entry->disk_i_size = BTRFS_I(inode)->disk_i_size; 224 __entry->generation = BTRFS_I(inode)->generation; 225 __entry->last_trans = BTRFS_I(inode)->last_trans; 226 __entry->logged_trans = BTRFS_I(inode)->logged_trans; 227 __entry->root_objectid = BTRFS_I(inode)->root ? 228 btrfs_root_id(BTRFS_I(inode)->root) : 0; 697 __entry->ino = btrfs_ino(BTRFS_I(inode)); 706 __entry->root_objectid = btrfs_root_id(BTRFS_I(inode)->root); 779 __entry->ino = btrfs_ino(BTRFS_I(inode)); [all …]
|