/linux-4.19.296/fs/btrfs/ |
D | inode.c | 154 BTRFS_I(inode)->io_tree.ops = &btrfs_extent_io_ops; in btrfs_test_inode_set_ops() 200 key.objectid = btrfs_ino(BTRFS_I(inode)); in insert_inline_extent() 261 BTRFS_I(inode)->disk_i_size = inode->i_size; in insert_inline_extent() 279 struct btrfs_root *root = BTRFS_I(inode)->root; in cow_file_range_inline() 314 trans->block_rsv = &BTRFS_I(inode)->block_rsv; in cow_file_range_inline() 345 set_bit(BTRFS_INODE_NEEDS_FULL_SYNC, &BTRFS_I(inode)->runtime_flags); in cow_file_range_inline() 346 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 …]
|
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() 383 BTRFS_I(inode)->flags |= BTRFS_INODE_NOCOMPRESS; in prop_compression_apply() 384 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 | 153 spin_lock(&BTRFS_I(inode)->lock); in btrfs_set_inode_last_trans() 154 BTRFS_I(inode)->last_trans = trans->transaction->transid; in btrfs_set_inode_last_trans() 155 BTRFS_I(inode)->last_sub_trans = BTRFS_I(inode)->root->log_transid; in btrfs_set_inode_last_trans() 156 BTRFS_I(inode)->last_log_commit = BTRFS_I(inode)->root->last_log_commit; in btrfs_set_inode_last_trans() 157 spin_unlock(&BTRFS_I(inode)->lock); in btrfs_set_inode_last_trans()
|
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() 538 clear_extent_bit(&BTRFS_I(inode)->io_tree, start_pos, end_of_last_block, in btrfs_dirty_pages() 542 if (!btrfs_is_free_space_inode(BTRFS_I(inode))) { in btrfs_dirty_pages() 544 !(BTRFS_I(inode)->flags & BTRFS_INODE_PREALLOC)) { in btrfs_dirty_pages() 552 err = btrfs_find_new_delalloc_bytes(BTRFS_I(inode), in btrfs_dirty_pages() 759 u64 ino = btrfs_ino(BTRFS_I(inode)); in __btrfs_drop_extents() 777 btrfs_drop_extent_cache(BTRFS_I(inode), start, end - 1, 0); in __btrfs_drop_extents() 779 if (start >= BTRFS_I(inode)->disk_i_size && !replace_extent) in __btrfs_drop_extents() [all …]
|
D | xattr.c | 27 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() 84 struct btrfs_root *root = BTRFS_I(inode)->root; in do_setxattr() 100 btrfs_ino(BTRFS_I(inode)), name, name_len, -1); in do_setxattr() 120 btrfs_ino(BTRFS_I(inode)), name, name_len, 0); in do_setxattr() 131 ret = btrfs_insert_xattr_item(trans, root, path, btrfs_ino(BTRFS_I(inode)), in do_setxattr() 227 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_setxattr() 246 set_bit(BTRFS_INODE_COPY_EVERYTHING, &BTRFS_I(inode)->runtime_flags); in btrfs_setxattr() 258 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_listxattr() 268 key.objectid = btrfs_ino(BTRFS_I(inode)); in btrfs_listxattr() [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() 570 struct btrfs_root *root = BTRFS_I(dir)->root; in create_subvol() 708 ret = btrfs_set_inode_index(BTRFS_I(dir), &index); in create_subvol() 715 name, namelen, BTRFS_I(dir), &key, in create_subvol() 722 btrfs_i_size_write(BTRFS_I(dir), dir->i_size + namelen * 2); in create_subvol() 730 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 | 1605 delayed_node = btrfs_get_delayed_node(BTRFS_I(inode)); in btrfs_readdir_get_delayed_items() 1747 btrfs_set_stack_inode_size(inode_item, BTRFS_I(inode)->disk_i_size); in fill_stack_inode_item() 1752 BTRFS_I(inode)->generation); in fill_stack_inode_item() 1757 btrfs_set_stack_inode_flags(inode_item, BTRFS_I(inode)->flags); in fill_stack_inode_item() 1776 BTRFS_I(inode)->i_otime.tv_sec); in fill_stack_inode_item() 1778 BTRFS_I(inode)->i_otime.tv_nsec); in fill_stack_inode_item() 1786 delayed_node = btrfs_get_delayed_node(BTRFS_I(inode)); in btrfs_fill_inode() 1801 btrfs_i_size_write(BTRFS_I(inode), btrfs_stack_inode_size(inode_item)); in btrfs_fill_inode() 1805 BTRFS_I(inode)->generation = btrfs_stack_inode_generation(inode_item); in btrfs_fill_inode() 1806 BTRFS_I(inode)->last_trans = btrfs_stack_inode_transid(inode_item); in btrfs_fill_inode() [all …]
|
D | tree-log.c | 624 btrfs_ino(BTRFS_I(inode)), start, 0); in replay_one_extent() 871 ret = btrfs_unlink_inode(trans, root, dir, BTRFS_I(inode), name, in drop_one_dir_item() 1128 BTRFS_I(victim_parent), in __add_inode_ref() 1290 ret = btrfs_unlink_inode(trans, root, BTRFS_I(dir), in unlink_old_inode_refs() 1327 const u64 parent_id = btrfs_ino(BTRFS_I(dir)); in btrfs_inode_ref_exists() 1334 key.objectid = btrfs_ino(BTRFS_I(inode)); in btrfs_inode_ref_exists() 1341 ret = btrfs_search_slot(NULL, BTRFS_I(inode)->root, &key, path, 0, 0); in btrfs_inode_ref_exists() 1443 ret = inode_in_dir(root, path, btrfs_ino(BTRFS_I(dir)), in add_inode_ref() 1444 btrfs_ino(BTRFS_I(inode)), ref_index, in add_inode_ref() 1459 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 | 208 static inline struct btrfs_inode *BTRFS_I(const struct inode *inode) in BTRFS_I() function 227 unsigned long h = btrfs_inode_hash(inode->i_ino, BTRFS_I(inode)->root); in btrfs_insert_inode_hash()
|
D | compression.c | 153 ret = check_compressed_csum(BTRFS_I(inode), cb, in end_compressed_bio_read() 267 tree = &BTRFS_I(inode)->io_tree; in end_compressed_bio_write() 322 int skip_sum = BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM; in btrfs_submit_compressed_write() 441 em_tree = &BTRFS_I(inode)->extent_tree; in add_ra_bio_pages() 442 tree = &BTRFS_I(inode)->io_tree; in add_ra_bio_pages() 563 tree = &BTRFS_I(inode)->io_tree; in btrfs_submit_compressed_read() 564 em_tree = &BTRFS_I(inode)->extent_tree; in btrfs_submit_compressed_read() 655 if (!(BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM)) { in btrfs_submit_compressed_read() 682 if (!(BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM)) { in btrfs_submit_compressed_read()
|
D | inode-map.c | 462 BTRFS_I(inode)->generation = 0; in btrfs_save_ino_cache() 502 btrfs_delalloc_release_extents(BTRFS_I(inode), prealloc); in btrfs_save_ino_cache() 503 btrfs_delalloc_release_metadata(BTRFS_I(inode), prealloc, true); in btrfs_save_ino_cache() 508 btrfs_delalloc_release_extents(BTRFS_I(inode), prealloc); in btrfs_save_ino_cache()
|
D | free-space-cache.c | 111 if (!((BTRFS_I(inode)->flags & flags) == flags)) { in lookup_free_space_inode() 113 BTRFS_I(inode)->flags |= BTRFS_INODE_NODATASUM | in lookup_free_space_inode() 227 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_truncate_free_space_cache() 257 btrfs_i_size_write(BTRFS_I(inode), 0); in btrfs_truncate_free_space_cache() 305 if (btrfs_ino(BTRFS_I(inode)) != BTRFS_FREE_INO_OBJECTID) in io_ctl_init() 386 btrfs_err(BTRFS_I(inode)->root->fs_info, in io_ctl_prepare_pages() 392 btrfs_err(BTRFS_I(inode)->root->fs_info, in io_ctl_prepare_pages() 708 if (!BTRFS_I(inode)->generation) { in __load_free_space_cache() 715 if (BTRFS_I(inode)->generation != generation) { in __load_free_space_cache() 718 BTRFS_I(inode)->generation, generation); in __load_free_space_cache() [all …]
|
D | extent_io.c | 1788 clear_extent_bit(&BTRFS_I(inode)->io_tree, start, end, clear_bits, 1, 0, in extent_clear_unlock_delalloc() 2222 struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree; in btrfs_get_io_failure_record() 2223 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; in btrfs_get_io_failure_record() 2224 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree; in btrfs_get_io_failure_record() 2414 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; in bio_readpage_error() 2415 struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree; in bio_readpage_error() 2467 tree = &BTRFS_I(page->mapping->host)->io_tree; in end_extent_writepage() 2579 tree = &BTRFS_I(inode)->io_tree; in end_bio_extent_readpage() 2580 failure_tree = &BTRFS_I(inode)->io_failure_tree; in end_bio_extent_readpage() 2610 clean_io_failure(BTRFS_I(inode)->root->fs_info, in end_bio_extent_readpage() [all …]
|
D | disk-io.c | 491 io_tree = &BTRFS_I(fs_info->btree_inode)->io_tree; in btree_read_extent_buffer_pages() 587 struct btrfs_root *root = BTRFS_I(page->mapping->host)->root; in btree_readpage_end_io_hook() 827 root = BTRFS_I(bvec->bv_page->mapping->host)->root; in btree_csum_one_bio() 863 int async = check_async_write(BTRFS_I(inode)); in btree_submit_bio_hook() 935 fs_info = BTRFS_I(mapping->host)->root->fs_info; in btree_writepages() 949 tree = &BTRFS_I(page->mapping->host)->io_tree; in btree_readpage() 965 tree = &BTRFS_I(page->mapping->host)->io_tree; in btree_invalidatepage() 969 btrfs_warn(BTRFS_I(page->mapping->host)->root->fs_info, in btree_invalidatepage() 1014 ret = read_extent_buffer_pages(&BTRFS_I(btree_inode)->io_tree, buf, in readahead_tree_block() 1027 struct extent_io_tree *io_tree = &BTRFS_I(btree_inode)->io_tree; in reada_tree_block_flagged() [all …]
|
D | qgroup.c | 3073 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_qgroup_reserve_data() 3096 ret = set_record_extent_bits(&BTRFS_I(inode)->io_tree, start, in btrfs_qgroup_reserve_data() 3115 clear_extent_bit(&BTRFS_I(inode)->io_tree, unode->val, in btrfs_qgroup_reserve_data() 3128 struct btrfs_root *root = BTRFS_I(inode)->root; in qgroup_free_reserved_data() 3164 ret = clear_record_extent_bits(&BTRFS_I(inode)->io_tree, in qgroup_free_reserved_data() 3188 &BTRFS_I(inode)->root->fs_info->flags)) in __btrfs_qgroup_release_data() 3196 ret = clear_record_extent_bits(&BTRFS_I(inode)->io_tree, start, in __btrfs_qgroup_release_data() 3206 btrfs_qgroup_free_refroot(BTRFS_I(inode)->root->fs_info, in __btrfs_qgroup_release_data() 3207 BTRFS_I(inode)->root->objectid, in __btrfs_qgroup_release_data() 3427 ret = clear_record_extent_bits(&BTRFS_I(inode)->io_tree, 0, (u64)-1, in btrfs_qgroup_check_reserved_leak() [all …]
|
D | transaction.c | 957 atomic_inc(&BTRFS_I(fs_info->btree_inode)->sync_writers); in btrfs_write_marked_extents() 993 atomic_dec(&BTRFS_I(fs_info->btree_inode)->sync_writers); in btrfs_write_marked_extents() 1503 parent_root = BTRFS_I(parent_inode)->root; in create_pending_snapshot() 1511 ret = btrfs_set_inode_index(BTRFS_I(parent_inode), &index); in create_pending_snapshot() 1516 btrfs_ino(BTRFS_I(parent_inode)), in create_pending_snapshot() 1610 btrfs_ino(BTRFS_I(parent_inode)), index, in create_pending_snapshot() 1650 BTRFS_I(parent_inode), &key, in create_pending_snapshot() 1659 btrfs_i_size_write(BTRFS_I(parent_inode), parent_inode->i_size + in create_pending_snapshot()
|
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 | 1370 BTRFS_I(d_inode(dentry))->root->root_key.objectid); in btrfs_show_options() 1372 BTRFS_I(d_inode(dentry))->root->root_key.objectid); in btrfs_show_options() 1440 u64 root_objectid = BTRFS_I(root_inode)->root->root_key.objectid; in mount_subvol() 2212 buf->f_fsid.val[0] ^= BTRFS_I(d_inode(dentry))->root->objectid >> 32; in btrfs_statfs() 2213 buf->f_fsid.val[1] ^= BTRFS_I(d_inode(dentry))->root->objectid; in btrfs_statfs()
|
D | extent-tree.c | 3377 BTRFS_I(inode)->generation = 0; in cache_save_setup() 4250 ret = btrfs_alloc_data_chunk_ondemand(BTRFS_I(inode), len); in btrfs_check_data_free_space() 4303 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_free_reserved_data_space() 6041 ret = btrfs_delalloc_reserve_metadata(BTRFS_I(inode), len); in btrfs_delalloc_reserve_space() 6063 btrfs_delalloc_release_metadata(BTRFS_I(inode), len, qgroup_free); in btrfs_delalloc_release_space() 10330 ret = btrfs_orphan_add(trans, BTRFS_I(inode)); in btrfs_remove_block_group()
|
D | send.c | 6794 struct btrfs_root *send_root = BTRFS_I(file_inode(mnt_file))->root; in btrfs_ioctl_send()
|
/linux-4.19.296/fs/btrfs/tests/ |
D | inode-tests.c | 236 BTRFS_I(inode)->location.type = BTRFS_INODE_ITEM_KEY; in test_btrfs_get_extent() 237 BTRFS_I(inode)->location.objectid = BTRFS_FIRST_FREE_OBJECTID; in test_btrfs_get_extent() 238 BTRFS_I(inode)->location.offset = 0; in test_btrfs_get_extent() 268 BTRFS_I(inode)->root = root; in test_btrfs_get_extent() 269 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, 0, sectorsize, 0); in test_btrfs_get_extent() 280 btrfs_drop_extent_cache(BTRFS_I(inode), 0, (u64)-1, 0); in test_btrfs_get_extent() 289 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, 0, (u64)-1, 0); in test_btrfs_get_extent() 311 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize, 0); in test_btrfs_get_extent() 339 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize, 0); in test_btrfs_get_extent() 362 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize, 0); in test_btrfs_get_extent() [all …]
|
/linux-4.19.296/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 …]
|