| /linux/fs/btrfs/ |
| H A D | direct-io.c | 42 struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; in lock_extent_direct() 69 ordered = btrfs_lookup_ordered_range(BTRFS_I(inode), lockstart, in lock_extent_direct() 244 ((BTRFS_I(inode)->flags & BTRFS_INODE_NODATACOW) && in btrfs_get_blocks_direct_write() 253 if (can_nocow_extent(BTRFS_I(inode), start, &len, &file_extent, in btrfs_get_blocks_direct_write() 266 ret = btrfs_delalloc_reserve_metadata(BTRFS_I(inode), len, len, in btrfs_get_blocks_direct_write() 279 em2 = btrfs_create_dio_extent(BTRFS_I(inode), dio_data, start, in btrfs_get_blocks_direct_write() 324 ret = btrfs_delalloc_reserve_metadata(BTRFS_I(inode), len, len, in btrfs_get_blocks_direct_write() 330 em = btrfs_new_extent_direct(BTRFS_I(inode), dio_data, start, len); in btrfs_get_blocks_direct_write() 338 btrfs_delalloc_release_metadata(BTRFS_I(inode), in btrfs_get_blocks_direct_write() 346 btrfs_delalloc_release_extents(BTRFS_I(inode), prev_len); in btrfs_get_blocks_direct_write() [all …]
|
| H A D | inode.c | 4289 btrfs_set_inode_size(leaf, item, BTRFS_I(inode)->disk_i_size); in fill_inode_item() 4302 btrfs_set_timespec_sec(leaf, &item->otime, BTRFS_I(inode)->i_otime_sec); in fill_inode_item() 4303 btrfs_set_timespec_nsec(leaf, &item->otime, BTRFS_I(inode)->i_otime_nsec); in fill_inode_item() 4306 btrfs_set_inode_generation(leaf, item, BTRFS_I(inode)->generation); in fill_inode_item() 4310 flags = btrfs_inode_combine_flags(BTRFS_I(inode)->flags, in fill_inode_item() 4311 BTRFS_I(inode)->ro_flags); in fill_inode_item() 4556 trans = __unlink_start_trans(BTRFS_I(dir)); in btrfs_unlink() 4562 btrfs_record_unlink_dir(trans, BTRFS_I(dir), BTRFS_I(d_inode(dentry)), in btrfs_unlink() 4565 ret = btrfs_unlink_inode(trans, BTRFS_I(dir), BTRFS_I(d_inode(dentry)), in btrfs_unlink() 4571 ret = btrfs_orphan_add(trans, BTRFS_I(inode)); 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 | 1043 !(BTRFS_I(inode)->flags & (BTRFS_INODE_NODATACOW | BTRFS_INODE_PREALLOC))) in btrfs_write_check() 1066 ret = btrfs_cont_expand(BTRFS_I(inode), oldsize, end_pos); in btrfs_write_check() 1333 ret = btrfs_inode_lock(BTRFS_I(inode), ilock_flags); in btrfs_buffered_write() 1354 ret = copy_one_range(BTRFS_I(inode), iter, &data_reserved, pos, nowait); in btrfs_buffered_write() 1368 btrfs_inode_unlock(BTRFS_I(inode), ilock_flags); in btrfs_buffered_write() 1380 btrfs_inode_lock(BTRFS_I(inode), 0); in btrfs_encoded_write() 1399 btrfs_inode_unlock(BTRFS_I(inode), 0); in btrfs_encoded_write() 1407 struct btrfs_inode *inode = BTRFS_I(file_inode(file)); in btrfs_do_write_iter() 1468 &BTRFS_I(inode)->runtime_flags)) in btrfs_release_file() 1529 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() 758 ret = read_key_bytes(BTRFS_I(inode), BTRFS_VERITY_MERKLE_ITEM_KEY, off, in btrfs_read_merkle_tree_page() 796 return write_key_bytes(BTRFS_I(inode), BTRFS_VERITY_MERKLE_ITEM_KEY, in btrfs_write_merkle_tree_block()
|
| H A D | ioctl.c | 275 const struct btrfs_inode *inode = BTRFS_I(d_inode(dentry)); in btrfs_fileattr_get() 284 struct btrfs_inode *inode = BTRFS_I(d_inode(dentry)); in btrfs_fileattr_set() 547 struct btrfs_root *root = BTRFS_I(dir)->root; in create_subvol() 689 BTRFS_I(new_inode_args.inode)->root = new_root; in create_subvol() 705 btrfs_record_new_subvolume(trans, BTRFS_I(dir)); in create_subvol() 796 ret = btrfs_subvolume_reserve_metadata(BTRFS_I(dir)->root, block_rsv, in create_snapshot() 805 pending_snapshot->dir = BTRFS_I(dir); in create_snapshot() 813 ret = btrfs_record_root_in_trans(trans, BTRFS_I(dir)->root); in create_snapshot() 890 ret = btrfs_check_dir_item_collision(BTRFS_I(dir)->root, dir->i_ino, &name_str); in btrfs_mksubvol() 896 if (btrfs_root_refs(&BTRFS_I(dir)->root->root_item) == 0) in btrfs_mksubvol() [all …]
|
| H A D | props.c | 273 struct btrfs_root *root = BTRFS_I(inode)->root; in inode_prop_iterator() 276 ret = handler->apply(BTRFS_I(inode), value, len); in inode_prop_iterator() 280 handler->xattr_name, btrfs_ino(BTRFS_I(inode)), in inode_prop_iterator() 283 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() 473 btrfs_err(BTRFS_I(inode)->root->fs_info, in io_ctl_prepare_pages() [all …]
|
| H A D | reflink.c | 757 struct btrfs_inode *inode = BTRFS_I(file_inode(file)); in btrfs_clone_files() 758 struct btrfs_inode *src = BTRFS_I(file_inode(file_src)); in btrfs_clone_files() 840 struct btrfs_inode *inode_in = BTRFS_I(file_inode(file_in)); in btrfs_remap_file_range_prep() 841 struct btrfs_inode *inode_out = BTRFS_I(file_inode(file_out)); in btrfs_remap_file_range_prep() 930 struct btrfs_inode *src_inode = BTRFS_I(file_inode(src_file)); in btrfs_remap_file_range() 931 struct btrfs_inode *dst_inode = BTRFS_I(file_inode(dst_file)); in btrfs_remap_file_range()
|
| H A D | acl.c | 111 if (btrfs_root_readonly(BTRFS_I(inode)->root)) in btrfs_set_acl()
|
| H A D | relocation.c | 873 struct btrfs_root *root = BTRFS_I(reloc_inode)->root; in get_new_location() 884 bytenr -= BTRFS_I(reloc_inode)->reloc_block_group_start; in get_new_location() 886 btrfs_ino(BTRFS_I(reloc_inode)), bytenr, 0); in get_new_location() 899 btrfs_ino(BTRFS_I(reloc_inode)), bytenr); in get_new_location() 916 btrfs_ino(BTRFS_I(reloc_inode)), bytenr, in get_new_location() 2791 struct btrfs_inode *inode = BTRFS_I(rc->data_inode); in prealloc_file_extent_cluster() 2854 struct btrfs_inode *inode = BTRFS_I(rc->data_inode); in setup_relocation_extent_mapping() 2911 u64 offset = BTRFS_I(inode)->reloc_block_group_start; in relocate_one_folio() 2991 ret = btrfs_delalloc_reserve_metadata(BTRFS_I(inode), in relocate_one_folio() 2998 btrfs_lock_extent(&BTRFS_I(inode)->io_tree, clamped_start, in relocate_one_folio() [all …]
|
| H A D | extent_io.c | 313 const struct btrfs_inode *inode = BTRFS_I(folio->mapping->host); in btrfs_check_folio_write_protected() 396 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; in find_lock_delalloc_range() 1114 em = get_extent_map(BTRFS_I(inode), folio, cur, locked_end - cur + 1, em_cached); in btrfs_do_readpage() 1414 struct btrfs_inode *inode = BTRFS_I(vfs_inode); in btrfs_read_folio() 2043 struct btrfs_inode *inode = BTRFS_I(folio->mapping->host); in extent_writepage() 2456 BTRFS_I(fs_info->btree_inode), eb->start, in write_one_eb() 2771 &BTRFS_I(inode)->runtime_flags)) in extent_write_cache_pages() 2881 btrfs_add_delayed_iput(BTRFS_I(inode)); in extent_write_cache_pages() 2925 btrfs_mark_ordered_io_finished(BTRFS_I(inode), cur, cur_len, false); in extent_write_locked_range() 2943 ret = extent_writepage_io(BTRFS_I(inode), folio, cur, cur_len, in extent_write_locked_range() [all …]
|
| H A D | subpage.h | 102 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 | 978 #define folio_to_inode(_folio) (BTRFS_I(_Generic((_folio), \ 983 #define inode_to_fs_info(_inode) (BTRFS_I(_Generic((_inode), \
|
| H A D | compression.c | 383 em_tree = &BTRFS_I(inode)->extent_tree; in add_ra_bio_folios() 384 tree = &BTRFS_I(inode)->io_tree; in add_ra_bio_folios() 975 struct btrfs_inode *inode = BTRFS_I(mapping->host); in btrfs_compress_filemap_get_folio()
|
| H A D | super.c | 1144 seq_printf(seq, ",subvolid=%llu", btrfs_root_id(BTRFS_I(d_inode(dentry))->root)); in btrfs_show_options() 1146 btrfs_root_id(BTRFS_I(d_inode(dentry))->root)); in btrfs_show_options() 1197 u64 root_objectid = btrfs_root_id(BTRFS_I(root_inode)->root); in mount_subvol() 1836 f_fsid.val[0] ^= btrfs_root_id(BTRFS_I(d_inode(dentry))->root) >> 32; in btrfs_statfs() 1837 f_fsid.val[1] ^= btrfs_root_id(BTRFS_I(d_inode(dentry))->root); in btrfs_statfs()
|
| H A D | btrfs_inode.h | 348 #define BTRFS_I(_inode) \ macro
|
| H A D | disk-io.c | 1909 btrfs_set_inode_number(BTRFS_I(inode), BTRFS_BTREE_INODE_OBJECTID); in btrfs_init_btree_inode() 1920 btrfs_extent_io_tree_init(fs_info, &BTRFS_I(inode)->io_tree, in btrfs_init_btree_inode() 1922 btrfs_extent_map_tree_init(&BTRFS_I(inode)->extent_tree); in btrfs_init_btree_inode() 1924 BTRFS_I(inode)->root = btrfs_grab_root(fs_info->tree_root); in btrfs_init_btree_inode() 1925 set_bit(BTRFS_INODE_DUMMY, &BTRFS_I(inode)->runtime_flags); in btrfs_init_btree_inode() 4875 BTRFS_I(inode)->generation = 0; in btrfs_cleanup_bg_io()
|
| H A D | fiemap.c | 882 struct btrfs_inode *btrfs_inode = BTRFS_I(inode); in btrfs_fiemap()
|
| H A D | subpage.c | 358 if (!mapping || !mapping->host || !is_data_inode(BTRFS_I(mapping->host))) { in btrfs_folio_mark_dirty()
|
| H A D | block-group.c | 3433 BTRFS_I(inode)->generation = 0; in cache_save_setup() 3434 ret = btrfs_update_inode(trans, BTRFS_I(inode)); in cache_save_setup() 3503 ret = btrfs_check_data_free_space(BTRFS_I(inode), &data_reserved, 0, in cache_save_setup()
|
| H A D | tree-log.c | 7461 inode = BTRFS_I(d_inode(parent)); in log_new_ancestors_fast() 7728 ret = btrfs_log_inode_parent(trans, BTRFS_I(d_inode(dentry)), parent, in btrfs_log_dentry_safe() 8049 struct btrfs_inode *inode = BTRFS_I(d_inode(old_dentry)); in btrfs_log_new_name()
|
| /linux/fs/btrfs/tests/ |
| 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()
|
| /linux/include/trace/events/ |
| H A D | btrfs.h | 290 __entry->ino = btrfs_ino(BTRFS_I(inode)); 292 __entry->disk_i_size = BTRFS_I(inode)->disk_i_size; 293 __entry->generation = BTRFS_I(inode)->generation; 294 __entry->last_trans = BTRFS_I(inode)->last_trans; 295 __entry->logged_trans = BTRFS_I(inode)->logged_trans; 296 __entry->root_objectid = BTRFS_I(inode)->root ? 297 btrfs_root_id(BTRFS_I(inode)->root) : 0; 801 __entry->ino = btrfs_ino(BTRFS_I(inode)); 810 __entry->root_objectid = btrfs_root_id(BTRFS_I(inode)->root); 882 __entry->ino = btrfs_ino(BTRFS_I(inode)); [all …]
|