Home
last modified time | relevance | path

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

12

/Linux-v5.4/fs/btrfs/
Dinode.c145 BTRFS_I(inode)->io_tree.ops = &btrfs_extent_io_ops; in btrfs_test_inode_set_ops()
194 key.objectid = btrfs_ino(BTRFS_I(inode)); in insert_inline_extent()
255 BTRFS_I(inode)->disk_i_size = inode->i_size; in insert_inline_extent()
273 struct btrfs_root *root = BTRFS_I(inode)->root; in cow_file_range_inline()
308 trans->block_rsv = &BTRFS_I(inode)->block_rsv; in cow_file_range_inline()
339 set_bit(BTRFS_INODE_NEEDS_FULL_SYNC, &BTRFS_I(inode)->runtime_flags); in cow_file_range_inline()
340 btrfs_drop_extent_cache(BTRFS_I(inode), start, aligned_end - 1, 0); in cow_file_range_inline()
407 if (BTRFS_I(inode)->flags & BTRFS_INODE_NODATACOW || in inode_can_compress()
408 BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM) in inode_can_compress()
424 btrfs_ino(BTRFS_I(inode))); in inode_need_compress()
[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()
273 BTRFS_I(inode)->flags |= BTRFS_INODE_NOCOMPRESS; in prop_compression_apply()
274 BTRFS_I(inode)->flags &= ~BTRFS_INODE_COMPRESS; in prop_compression_apply()
275 BTRFS_I(inode)->prop_compress = BTRFS_COMPRESS_NONE; in prop_compression_apply()
292 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()
159 struct btrfs_root *root = BTRFS_I(dir)->root; in btrfs_get_parent()
171 if (btrfs_ino(BTRFS_I(dir)) == BTRFS_FIRST_FREE_OBJECTID) { in btrfs_get_parent()
177 key.objectid = btrfs_ino(BTRFS_I(dir)); in btrfs_get_parent()
230 struct btrfs_root *root = BTRFS_I(dir)->root; in btrfs_get_name()
243 ino = btrfs_ino(BTRFS_I(inode)); in btrfs_get_name()
251 key.objectid = BTRFS_I(inode)->root->root_key.objectid; in btrfs_get_name()
[all …]
Dtransaction.h149 spin_lock(&BTRFS_I(inode)->lock); in btrfs_set_inode_last_trans()
150 BTRFS_I(inode)->last_trans = trans->transaction->transid; in btrfs_set_inode_last_trans()
151 BTRFS_I(inode)->last_sub_trans = BTRFS_I(inode)->root->log_transid; in btrfs_set_inode_last_trans()
152 BTRFS_I(inode)->last_log_commit = BTRFS_I(inode)->root->last_log_commit; in btrfs_set_inode_last_trans()
153 spin_unlock(&BTRFS_I(inode)->lock); in btrfs_set_inode_last_trans()
Dfile.c307 clear_bit(BTRFS_INODE_IN_DEFRAG, &BTRFS_I(inode)->runtime_flags); in __btrfs_run_defrag_inode()
323 btrfs_requeue_inode_defrag(BTRFS_I(inode), defrag); in __btrfs_run_defrag_inode()
332 btrfs_requeue_inode_defrag(BTRFS_I(inode), defrag); in __btrfs_run_defrag_inode()
539 clear_extent_bit(&BTRFS_I(inode)->io_tree, start_pos, end_of_last_block, in btrfs_dirty_pages()
543 if (!btrfs_is_free_space_inode(BTRFS_I(inode))) { in btrfs_dirty_pages()
545 !(BTRFS_I(inode)->flags & BTRFS_INODE_PREALLOC)) { in btrfs_dirty_pages()
553 err = btrfs_find_new_delalloc_bytes(BTRFS_I(inode), in btrfs_dirty_pages()
761 u64 ino = btrfs_ino(BTRFS_I(inode)); in __btrfs_drop_extents()
779 btrfs_drop_extent_cache(BTRFS_I(inode), start, end - 1, 0); in __btrfs_drop_extents()
781 if (start >= BTRFS_I(inode)->disk_i_size && !replace_extent) in __btrfs_drop_extents()
[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()
228 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_setxattr_trans()
253 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_listxattr()
263 key.objectid = btrfs_ino(BTRFS_I(inode)); in btrfs_listxattr()
[all …]
Dioctl.c141 struct btrfs_inode *binode = BTRFS_I(inode); in btrfs_sync_inode_flags_to_i_flags()
162 struct btrfs_inode *binode = BTRFS_I(file_inode(file)); in btrfs_ioctl_getflags()
190 struct btrfs_inode *binode = BTRFS_I(inode); in btrfs_ioctl_setflags()
376 struct btrfs_inode *binode = BTRFS_I(file_inode(file)); in btrfs_ioctl_fsgetxattr()
389 struct btrfs_inode *binode = BTRFS_I(inode); in btrfs_ioctl_fssetxattr()
567 struct btrfs_root *root = BTRFS_I(dir)->root; in create_subvol()
693 ret = btrfs_set_inode_index(BTRFS_I(dir), &index); in create_subvol()
699 ret = btrfs_insert_dir_item(trans, name, namelen, BTRFS_I(dir), &key, in create_subvol()
706 btrfs_i_size_write(BTRFS_I(dir), dir->i_size + namelen * 2); in create_subvol()
711 btrfs_ino(BTRFS_I(dir)), index, name, namelen); in create_subvol()
[all …]
Dordered-data.c179 struct btrfs_root *root = BTRFS_I(inode)->root; in __btrfs_add_ordered_extent()
184 tree = &BTRFS_I(inode)->ordered_tree; in __btrfs_add_ordered_extent()
242 spin_lock(&BTRFS_I(inode)->lock); in __btrfs_add_ordered_extent()
243 btrfs_mod_outstanding_extents(BTRFS_I(inode), 1); in __btrfs_add_ordered_extent()
244 spin_unlock(&BTRFS_I(inode)->lock); in __btrfs_add_ordered_extent()
284 tree = &BTRFS_I(entry->inode)->ordered_tree; in btrfs_add_ordered_sum()
316 tree = &BTRFS_I(inode)->ordered_tree; in btrfs_dec_test_first_ordered_pending()
383 tree = &BTRFS_I(inode)->ordered_tree; in btrfs_dec_test_ordered_pending()
404 btrfs_crit(BTRFS_I(inode)->root->fs_info, in btrfs_dec_test_ordered_pending()
465 struct btrfs_inode *btrfs_inode = BTRFS_I(inode); in btrfs_remove_ordered_extent()
[all …]
Dbtrfs_inode.h200 static inline struct btrfs_inode *BTRFS_I(const struct inode *inode) in BTRFS_I() function
219 unsigned long h = btrfs_inode_hash(inode->i_ino, BTRFS_I(inode)->root); in btrfs_insert_inode_hash()
257 return btrfs_ino(BTRFS_I(inode)) != BTRFS_BTREE_INODE_OBJECTID; in is_data_inode()
Ddelayed-inode.c1584 delayed_node = btrfs_get_delayed_node(BTRFS_I(inode)); in btrfs_readdir_get_delayed_items()
1726 btrfs_set_stack_inode_size(inode_item, BTRFS_I(inode)->disk_i_size); in fill_stack_inode_item()
1731 BTRFS_I(inode)->generation); in fill_stack_inode_item()
1736 btrfs_set_stack_inode_flags(inode_item, BTRFS_I(inode)->flags); in fill_stack_inode_item()
1755 BTRFS_I(inode)->i_otime.tv_sec); in fill_stack_inode_item()
1757 BTRFS_I(inode)->i_otime.tv_nsec); in fill_stack_inode_item()
1765 delayed_node = btrfs_get_delayed_node(BTRFS_I(inode)); in btrfs_fill_inode()
1780 btrfs_i_size_write(BTRFS_I(inode), btrfs_stack_inode_size(inode_item)); in btrfs_fill_inode()
1784 BTRFS_I(inode)->generation = btrfs_stack_inode_generation(inode_item); in btrfs_fill_inode()
1785 BTRFS_I(inode)->last_trans = btrfs_stack_inode_transid(inode_item); in btrfs_fill_inode()
[all …]
Dtree-log.c632 btrfs_ino(BTRFS_I(inode)), start, 0); in replay_one_extent()
883 ret = btrfs_unlink_inode(trans, root, dir, BTRFS_I(inode), name, in drop_one_dir_item()
1130 BTRFS_I(victim_parent), in __add_inode_ref()
1287 ret = btrfs_unlink_inode(trans, root, BTRFS_I(dir), in unlink_old_inode_refs()
1315 const u64 parent_id = btrfs_ino(BTRFS_I(dir)); in btrfs_inode_ref_exists()
1322 key.objectid = btrfs_ino(BTRFS_I(inode)); in btrfs_inode_ref_exists()
1329 ret = btrfs_search_slot(NULL, BTRFS_I(inode)->root, &key, path, 0, 0); in btrfs_inode_ref_exists()
1363 btrfs_ino(BTRFS_I(dir)), in add_link()
1385 ret = btrfs_unlink_inode(trans, root, BTRFS_I(dir), BTRFS_I(other_inode), in add_link()
1400 ret = btrfs_add_link(trans, BTRFS_I(dir), BTRFS_I(inode), in add_link()
[all …]
Ddelalloc-space.c149 ret = btrfs_alloc_data_chunk_ondemand(BTRFS_I(inode), len); in btrfs_check_data_free_space()
197 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_free_reserved_data_space()
477 ret = btrfs_delalloc_reserve_metadata(BTRFS_I(inode), len); in btrfs_delalloc_reserve_space()
499 btrfs_delalloc_release_metadata(BTRFS_I(inode), len, qgroup_free); in btrfs_delalloc_release_space()
Drelocation.c1578 struct btrfs_root *root = BTRFS_I(reloc_inode)->root; in get_new_location()
1588 bytenr -= BTRFS_I(reloc_inode)->index_cnt; in get_new_location()
1590 btrfs_ino(BTRFS_I(reloc_inode)), bytenr, 0); in get_new_location()
1680 } else if (inode && btrfs_ino(BTRFS_I(inode)) < key.objectid) { in replace_file_extents()
1684 if (inode && btrfs_ino(BTRFS_I(inode)) == key.objectid) { in replace_file_extents()
1691 ret = try_lock_extent(&BTRFS_I(inode)->io_tree, in replace_file_extents()
1696 btrfs_drop_extent_cache(BTRFS_I(inode), in replace_file_extents()
1698 unlock_extent(&BTRFS_I(inode)->io_tree, in replace_file_extents()
2091 ino = btrfs_ino(BTRFS_I(inode)); in invalidate_extent_cache()
2132 lock_extent(&BTRFS_I(inode)->io_tree, start, end); in invalidate_extent_cache()
[all …]
Dinode-map.c464 BTRFS_I(inode)->generation = 0; in btrfs_save_ino_cache()
504 btrfs_delalloc_release_extents(BTRFS_I(inode), prealloc); in btrfs_save_ino_cache()
505 btrfs_delalloc_release_metadata(BTRFS_I(inode), prealloc, true); in btrfs_save_ino_cache()
510 btrfs_delalloc_release_extents(BTRFS_I(inode), prealloc); in btrfs_save_ino_cache()
Dextent_io.c100 btrfs_debug_rl(BTRFS_I(inode)->root->fs_info, in __btrfs_debug_check_extent_io_range()
102 caller, btrfs_ino(BTRFS_I(inode)), isize, start, end); in __btrfs_debug_check_extent_io_range()
1786 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; in find_lock_delalloc_range()
1945 clear_extent_bit(&BTRFS_I(inode)->io_tree, start, end, clear_bits, 1, 0, in extent_clear_unlock_delalloc()
2379 struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree; in btrfs_get_io_failure_record()
2380 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; in btrfs_get_io_failure_record()
2381 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree; in btrfs_get_io_failure_record()
2569 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; in bio_readpage_error()
2570 struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree; in bio_readpage_error()
2724 bool data_inode = btrfs_ino(BTRFS_I(inode)) in end_bio_extent_readpage()
[all …]
Dfree-space-cache.c115 if (!((BTRFS_I(inode)->flags & flags) == flags)) { in lookup_free_space_inode()
117 BTRFS_I(inode)->flags |= BTRFS_INODE_NODATASUM | in lookup_free_space_inode()
230 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_truncate_free_space_cache()
260 btrfs_i_size_write(BTRFS_I(inode), 0); in btrfs_truncate_free_space_cache()
308 if (btrfs_ino(BTRFS_I(inode)) != BTRFS_FREE_INO_OBJECTID) in io_ctl_init()
389 btrfs_err(BTRFS_I(inode)->root->fs_info, in io_ctl_prepare_pages()
703 if (!BTRFS_I(inode)->generation) { in __load_free_space_cache()
710 if (BTRFS_I(inode)->generation != generation) { in __load_free_space_cache()
713 BTRFS_I(inode)->generation, generation); in __load_free_space_cache()
1008 clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, inode->i_size - 1, in update_cache_item()
[all …]
Dcompression.c160 ret = check_compressed_csum(BTRFS_I(inode), cb, in end_compressed_bio_read()
325 int skip_sum = BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM; in btrfs_submit_compressed_write()
447 em_tree = &BTRFS_I(inode)->extent_tree; in add_ra_bio_pages()
448 tree = &BTRFS_I(inode)->io_tree; in add_ra_bio_pages()
567 em_tree = &BTRFS_I(inode)->extent_tree; in btrfs_submit_compressed_read()
661 if (!(BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM)) { in btrfs_submit_compressed_read()
691 if (!(BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM)) { in btrfs_submit_compressed_read()
Ddisk-io.c469 io_tree = &BTRFS_I(fs_info->btree_inode)->io_tree; in btree_read_extent_buffer_pages()
596 struct btrfs_root *root = BTRFS_I(page->mapping->host)->root; in btree_readpage_end_io_hook()
861 root = BTRFS_I(bvec->bv_page->mapping->host)->root; in btree_csum_one_bio()
895 int async = check_async_write(fs_info, BTRFS_I(inode)); in btree_submit_bio_hook()
966 fs_info = BTRFS_I(mapping->host)->root->fs_info; in btree_writepages()
980 tree = &BTRFS_I(page->mapping->host)->io_tree; in btree_readpage()
996 tree = &BTRFS_I(page->mapping->host)->io_tree; in btree_invalidatepage()
1000 btrfs_warn(BTRFS_I(page->mapping->host)->root->fs_info, in btree_invalidatepage()
2116 RB_CLEAR_NODE(&BTRFS_I(inode)->rb_node); in btrfs_init_btree_inode()
2117 extent_io_tree_init(fs_info, &BTRFS_I(inode)->io_tree, in btrfs_init_btree_inode()
[all …]
Dtransaction.c909 atomic_inc(&BTRFS_I(fs_info->btree_inode)->sync_writers); in btrfs_write_marked_extents()
945 atomic_dec(&BTRFS_I(fs_info->btree_inode)->sync_writers); in btrfs_write_marked_extents()
1455 parent_root = BTRFS_I(parent_inode)->root; in create_pending_snapshot()
1463 ret = btrfs_set_inode_index(BTRFS_I(parent_inode), &index); in create_pending_snapshot()
1468 btrfs_ino(BTRFS_I(parent_inode)), in create_pending_snapshot()
1562 btrfs_ino(BTRFS_I(parent_inode)), index, in create_pending_snapshot()
1601 dentry->d_name.len, BTRFS_I(parent_inode), in create_pending_snapshot()
1610 btrfs_i_size_write(BTRFS_I(parent_inode), parent_inode->i_size + in create_pending_snapshot()
Dqgroup.c3401 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_qgroup_reserve_data()
3424 ret = set_record_extent_bits(&BTRFS_I(inode)->io_tree, start, in btrfs_qgroup_reserve_data()
3443 clear_extent_bit(&BTRFS_I(inode)->io_tree, unode->val, in btrfs_qgroup_reserve_data()
3456 struct btrfs_root *root = BTRFS_I(inode)->root; in qgroup_free_reserved_data()
3492 ret = clear_record_extent_bits(&BTRFS_I(inode)->io_tree, in qgroup_free_reserved_data()
3516 &BTRFS_I(inode)->root->fs_info->flags)) in __btrfs_qgroup_release_data()
3524 ret = clear_record_extent_bits(&BTRFS_I(inode)->io_tree, start, in __btrfs_qgroup_release_data()
3534 btrfs_qgroup_free_refroot(BTRFS_I(inode)->root->fs_info, in __btrfs_qgroup_release_data()
3535 BTRFS_I(inode)->root->root_key.objectid, in __btrfs_qgroup_release_data()
3756 ret = clear_record_extent_bits(&BTRFS_I(inode)->io_tree, 0, (u64)-1, in btrfs_qgroup_check_reserved_leak()
[all …]
Dfile-item.c159 struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; in __btrfs_lookup_bio_sums()
202 if (btrfs_is_free_space_inode(BTRFS_I(inode))) { in __btrfs_lookup_bio_sums()
235 if (BTRFS_I(inode)->root->root_key.objectid == in __btrfs_lookup_bio_sums()
243 btrfs_ino(BTRFS_I(inode)), offset); in __btrfs_lookup_bio_sums()
Dsuper.c1373 BTRFS_I(d_inode(dentry))->root->root_key.objectid); in btrfs_show_options()
1438 u64 root_objectid = BTRFS_I(root_inode)->root->root_key.objectid; in mount_subvol()
2119 BTRFS_I(d_inode(dentry))->root->root_key.objectid >> 32; in btrfs_statfs()
2121 BTRFS_I(d_inode(dentry))->root->root_key.objectid; in btrfs_statfs()
/Linux-v5.4/fs/btrfs/tests/
Dinode-tests.c238 BTRFS_I(inode)->location.type = BTRFS_INODE_ITEM_KEY; in test_btrfs_get_extent()
239 BTRFS_I(inode)->location.objectid = BTRFS_FIRST_FREE_OBJECTID; in test_btrfs_get_extent()
240 BTRFS_I(inode)->location.offset = 0; in test_btrfs_get_extent()
265 BTRFS_I(inode)->root = root; in test_btrfs_get_extent()
266 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, 0, sectorsize, 0); in test_btrfs_get_extent()
277 btrfs_drop_extent_cache(BTRFS_I(inode), 0, (u64)-1, 0); in test_btrfs_get_extent()
286 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, 0, (u64)-1, 0); in test_btrfs_get_extent()
308 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize, 0); in test_btrfs_get_extent()
336 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize, 0); in test_btrfs_get_extent()
359 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize, 0); in test_btrfs_get_extent()
[all …]
Dextent-io-tests.c80 tmp = &BTRFS_I(inode)->io_tree; in test_find_delalloc()
/Linux-v5.4/include/trace/events/
Dbtrfs.h182 __entry->ino = btrfs_ino(BTRFS_I(inode));
184 __entry->disk_i_size = BTRFS_I(inode)->disk_i_size;
185 __entry->generation = BTRFS_I(inode)->generation;
186 __entry->last_trans = BTRFS_I(inode)->last_trans;
187 __entry->logged_trans = BTRFS_I(inode)->logged_trans;
189 BTRFS_I(inode)->root->root_key.objectid;
497 __entry->ino = btrfs_ino(BTRFS_I(inode));
507 BTRFS_I(inode)->root->root_key.objectid;
582 __entry->ino = btrfs_ino(BTRFS_I(inode));
593 BTRFS_I(inode)->root->root_key.objectid;
[all …]

12