Home
last modified time | relevance | path

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

12

/fs/btrfs/
Dinode.c146 BTRFS_I(inode)->io_tree.ops = &btrfs_extent_io_ops; in btrfs_test_inode_set_ops()
195 key.objectid = btrfs_ino(BTRFS_I(inode)); in insert_inline_extent()
256 BTRFS_I(inode)->disk_i_size = inode->i_size; in insert_inline_extent()
274 struct btrfs_root *root = BTRFS_I(inode)->root; in cow_file_range_inline()
309 trans->block_rsv = &BTRFS_I(inode)->block_rsv; in cow_file_range_inline()
340 set_bit(BTRFS_INODE_NEEDS_FULL_SYNC, &BTRFS_I(inode)->runtime_flags); in cow_file_range_inline()
341 btrfs_drop_extent_cache(BTRFS_I(inode), start, aligned_end - 1, 0); in cow_file_range_inline()
408 if (BTRFS_I(inode)->flags & BTRFS_INODE_NODATACOW || in inode_can_compress()
409 BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM) in inode_can_compress()
425 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 …]
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 …]
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()
237 struct btrfs_root *root = BTRFS_I(dir)->root; in btrfs_get_name()
250 ino = btrfs_ino(BTRFS_I(inode)); in btrfs_get_name()
258 key.objectid = BTRFS_I(inode)->root->root_key.objectid; in btrfs_get_name()
[all …]
Dtransaction.h160 spin_lock(&BTRFS_I(inode)->lock); in btrfs_set_inode_last_trans()
161 BTRFS_I(inode)->last_trans = trans->transaction->transid; in btrfs_set_inode_last_trans()
162 BTRFS_I(inode)->last_sub_trans = BTRFS_I(inode)->root->log_transid; in btrfs_set_inode_last_trans()
163 BTRFS_I(inode)->last_log_commit = BTRFS_I(inode)->last_sub_trans - 1; in btrfs_set_inode_last_trans()
164 spin_unlock(&BTRFS_I(inode)->lock); in btrfs_set_inode_last_trans()
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()
276 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_listxattr()
286 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()
203 struct btrfs_inode *binode = BTRFS_I(inode); in btrfs_ioctl_setflags()
390 struct btrfs_inode *binode = BTRFS_I(file_inode(file)); in btrfs_ioctl_fsgetxattr()
403 struct btrfs_inode *binode = BTRFS_I(inode); in btrfs_ioctl_fssetxattr()
581 struct btrfs_root *root = BTRFS_I(dir)->root; in create_subvol()
719 ret = btrfs_set_inode_index(BTRFS_I(dir), &index); in create_subvol()
725 ret = btrfs_insert_dir_item(trans, name, namelen, BTRFS_I(dir), &key, in create_subvol()
732 btrfs_i_size_write(BTRFS_I(dir), dir->i_size + namelen * 2); in create_subvol()
740 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 …]
Dtree-log.c636 btrfs_ino(BTRFS_I(inode)), start, 0); in replay_one_extent()
890 ret = btrfs_unlink_inode(trans, root, dir, BTRFS_I(inode), name, in drop_one_dir_item()
1146 BTRFS_I(victim_parent), in __add_inode_ref()
1307 ret = btrfs_unlink_inode(trans, root, BTRFS_I(dir), in unlink_old_inode_refs()
1344 const u64 parent_id = btrfs_ino(BTRFS_I(dir)); in btrfs_inode_ref_exists()
1351 key.objectid = btrfs_ino(BTRFS_I(inode)); in btrfs_inode_ref_exists()
1358 ret = btrfs_search_slot(NULL, BTRFS_I(inode)->root, &key, path, 0, 0); in btrfs_inode_ref_exists()
1392 btrfs_ino(BTRFS_I(dir)), in add_link()
1414 ret = btrfs_unlink_inode(trans, root, BTRFS_I(dir), BTRFS_I(other_inode), in add_link()
1429 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()
154 ret = btrfs_qgroup_reserve_data(BTRFS_I(inode), reserved, start, len); in btrfs_check_data_free_space()
197 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_free_reserved_data_space()
474 ret = btrfs_delalloc_reserve_metadata(BTRFS_I(inode), len); in btrfs_delalloc_reserve_space()
496 btrfs_delalloc_release_metadata(BTRFS_I(inode), len, qgroup_free); in btrfs_delalloc_release_space()
Ddelayed-inode.c1616 delayed_node = btrfs_get_delayed_node(BTRFS_I(inode)); in btrfs_readdir_get_delayed_items()
1758 btrfs_set_stack_inode_size(inode_item, BTRFS_I(inode)->disk_i_size); in fill_stack_inode_item()
1763 BTRFS_I(inode)->generation); in fill_stack_inode_item()
1768 btrfs_set_stack_inode_flags(inode_item, BTRFS_I(inode)->flags); in fill_stack_inode_item()
1787 BTRFS_I(inode)->i_otime.tv_sec); in fill_stack_inode_item()
1789 BTRFS_I(inode)->i_otime.tv_nsec); in fill_stack_inode_item()
1797 delayed_node = btrfs_get_delayed_node(BTRFS_I(inode)); in btrfs_fill_inode()
1812 btrfs_i_size_write(BTRFS_I(inode), btrfs_stack_inode_size(inode_item)); in btrfs_fill_inode()
1816 BTRFS_I(inode)->generation = btrfs_stack_inode_generation(inode_item); in btrfs_fill_inode()
1817 BTRFS_I(inode)->last_trans = btrfs_stack_inode_transid(inode_item); in btrfs_fill_inode()
[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()
Drelocation.c1629 struct btrfs_root *root = BTRFS_I(reloc_inode)->root; in get_new_location()
1639 bytenr -= BTRFS_I(reloc_inode)->index_cnt; in get_new_location()
1641 btrfs_ino(BTRFS_I(reloc_inode)), bytenr, 0); in get_new_location()
1731 } else if (inode && btrfs_ino(BTRFS_I(inode)) < key.objectid) { in replace_file_extents()
1735 if (inode && btrfs_ino(BTRFS_I(inode)) == key.objectid) { in replace_file_extents()
1742 ret = try_lock_extent(&BTRFS_I(inode)->io_tree, in replace_file_extents()
1747 btrfs_drop_extent_cache(BTRFS_I(inode), in replace_file_extents()
1749 unlock_extent(&BTRFS_I(inode)->io_tree, in replace_file_extents()
2142 ino = btrfs_ino(BTRFS_I(inode)); in invalidate_extent_cache()
2183 lock_extent(&BTRFS_I(inode)->io_tree, start, end); in invalidate_extent_cache()
[all …]
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()
1788 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; in find_lock_delalloc_range()
1948 clear_extent_bit(&BTRFS_I(inode)->io_tree, start, end, clear_bits, 1, 0, in extent_clear_unlock_delalloc()
2382 struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree; in btrfs_get_io_failure_record()
2383 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; in btrfs_get_io_failure_record()
2384 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree; in btrfs_get_io_failure_record()
2572 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; in bio_readpage_error()
2573 struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree; in bio_readpage_error()
2727 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()
395 btrfs_err(BTRFS_I(inode)->root->fs_info, in io_ctl_prepare_pages()
709 if (!BTRFS_I(inode)->generation) { in __load_free_space_cache()
716 if (BTRFS_I(inode)->generation != generation) { in __load_free_space_cache()
719 BTRFS_I(inode)->generation, generation); in __load_free_space_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()
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()
848 root = BTRFS_I(bvec->bv_page->mapping->host)->root; in btree_csum_one_bio()
882 int async = check_async_write(fs_info, BTRFS_I(inode)); in btree_submit_bio_hook()
953 fs_info = BTRFS_I(mapping->host)->root->fs_info; in btree_writepages()
967 tree = &BTRFS_I(page->mapping->host)->io_tree; in btree_readpage()
983 tree = &BTRFS_I(page->mapping->host)->io_tree; in btree_invalidatepage()
987 btrfs_warn(BTRFS_I(page->mapping->host)->root->fs_info, in btree_invalidatepage()
2110 RB_CLEAR_NODE(&BTRFS_I(inode)->rb_node); in btrfs_init_btree_inode()
2111 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()
1458 parent_root = BTRFS_I(parent_inode)->root; in create_pending_snapshot()
1466 ret = btrfs_set_inode_index(BTRFS_I(parent_inode), &index); in create_pending_snapshot()
1471 btrfs_ino(BTRFS_I(parent_inode)), in create_pending_snapshot()
1565 btrfs_ino(BTRFS_I(parent_inode)), index, in create_pending_snapshot()
1604 dentry->d_name.len, BTRFS_I(parent_inode), in create_pending_snapshot()
1613 btrfs_i_size_write(BTRFS_I(parent_inode), parent_inode->i_size + in create_pending_snapshot()
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.c1379 BTRFS_I(d_inode(dentry))->root->root_key.objectid); in btrfs_show_options()
1381 BTRFS_I(d_inode(dentry))->root->root_key.objectid); in btrfs_show_options()
1449 u64 root_objectid = BTRFS_I(root_inode)->root->root_key.objectid; in mount_subvol()
2152 BTRFS_I(d_inode(dentry))->root->root_key.objectid >> 32; in btrfs_statfs()
2154 BTRFS_I(d_inode(dentry))->root->root_key.objectid; in btrfs_statfs()
Dqgroup.c3823 &BTRFS_I(inode)->root->fs_info->flags)) in __btrfs_qgroup_release_data()
3829 return qgroup_free_reserved_data(BTRFS_I(inode), reserved, in __btrfs_qgroup_release_data()
3832 ret = clear_record_extent_bits(&BTRFS_I(inode)->io_tree, start, in __btrfs_qgroup_release_data()
3842 btrfs_qgroup_free_refroot(BTRFS_I(inode)->root->fs_info, in __btrfs_qgroup_release_data()
3843 BTRFS_I(inode)->root->root_key.objectid, in __btrfs_qgroup_release_data()
Dblock-group.c956 ret = btrfs_orphan_add(trans, BTRFS_I(inode)); in btrfs_remove_block_group()
2235 BTRFS_I(inode)->generation = 0; in cache_save_setup()
/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()

12