/Linux-v4.19/fs/btrfs/ |
D | inode.c | 143 BTRFS_I(inode)->io_tree.ops = &btrfs_extent_io_ops; in btrfs_test_inode_set_ops() 189 key.objectid = btrfs_ino(BTRFS_I(inode)); in insert_inline_extent() 250 BTRFS_I(inode)->disk_i_size = inode->i_size; in insert_inline_extent() 268 struct btrfs_root *root = BTRFS_I(inode)->root; in cow_file_range_inline() 303 trans->block_rsv = &BTRFS_I(inode)->block_rsv; in cow_file_range_inline() 334 set_bit(BTRFS_INODE_NEEDS_FULL_SYNC, &BTRFS_I(inode)->runtime_flags); in cow_file_range_inline() 335 btrfs_drop_extent_cache(BTRFS_I(inode), start, aligned_end - 1, 0); in cow_file_range_inline() 399 if (BTRFS_I(inode)->defrag_compress) in inode_need_compress() 402 if (BTRFS_I(inode)->flags & BTRFS_INODE_NOCOMPRESS) in inode_need_compress() 405 BTRFS_I(inode)->flags & BTRFS_INODE_COMPRESS || in inode_need_compress() [all …]
|
D | props.c | 131 set_bit(BTRFS_INODE_HAS_PROPS, &BTRFS_I(inode)->runtime_flags); in __btrfs_set_prop() 262 struct btrfs_root *root = BTRFS_I(inode)->root; in inode_prop_iterator() 269 handler->xattr_name, btrfs_ino(BTRFS_I(inode)), in inode_prop_iterator() 272 set_bit(BTRFS_INODE_HAS_PROPS, &BTRFS_I(inode)->runtime_flags); in inode_prop_iterator() 277 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_load_inode_props() 278 u64 ino = btrfs_ino(BTRFS_I(inode)); in btrfs_load_inode_props() 290 struct btrfs_root *root = BTRFS_I(inode)->root; in inherit_props() 296 &BTRFS_I(parent)->runtime_flags)) in inherit_props() 387 BTRFS_I(inode)->flags |= BTRFS_INODE_NOCOMPRESS; in prop_compression_apply() 388 BTRFS_I(inode)->flags &= ~BTRFS_INODE_COMPRESS; in prop_compression_apply() [all …]
|
D | export.c | 35 fid->objectid = btrfs_ino(BTRFS_I(inode)); in btrfs_encode_fh() 36 fid->root_objectid = BTRFS_I(inode)->root->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->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 …]
|
D | transaction.h | 151 spin_lock(&BTRFS_I(inode)->lock); in btrfs_set_inode_last_trans() 152 BTRFS_I(inode)->last_trans = trans->transaction->transid; in btrfs_set_inode_last_trans() 153 BTRFS_I(inode)->last_sub_trans = BTRFS_I(inode)->root->log_transid; in btrfs_set_inode_last_trans() 154 BTRFS_I(inode)->last_log_commit = BTRFS_I(inode)->root->last_log_commit; in btrfs_set_inode_last_trans() 155 spin_unlock(&BTRFS_I(inode)->lock); in btrfs_set_inode_last_trans()
|
D | xattr.c | 26 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_getxattr() 37 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 do_setxattr() 99 btrfs_ino(BTRFS_I(inode)), name, name_len, -1); in do_setxattr() 119 btrfs_ino(BTRFS_I(inode)), name, name_len, 0); in do_setxattr() 130 ret = btrfs_insert_xattr_item(trans, root, path, btrfs_ino(BTRFS_I(inode)), in do_setxattr() 226 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_setxattr() 245 set_bit(BTRFS_INODE_COPY_EVERYTHING, &BTRFS_I(inode)->runtime_flags); in btrfs_setxattr() 257 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_listxattr() 267 key.objectid = btrfs_ino(BTRFS_I(inode)); in btrfs_listxattr()
|
D | file.c | 306 clear_bit(BTRFS_INODE_IN_DEFRAG, &BTRFS_I(inode)->runtime_flags); in __btrfs_run_defrag_inode() 322 btrfs_requeue_inode_defrag(BTRFS_I(inode), defrag); in __btrfs_run_defrag_inode() 331 btrfs_requeue_inode_defrag(BTRFS_I(inode), defrag); in __btrfs_run_defrag_inode() 534 if (!btrfs_is_free_space_inode(BTRFS_I(inode))) { in btrfs_dirty_pages() 536 !(BTRFS_I(inode)->flags & BTRFS_INODE_PREALLOC)) { in btrfs_dirty_pages() 544 err = btrfs_find_new_delalloc_bytes(BTRFS_I(inode), in btrfs_dirty_pages() 751 u64 ino = btrfs_ino(BTRFS_I(inode)); in __btrfs_drop_extents() 769 btrfs_drop_extent_cache(BTRFS_I(inode), start, end - 1, 0); in __btrfs_drop_extents() 771 if (start >= BTRFS_I(inode)->disk_i_size && !replace_extent) in __btrfs_drop_extents() 1575 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_buffered_write() [all …]
|
D | ioctl.c | 138 struct btrfs_inode *binode = BTRFS_I(inode); in btrfs_sync_inode_flags_to_i_flags() 159 struct btrfs_inode *binode = BTRFS_I(file_inode(file)); in btrfs_ioctl_getflags() 187 struct btrfs_inode *binode = BTRFS_I(inode); in btrfs_ioctl_setflags() 374 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() 557 struct btrfs_root *root = BTRFS_I(dir)->root; in create_subvol() 683 ret = btrfs_set_inode_index(BTRFS_I(dir), &index); in create_subvol() 690 name, namelen, BTRFS_I(dir), &key, in create_subvol() 697 btrfs_i_size_write(BTRFS_I(dir), dir->i_size + namelen * 2); in create_subvol() 702 btrfs_ino(BTRFS_I(dir)), index, name, namelen); in create_subvol() [all …]
|
D | ordered-data.c | 176 struct btrfs_root *root = BTRFS_I(inode)->root; in __btrfs_add_ordered_extent() 181 tree = &BTRFS_I(inode)->ordered_tree; in __btrfs_add_ordered_extent() 236 spin_lock(&BTRFS_I(inode)->lock); in __btrfs_add_ordered_extent() 237 btrfs_mod_outstanding_extents(BTRFS_I(inode), 1); in __btrfs_add_ordered_extent() 238 spin_unlock(&BTRFS_I(inode)->lock); in __btrfs_add_ordered_extent() 279 tree = &BTRFS_I(inode)->ordered_tree; in btrfs_add_ordered_sum() 311 tree = &BTRFS_I(inode)->ordered_tree; in btrfs_dec_test_first_ordered_pending() 378 tree = &BTRFS_I(inode)->ordered_tree; in btrfs_dec_test_ordered_pending() 399 btrfs_crit(BTRFS_I(inode)->root->fs_info, in btrfs_dec_test_ordered_pending() 460 struct btrfs_inode *btrfs_inode = BTRFS_I(inode); in btrfs_remove_ordered_extent() [all …]
|
D | delayed-inode.c | 1574 delayed_node = btrfs_get_delayed_node(BTRFS_I(inode)); in btrfs_readdir_get_delayed_items() 1716 btrfs_set_stack_inode_size(inode_item, BTRFS_I(inode)->disk_i_size); in fill_stack_inode_item() 1721 BTRFS_I(inode)->generation); in fill_stack_inode_item() 1726 btrfs_set_stack_inode_flags(inode_item, BTRFS_I(inode)->flags); in fill_stack_inode_item() 1745 BTRFS_I(inode)->i_otime.tv_sec); in fill_stack_inode_item() 1747 BTRFS_I(inode)->i_otime.tv_nsec); in fill_stack_inode_item() 1755 delayed_node = btrfs_get_delayed_node(BTRFS_I(inode)); in btrfs_fill_inode() 1770 btrfs_i_size_write(BTRFS_I(inode), btrfs_stack_inode_size(inode_item)); in btrfs_fill_inode() 1774 BTRFS_I(inode)->generation = btrfs_stack_inode_generation(inode_item); in btrfs_fill_inode() 1775 BTRFS_I(inode)->last_trans = btrfs_stack_inode_transid(inode_item); in btrfs_fill_inode() [all …]
|
D | tree-log.c | 617 btrfs_ino(BTRFS_I(inode)), start, 0); in replay_one_extent() 863 ret = btrfs_unlink_inode(trans, root, dir, BTRFS_I(inode), name, in drop_one_dir_item() 1110 BTRFS_I(victim_parent), in __add_inode_ref() 1267 ret = btrfs_unlink_inode(trans, root, BTRFS_I(dir), in unlink_old_inode_refs() 1295 const u64 parent_id = btrfs_ino(BTRFS_I(dir)); in btrfs_inode_ref_exists() 1302 key.objectid = btrfs_ino(BTRFS_I(inode)); in btrfs_inode_ref_exists() 1309 ret = btrfs_search_slot(NULL, BTRFS_I(inode)->root, &key, path, 0, 0); in btrfs_inode_ref_exists() 1412 if (!inode_in_dir(root, path, btrfs_ino(BTRFS_I(dir)), in add_inode_ref() 1413 btrfs_ino(BTRFS_I(inode)), ref_index, in add_inode_ref() 1425 BTRFS_I(dir), in add_inode_ref() [all …]
|
D | relocation.c | 1556 struct btrfs_root *root = BTRFS_I(reloc_inode)->root; in get_new_location() 1566 bytenr -= BTRFS_I(reloc_inode)->index_cnt; in get_new_location() 1568 btrfs_ino(BTRFS_I(reloc_inode)), bytenr, 0); in get_new_location() 1656 } else if (inode && btrfs_ino(BTRFS_I(inode)) < key.objectid) { in replace_file_extents() 1660 if (inode && btrfs_ino(BTRFS_I(inode)) == key.objectid) { in replace_file_extents() 1667 ret = try_lock_extent(&BTRFS_I(inode)->io_tree, in replace_file_extents() 1672 btrfs_drop_extent_cache(BTRFS_I(inode), in replace_file_extents() 1674 unlock_extent(&BTRFS_I(inode)->io_tree, in replace_file_extents() 2053 ino = btrfs_ino(BTRFS_I(inode)); in invalidate_extent_cache() 2094 lock_extent(&BTRFS_I(inode)->io_tree, start, end); in invalidate_extent_cache() [all …]
|
D | btrfs_inode.h | 201 static inline struct btrfs_inode *BTRFS_I(const struct inode *inode) in BTRFS_I() function 220 unsigned long h = btrfs_inode_hash(inode->i_ino, BTRFS_I(inode)->root); in btrfs_insert_inode_hash()
|
D | compression.c | 137 ret = check_compressed_csum(BTRFS_I(inode), cb, in end_compressed_bio_read() 251 tree = &BTRFS_I(inode)->io_tree; in end_compressed_bio_write() 307 int skip_sum = BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM; in btrfs_submit_compressed_write() 426 em_tree = &BTRFS_I(inode)->extent_tree; in add_ra_bio_pages() 427 tree = &BTRFS_I(inode)->io_tree; in add_ra_bio_pages() 548 tree = &BTRFS_I(inode)->io_tree; in btrfs_submit_compressed_read() 549 em_tree = &BTRFS_I(inode)->extent_tree; in btrfs_submit_compressed_read() 640 if (!(BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM)) { in btrfs_submit_compressed_read() 667 if (!(BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM)) { in btrfs_submit_compressed_read()
|
D | extent_io.c | 1733 clear_extent_bit(&BTRFS_I(inode)->io_tree, start, end, clear_bits, 1, 0, in extent_clear_unlock_delalloc() 2167 struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree; in btrfs_get_io_failure_record() 2168 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; in btrfs_get_io_failure_record() 2169 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree; in btrfs_get_io_failure_record() 2359 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; in bio_readpage_error() 2360 struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree; in bio_readpage_error() 2412 tree = &BTRFS_I(page->mapping->host)->io_tree; in end_extent_writepage() 2524 tree = &BTRFS_I(inode)->io_tree; in end_bio_extent_readpage() 2525 failure_tree = &BTRFS_I(inode)->io_failure_tree; in end_bio_extent_readpage() 2555 clean_io_failure(BTRFS_I(inode)->root->fs_info, in end_bio_extent_readpage() [all …]
|
D | free-space-cache.c | 102 if (!((BTRFS_I(inode)->flags & flags) == flags)) { in lookup_free_space_inode() 104 BTRFS_I(inode)->flags |= BTRFS_INODE_NODATASUM | in lookup_free_space_inode() 218 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_truncate_free_space_cache() 248 btrfs_i_size_write(BTRFS_I(inode), 0); in btrfs_truncate_free_space_cache() 296 if (btrfs_ino(BTRFS_I(inode)) != BTRFS_FREE_INO_OBJECTID) in io_ctl_init() 377 btrfs_err(BTRFS_I(inode)->root->fs_info, in io_ctl_prepare_pages() 693 if (!BTRFS_I(inode)->generation) { in __load_free_space_cache() 700 if (BTRFS_I(inode)->generation != generation) { in __load_free_space_cache() 703 BTRFS_I(inode)->generation, generation); in __load_free_space_cache() 978 clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, inode->i_size - 1, in update_cache_item() [all …]
|
D | disk-io.c | 481 io_tree = &BTRFS_I(fs_info->btree_inode)->io_tree; in btree_read_extent_buffer_pages() 585 struct btrfs_root *root = BTRFS_I(page->mapping->host)->root; in btree_readpage_end_io_hook() 825 root = BTRFS_I(bvec->bv_page->mapping->host)->root; in btree_csum_one_bio() 861 int async = check_async_write(BTRFS_I(inode)); in btree_submit_bio_hook() 933 fs_info = BTRFS_I(mapping->host)->root->fs_info; in btree_writepages() 947 tree = &BTRFS_I(page->mapping->host)->io_tree; in btree_readpage() 963 tree = &BTRFS_I(page->mapping->host)->io_tree; in btree_invalidatepage() 967 btrfs_warn(BTRFS_I(page->mapping->host)->root->fs_info, in btree_invalidatepage() 1010 read_extent_buffer_pages(&BTRFS_I(btree_inode)->io_tree, in readahead_tree_block() 1020 struct extent_io_tree *io_tree = &BTRFS_I(btree_inode)->io_tree; in reada_tree_block_flagged() [all …]
|
D | inode-map.c | 446 BTRFS_I(inode)->generation = 0; in btrfs_save_ino_cache() 486 btrfs_delalloc_release_extents(BTRFS_I(inode), prealloc, true); in btrfs_save_ino_cache() 491 btrfs_delalloc_release_extents(BTRFS_I(inode), prealloc, false); in btrfs_save_ino_cache()
|
D | transaction.c | 928 atomic_inc(&BTRFS_I(fs_info->btree_inode)->sync_writers); in btrfs_write_marked_extents() 964 atomic_dec(&BTRFS_I(fs_info->btree_inode)->sync_writers); in btrfs_write_marked_extents() 1471 parent_root = BTRFS_I(parent_inode)->root; in create_pending_snapshot() 1479 ret = btrfs_set_inode_index(BTRFS_I(parent_inode), &index); in create_pending_snapshot() 1484 btrfs_ino(BTRFS_I(parent_inode)), in create_pending_snapshot() 1578 btrfs_ino(BTRFS_I(parent_inode)), index, in create_pending_snapshot() 1618 BTRFS_I(parent_inode), &key, in create_pending_snapshot() 1627 btrfs_i_size_write(BTRFS_I(parent_inode), parent_inode->i_size + in create_pending_snapshot()
|
D | qgroup.c | 2998 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_qgroup_reserve_data() 3021 ret = set_record_extent_bits(&BTRFS_I(inode)->io_tree, start, in btrfs_qgroup_reserve_data() 3040 clear_extent_bit(&BTRFS_I(inode)->io_tree, unode->val, in btrfs_qgroup_reserve_data() 3050 struct btrfs_root *root = BTRFS_I(inode)->root; in qgroup_free_reserved_data() 3086 ret = clear_record_extent_bits(&BTRFS_I(inode)->io_failure_tree, in qgroup_free_reserved_data() 3114 ret = clear_record_extent_bits(&BTRFS_I(inode)->io_tree, start, in __btrfs_qgroup_release_data() 3124 btrfs_qgroup_free_refroot(BTRFS_I(inode)->root->fs_info, in __btrfs_qgroup_release_data() 3125 BTRFS_I(inode)->root->objectid, in __btrfs_qgroup_release_data() 3345 ret = clear_record_extent_bits(&BTRFS_I(inode)->io_tree, 0, (u64)-1, in btrfs_qgroup_check_reserved_leak() 3352 btrfs_warn(BTRFS_I(inode)->root->fs_info, in btrfs_qgroup_check_reserved_leak() [all …]
|
D | file-item.c | 158 struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; in __btrfs_lookup_bio_sums() 203 if (btrfs_is_free_space_inode(BTRFS_I(inode))) { in __btrfs_lookup_bio_sums() 236 if (BTRFS_I(inode)->root->root_key.objectid == in __btrfs_lookup_bio_sums() 244 btrfs_ino(BTRFS_I(inode)), offset); in __btrfs_lookup_bio_sums()
|
D | super.c | 1364 BTRFS_I(d_inode(dentry))->root->root_key.objectid); in btrfs_show_options() 1429 u64 root_objectid = BTRFS_I(root_inode)->root->root_key.objectid; in mount_subvol() 2180 buf->f_fsid.val[0] ^= BTRFS_I(d_inode(dentry))->root->objectid >> 32; in btrfs_statfs() 2181 buf->f_fsid.val[1] ^= BTRFS_I(d_inode(dentry))->root->objectid; in btrfs_statfs()
|
D | extent-tree.c | 3369 BTRFS_I(inode)->generation = 0; in cache_save_setup() 4243 ret = btrfs_alloc_data_chunk_ondemand(BTRFS_I(inode), len); in btrfs_check_data_free_space() 4296 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_free_reserved_data_space() 6036 ret = btrfs_delalloc_reserve_metadata(BTRFS_I(inode), len); in btrfs_delalloc_reserve_space() 6058 btrfs_delalloc_release_metadata(BTRFS_I(inode), len, qgroup_free); in btrfs_delalloc_release_space() 10288 ret = btrfs_orphan_add(trans, BTRFS_I(inode)); in btrfs_remove_block_group()
|
D | send.c | 6599 struct btrfs_root *send_root = BTRFS_I(file_inode(mnt_file))->root; in btrfs_ioctl_send()
|
/Linux-v4.19/fs/btrfs/tests/ |
D | inode-tests.c | 235 BTRFS_I(inode)->location.type = BTRFS_INODE_ITEM_KEY; in test_btrfs_get_extent() 236 BTRFS_I(inode)->location.objectid = BTRFS_FIRST_FREE_OBJECTID; in test_btrfs_get_extent() 237 BTRFS_I(inode)->location.offset = 0; in test_btrfs_get_extent() 267 BTRFS_I(inode)->root = root; in test_btrfs_get_extent() 268 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, 0, sectorsize, 0); in test_btrfs_get_extent() 279 btrfs_drop_extent_cache(BTRFS_I(inode), 0, (u64)-1, 0); in test_btrfs_get_extent() 288 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, 0, (u64)-1, 0); in test_btrfs_get_extent() 310 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize, 0); in test_btrfs_get_extent() 338 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize, 0); in test_btrfs_get_extent() 361 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize, 0); in test_btrfs_get_extent() [all …]
|
/Linux-v4.19/include/trace/events/ |
D | btrfs.h | 146 __entry->ino = btrfs_ino(BTRFS_I(inode)); 148 __entry->disk_i_size = BTRFS_I(inode)->disk_i_size; 149 __entry->generation = BTRFS_I(inode)->generation; 150 __entry->last_trans = BTRFS_I(inode)->last_trans; 151 __entry->logged_trans = BTRFS_I(inode)->logged_trans; 153 BTRFS_I(inode)->root->root_key.objectid; 461 __entry->ino = btrfs_ino(BTRFS_I(inode)); 471 BTRFS_I(inode)->root->root_key.objectid; 546 __entry->ino = btrfs_ino(BTRFS_I(inode)); 557 BTRFS_I(inode)->root->root_key.objectid; [all …]
|