Home
last modified time | relevance | path

Searched refs:BTRFS_I (Results 1 – 25 of 27) sorted by relevance

12

/Linux-v5.15/fs/btrfs/tests/
Dinode-tests.c258 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_cache(BTRFS_I(inode), 0, (u64)-1, 0); 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 …]
Dbtrfs-tests.c62 BTRFS_I(inode)->location.type = BTRFS_INODE_ITEM_KEY; in btrfs_new_test_inode()
63 BTRFS_I(inode)->location.objectid = BTRFS_FIRST_FREE_OBJECTID; in btrfs_new_test_inode()
64 BTRFS_I(inode)->location.offset = 0; in btrfs_new_test_inode()
Dextent-io-tests.c80 tmp = &BTRFS_I(inode)->io_tree; in test_find_delalloc()
/Linux-v5.15/fs/btrfs/
Dinode.c129 down_write(&BTRFS_I(inode)->i_mmap_lock); in btrfs_inode_lock()
142 up_write(&BTRFS_I(inode)->i_mmap_lock); in btrfs_inode_unlock()
262 key.objectid = btrfs_ino(BTRFS_I(inode)); in insert_inline_extent()
318 ret = btrfs_inode_set_file_extent_range(BTRFS_I(inode), start, size); in insert_inline_extent()
331 BTRFS_I(inode)->disk_i_size = inode->i_size; in insert_inline_extent()
580 inode_should_defrag(BTRFS_I(inode), start, end, end - start + 1, in compress_file_range()
623 (start > 0 || end + 1 < BTRFS_I(inode)->disk_i_size)) in compress_file_range()
636 if (inode_need_compress(BTRFS_I(inode), start, end)) { in compress_file_range()
645 if (BTRFS_I(inode)->defrag_compress) in compress_file_range()
646 compress_type = BTRFS_I(inode)->defrag_compress; in compress_file_range()
[all …]
Dreflink.c21 struct btrfs_root *root = BTRFS_I(inode)->root; in clone_finish_inode_update()
35 btrfs_inode_safe_disk_i_size_write(BTRFS_I(inode), 0); in clone_finish_inode_update()
38 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 set_bit(BTRFS_INODE_NEEDS_FULL_SYNC, &BTRFS_I(dst)->runtime_flags); in clone_copy_inline_extent()
[all …]
Dprops.c109 set_bit(BTRFS_INODE_HAS_PROPS, &BTRFS_I(inode)->runtime_flags); in btrfs_set_prop()
231 struct btrfs_root *root = BTRFS_I(inode)->root; in inode_prop_iterator()
238 handler->xattr_name, btrfs_ino(BTRFS_I(inode)), in inode_prop_iterator()
241 set_bit(BTRFS_INODE_HAS_PROPS, &BTRFS_I(inode)->runtime_flags); in inode_prop_iterator()
246 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_load_inode_props()
247 u64 ino = btrfs_ino(BTRFS_I(inode)); in btrfs_load_inode_props()
278 BTRFS_I(inode)->flags &= ~BTRFS_INODE_COMPRESS; in prop_compression_apply()
279 BTRFS_I(inode)->flags &= ~BTRFS_INODE_NOCOMPRESS; in prop_compression_apply()
280 BTRFS_I(inode)->prop_compress = BTRFS_COMPRESS_NONE; in prop_compression_apply()
287 BTRFS_I(inode)->flags |= BTRFS_INODE_NOCOMPRESS; in prop_compression_apply()
[all …]
Dexport.c35 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 …]
Dxattr.c27 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()
218 &BTRFS_I(inode)->runtime_flags); in btrfs_setxattr()
219 clear_bit(BTRFS_INODE_NO_XATTRS, &BTRFS_I(inode)->runtime_flags); in btrfs_setxattr()
230 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_setxattr_trans()
266 ret = btrfs_update_inode(trans, root, BTRFS_I(inode)); in btrfs_setxattr_trans()
[all …]
Dfile.c299 clear_bit(BTRFS_INODE_IN_DEFRAG, &BTRFS_I(inode)->runtime_flags); in __btrfs_run_defrag_inode()
315 btrfs_requeue_inode_defrag(BTRFS_I(inode), defrag); in __btrfs_run_defrag_inode()
324 btrfs_requeue_inode_defrag(BTRFS_I(inode), defrag); in __btrfs_run_defrag_inode()
1607 if (check_nocow_nolock(BTRFS_I(inode), pos, &nocow_bytes) <= 0) in btrfs_write_check()
1637 ret = btrfs_cont_expand(BTRFS_I(inode), oldsize, end_pos); in btrfs_write_check()
1721 ret = btrfs_check_data_free_space(BTRFS_I(inode), in btrfs_buffered_write()
1730 if (btrfs_check_nocow_lock(BTRFS_I(inode), pos, in btrfs_buffered_write()
1742 ret = btrfs_delalloc_reserve_metadata(BTRFS_I(inode), in btrfs_buffered_write()
1746 btrfs_free_reserved_data_space(BTRFS_I(inode), in btrfs_buffered_write()
1750 btrfs_check_nocow_unlock(BTRFS_I(inode)); in btrfs_buffered_write()
[all …]
Dioctl.c143 struct btrfs_inode *binode = BTRFS_I(inode); in btrfs_sync_inode_flags_to_i_flags()
208 struct btrfs_inode *binode = BTRFS_I(d_inode(dentry)); in btrfs_fileattr_get()
219 struct btrfs_inode *binode = BTRFS_I(inode); in btrfs_fileattr_set()
356 ret = btrfs_update_inode(trans, root, BTRFS_I(inode)); in btrfs_fileattr_set()
513 struct btrfs_root *root = BTRFS_I(dir)->root; in create_subvol()
659 ret = btrfs_set_inode_index(BTRFS_I(dir), &index); in create_subvol()
665 ret = btrfs_insert_dir_item(trans, name, namelen, BTRFS_I(dir), &key, in create_subvol()
672 btrfs_i_size_write(BTRFS_I(dir), dir->i_size + namelen * 2); in create_subvol()
673 ret = btrfs_update_inode(trans, root, BTRFS_I(dir)); in create_subvol()
680 btrfs_ino(BTRFS_I(dir)), index, name, namelen); in create_subvol()
[all …]
Dtree-log.c667 btrfs_ino(BTRFS_I(inode)), start, 0); in replay_one_extent()
701 ret = btrfs_drop_extents(trans, root, BTRFS_I(inode), &drop_args); in replay_one_extent()
873 ret = btrfs_inode_set_file_extent_range(BTRFS_I(inode), start, in replay_one_extent()
879 btrfs_update_inode_bytes(BTRFS_I(inode), nbytes, drop_args.bytes_found); in replay_one_extent()
880 ret = btrfs_update_inode(trans, root, BTRFS_I(inode)); in replay_one_extent()
929 ret = btrfs_unlink_inode(trans, root, dir, BTRFS_I(inode), name, in drop_one_dir_item()
1166 BTRFS_I(victim_parent), in __add_inode_ref()
1327 ret = btrfs_unlink_inode(trans, root, BTRFS_I(dir), in unlink_old_inode_refs()
1355 const u64 parent_id = btrfs_ino(BTRFS_I(dir)); in btrfs_inode_ref_exists()
1362 key.objectid = btrfs_ino(BTRFS_I(inode)); in btrfs_inode_ref_exists()
[all …]
Ddelayed-inode.c1508 delayed_node = btrfs_get_delayed_node(BTRFS_I(inode)); in btrfs_readdir_get_delayed_items()
1652 btrfs_set_stack_inode_size(inode_item, BTRFS_I(inode)->disk_i_size); in fill_stack_inode_item()
1657 BTRFS_I(inode)->generation); in fill_stack_inode_item()
1662 flags = btrfs_inode_combine_flags(BTRFS_I(inode)->flags, in fill_stack_inode_item()
1663 BTRFS_I(inode)->ro_flags); in fill_stack_inode_item()
1683 BTRFS_I(inode)->i_otime.tv_sec); in fill_stack_inode_item()
1685 BTRFS_I(inode)->i_otime.tv_nsec); in fill_stack_inode_item()
1690 struct btrfs_fs_info *fs_info = BTRFS_I(inode)->root->fs_info; in btrfs_fill_inode()
1694 delayed_node = btrfs_get_delayed_node(BTRFS_I(inode)); in btrfs_fill_inode()
1709 btrfs_i_size_write(BTRFS_I(inode), btrfs_stack_inode_size(inode_item)); in btrfs_fill_inode()
[all …]
Dverity.c578 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()
670 ret = read_key_bytes(BTRFS_I(inode), BTRFS_VERITY_DESC_ITEM_KEY, 0, in btrfs_get_verity_descriptor()
687 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()
803 return write_key_bytes(BTRFS_I(inode), BTRFS_VERITY_MERKLE_ITEM_KEY, in btrfs_write_merkle_tree_block()
Dbtrfs_inode.h241 static inline struct btrfs_inode *BTRFS_I(const struct inode *inode) in BTRFS_I() function
260 unsigned long h = btrfs_inode_hash(inode->i_ino, BTRFS_I(inode)->root); in btrfs_insert_inode_hash()
298 return btrfs_ino(BTRFS_I(inode)) != BTRFS_BTREE_INODE_OBJECTID; in is_data_inode()
Dordered-data.c295 tree = &BTRFS_I(entry->inode)->ordered_tree; in btrfs_add_ordered_sum()
516 trace_btrfs_ordered_extent_put(BTRFS_I(entry->inode), entry); in btrfs_put_ordered_extent()
727 struct btrfs_inode *inode = BTRFS_I(entry->inode); in btrfs_start_ordered_extent()
781 ordered = btrfs_lookup_first_ordered_extent(BTRFS_I(inode), end); in btrfs_wait_ordered_range()
1052 struct btrfs_fs_info *fs_info = BTRFS_I(inode)->root->fs_info; in clone_ordered_extent()
1079 ret = btrfs_add_ordered_extent_compress(BTRFS_I(inode), in clone_ordered_extent()
1083 ret = btrfs_add_ordered_extent_dio(BTRFS_I(inode), file_offset, in clone_ordered_extent()
1086 ret = btrfs_add_ordered_extent(BTRFS_I(inode), file_offset, in clone_ordered_extent()
1097 struct btrfs_ordered_inode_tree *tree = &BTRFS_I(inode)->ordered_tree; in btrfs_split_ordered_extent()
Drelocation.c1006 struct btrfs_root *root = BTRFS_I(reloc_inode)->root; in get_new_location()
1016 bytenr -= BTRFS_I(reloc_inode)->index_cnt; in get_new_location()
1018 btrfs_ino(BTRFS_I(reloc_inode)), bytenr, 0); in get_new_location()
1109 } else if (inode && btrfs_ino(BTRFS_I(inode)) < key.objectid) { in replace_file_extents()
1113 if (inode && btrfs_ino(BTRFS_I(inode)) == key.objectid) { in replace_file_extents()
1120 ret = try_lock_extent(&BTRFS_I(inode)->io_tree, in replace_file_extents()
1125 btrfs_drop_extent_cache(BTRFS_I(inode), in replace_file_extents()
1127 unlock_extent(&BTRFS_I(inode)->io_tree, in replace_file_extents()
1524 ino = btrfs_ino(BTRFS_I(inode)); in invalidate_extent_cache()
1565 lock_extent(&BTRFS_I(inode)->io_tree, start, end); in invalidate_extent_cache()
[all …]
Dfree-space-cache.c120 if (!((BTRFS_I(inode)->flags & flags) == flags)) { in lookup_free_space_inode()
122 BTRFS_I(inode)->flags |= BTRFS_INODE_NODATASUM | in lookup_free_space_inode()
234 ret = btrfs_orphan_add(trans, BTRFS_I(inode)); in btrfs_remove_free_space_inode()
292 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_truncate_free_space_cache()
322 btrfs_i_size_write(BTRFS_I(inode), 0); in btrfs_truncate_free_space_cache()
329 ret = btrfs_truncate_inode_items(trans, root, BTRFS_I(inode), in btrfs_truncate_free_space_cache()
334 ret = btrfs_update_inode(trans, root, BTRFS_I(inode)); in btrfs_truncate_free_space_cache()
450 btrfs_err(BTRFS_I(inode)->root->fs_info, in io_ctl_prepare_pages()
456 btrfs_err(BTRFS_I(inode)->root->fs_info, in io_ctl_prepare_pages()
744 if (!BTRFS_I(inode)->generation) { in __load_free_space_cache()
[all …]
Dtransaction.c1032 atomic_inc(&BTRFS_I(fs_info->btree_inode)->sync_writers); in btrfs_write_marked_extents()
1068 atomic_dec(&BTRFS_I(fs_info->btree_inode)->sync_writers); in btrfs_write_marked_extents()
1602 parent_root = BTRFS_I(parent_inode)->root; in create_pending_snapshot()
1611 ret = btrfs_set_inode_index(BTRFS_I(parent_inode), &index); in create_pending_snapshot()
1616 btrfs_ino(BTRFS_I(parent_inode)), in create_pending_snapshot()
1712 btrfs_ino(BTRFS_I(parent_inode)), index, in create_pending_snapshot()
1746 dentry->d_name.len, BTRFS_I(parent_inode), in create_pending_snapshot()
1755 btrfs_i_size_write(BTRFS_I(parent_inode), parent_inode->i_size + in create_pending_snapshot()
1759 ret = btrfs_update_inode_fallback(trans, parent_root, BTRFS_I(parent_inode)); in create_pending_snapshot()
Dextent_io.c121 btrfs_debug_rl(BTRFS_I(inode)->root->fs_info, in __btrfs_debug_check_extent_io_range()
123 caller, btrfs_ino(BTRFS_I(inode)), isize, start, end); in __btrfs_debug_check_extent_io_range()
1988 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; in find_lock_delalloc_range()
2485 struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree; in btrfs_get_io_failure_record()
2486 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; in btrfs_get_io_failure_record()
2487 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree; in btrfs_get_io_failure_record()
2619 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; in btrfs_repair_one_sector()
2620 struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree; in btrfs_repair_one_sector()
2764 set_extent_uptodate(&BTRFS_I(inode)->io_tree, in submit_read_repair()
2768 unlock_extent_cached_atomic(&BTRFS_I(inode)->io_tree, in submit_read_repair()
[all …]
Ddisk-io.c389 io_tree = &BTRFS_I(fs_info->btree_inode)->io_tree; in btree_read_extent_buffer_pages()
850 struct btrfs_fs_info *fs_info = BTRFS_I(inode)->root->fs_info; in btrfs_wq_submit_bio()
885 root = BTRFS_I(bvec->bv_page->mapping->host)->root; in btree_csum_one_bio()
932 } else if (!should_async_write(fs_info, BTRFS_I(inode))) { in btrfs_submit_metadata_bio()
990 fs_info = BTRFS_I(mapping->host)->root->fs_info; in btree_writepages()
1013 tree = &BTRFS_I(page->mapping->host)->io_tree; in btree_invalidatepage()
1017 btrfs_warn(BTRFS_I(page->mapping->host)->root->fs_info, in btree_invalidatepage()
2255 RB_CLEAR_NODE(&BTRFS_I(inode)->rb_node); in btrfs_init_btree_inode()
2256 extent_io_tree_init(fs_info, &BTRFS_I(inode)->io_tree, in btrfs_init_btree_inode()
2258 BTRFS_I(inode)->io_tree.track_uptodate = false; in btrfs_init_btree_inode()
[all …]
Dcompression.c239 ret = check_compressed_csum(BTRFS_I(inode), bio, in end_compressed_bio_read()
353 btrfs_writepage_endio_finish_ordered(BTRFS_I(inode), NULL, in end_compressed_bio_write()
562 em_tree = &BTRFS_I(inode)->extent_tree; in add_ra_bio_pages()
563 tree = &BTRFS_I(inode)->io_tree; in add_ra_bio_pages()
694 em_tree = &BTRFS_I(inode)->extent_tree; in btrfs_submit_compressed_read()
Dfile-item.c368 struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; in btrfs_lookup_bio_sums()
379 if (!fs_info->csum_root || (BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM)) in btrfs_lookup_bio_sums()
430 if (btrfs_is_free_space_inode(BTRFS_I(inode))) { in btrfs_lookup_bio_sums()
472 if (BTRFS_I(inode)->root->root_key.objectid == in btrfs_lookup_bio_sums()
Dsuper.c1530 BTRFS_I(d_inode(dentry))->root->root_key.objectid); in btrfs_show_options()
1532 BTRFS_I(d_inode(dentry))->root->root_key.objectid); in btrfs_show_options()
1600 u64 root_objectid = BTRFS_I(root_inode)->root->root_key.objectid; in mount_subvol()
2338 BTRFS_I(d_inode(dentry))->root->root_key.objectid >> 32; in btrfs_statfs()
2340 BTRFS_I(d_inode(dentry))->root->root_key.objectid; in btrfs_statfs()
Dzoned.c1327 ordered = btrfs_lookup_ordered_extent(BTRFS_I(inode), file_offset); in btrfs_record_physical_zoned()
1339 struct btrfs_inode *inode = BTRFS_I(ordered->inode); in btrfs_rewrite_logical_zoned()
/Linux-v5.15/include/trace/events/
Dbtrfs.h221 __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;
228 BTRFS_I(inode)->root->root_key.objectid;
620 __entry->ino = btrfs_ino(BTRFS_I(inode));
631 BTRFS_I(inode)->root->root_key.objectid;
702 __entry->ino = btrfs_ino(BTRFS_I(inode));
703 __entry->parent = btrfs_ino(BTRFS_I(d_inode(dentry->d_parent)));
[all …]

12