| /OK3568_Linux_fs/kernel/fs/btrfs/tests/ |
| H A 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() 263 BTRFS_I(inode)->root = root; in test_btrfs_get_extent() 264 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, 0, sectorsize); in test_btrfs_get_extent() 275 btrfs_drop_extent_cache(BTRFS_I(inode), 0, (u64)-1, 0); in test_btrfs_get_extent() 284 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, 0, (u64)-1); in test_btrfs_get_extent() 306 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize); in test_btrfs_get_extent() 334 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize); in test_btrfs_get_extent() 357 em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, offset, sectorsize); in test_btrfs_get_extent() [all …]
|
| H A D | extent-io-tests.c | 80 tmp = &BTRFS_I(inode)->io_tree; in test_find_delalloc()
|
| /OK3568_Linux_fs/kernel/fs/btrfs/ |
| H A D | inode.c | 188 key.objectid = btrfs_ino(BTRFS_I(inode)); in insert_inline_extent() 245 ret = btrfs_inode_set_file_extent_range(BTRFS_I(inode), start, size); in insert_inline_extent() 258 BTRFS_I(inode)->disk_i_size = inode->i_size; in insert_inline_extent() 494 inode_should_defrag(BTRFS_I(inode), start, end, end - start + 1, in compress_file_range() 537 (start > 0 || end + 1 < BTRFS_I(inode)->disk_i_size)) in compress_file_range() 550 if (inode_need_compress(BTRFS_I(inode), start, end)) { in compress_file_range() 559 if (BTRFS_I(inode)->defrag_compress) in compress_file_range() 560 compress_type = BTRFS_I(inode)->defrag_compress; in compress_file_range() 561 else if (BTRFS_I(inode)->prop_compress) in compress_file_range() 562 compress_type = BTRFS_I(inode)->prop_compress; in compress_file_range() [all …]
|
| H A D | props.c | 109 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 …]
|
| H A D | reflink.c | 20 struct btrfs_root *root = BTRFS_I(inode)->root; in clone_finish_inode_update() 175 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() 276 set_bit(BTRFS_INODE_NEEDS_FULL_SYNC, &BTRFS_I(dst)->runtime_flags); in clone_copy_inline_extent() 277 ret = btrfs_inode_set_file_extent_range(BTRFS_I(dst), 0, aligned_end); in clone_copy_inline_extent() 312 ret = copy_inline_to_page(BTRFS_I(dst), new_key->offset, in clone_copy_inline_extent() 357 key.objectid = btrfs_ino(BTRFS_I(src)); in btrfs_clone() 375 ret = btrfs_search_slot(NULL, BTRFS_I(src)->root, &key, path, in btrfs_clone() [all …]
|
| H A D | file.c | 297 clear_bit(BTRFS_INODE_IN_DEFRAG, &BTRFS_I(inode)->runtime_flags); in __btrfs_run_defrag_inode() 313 btrfs_requeue_inode_defrag(BTRFS_I(inode), defrag); in __btrfs_run_defrag_inode() 322 btrfs_requeue_inode_defrag(BTRFS_I(inode), defrag); in __btrfs_run_defrag_inode() 1023 ret = __btrfs_drop_extents(trans, root, BTRFS_I(inode), path, start, in btrfs_drop_extents() 1619 ret = btrfs_check_data_free_space(BTRFS_I(inode), in btrfs_buffered_write() 1623 if (btrfs_check_nocow_lock(BTRFS_I(inode), pos, in btrfs_buffered_write() 1645 ret = btrfs_delalloc_reserve_metadata(BTRFS_I(inode), in btrfs_buffered_write() 1649 btrfs_free_reserved_data_space(BTRFS_I(inode), in btrfs_buffered_write() 1653 btrfs_check_nocow_unlock(BTRFS_I(inode)); in btrfs_buffered_write() 1668 btrfs_delalloc_release_extents(BTRFS_I(inode), in btrfs_buffered_write() [all …]
|
| H A D | export.c | 35 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() 228 key.objectid = BTRFS_I(inode)->root->root_key.objectid; in btrfs_get_name() [all …]
|
| H A 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() 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() 278 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_listxattr() [all …]
|
| H A 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() 200 struct btrfs_inode *binode = BTRFS_I(inode); in btrfs_ioctl_setflags() 399 struct btrfs_inode *binode = BTRFS_I(file_inode(file)); in btrfs_ioctl_fsgetxattr() 412 struct btrfs_inode *binode = BTRFS_I(inode); in btrfs_ioctl_fssetxattr() 588 struct btrfs_root *root = BTRFS_I(dir)->root; in create_subvol() 734 ret = btrfs_set_inode_index(BTRFS_I(dir), &index); in create_subvol() 740 ret = btrfs_insert_dir_item(trans, name, namelen, BTRFS_I(dir), &key, in create_subvol() 747 btrfs_i_size_write(BTRFS_I(dir), dir->i_size + namelen * 2); in create_subvol() 755 btrfs_ino(BTRFS_I(dir)), index, name, namelen); in create_subvol() [all …]
|
| H A D | delayed-inode.c | 1601 delayed_node = btrfs_get_delayed_node(BTRFS_I(inode)); in btrfs_readdir_get_delayed_items() 1743 btrfs_set_stack_inode_size(inode_item, BTRFS_I(inode)->disk_i_size); in fill_stack_inode_item() 1748 BTRFS_I(inode)->generation); in fill_stack_inode_item() 1753 btrfs_set_stack_inode_flags(inode_item, BTRFS_I(inode)->flags); in fill_stack_inode_item() 1772 BTRFS_I(inode)->i_otime.tv_sec); in fill_stack_inode_item() 1774 BTRFS_I(inode)->i_otime.tv_nsec); in fill_stack_inode_item() 1779 struct btrfs_fs_info *fs_info = BTRFS_I(inode)->root->fs_info; in btrfs_fill_inode() 1783 delayed_node = btrfs_get_delayed_node(BTRFS_I(inode)); in btrfs_fill_inode() 1798 btrfs_i_size_write(BTRFS_I(inode), btrfs_stack_inode_size(inode_item)); in btrfs_fill_inode() 1799 btrfs_inode_set_file_extent_range(BTRFS_I(inode), 0, in btrfs_fill_inode() [all …]
|
| H A D | tree-log.c | 625 btrfs_ino(BTRFS_I(inode)), start, 0); in replay_one_extent() 828 ret = btrfs_inode_set_file_extent_range(BTRFS_I(inode), start, in replay_one_extent() 884 ret = btrfs_unlink_inode(trans, root, dir, BTRFS_I(inode), name, in drop_one_dir_item() 1125 BTRFS_I(victim_parent), in __add_inode_ref() 1287 ret = btrfs_unlink_inode(trans, root, BTRFS_I(dir), in unlink_old_inode_refs() 1324 const u64 parent_id = btrfs_ino(BTRFS_I(dir)); in btrfs_inode_ref_exists() 1331 key.objectid = btrfs_ino(BTRFS_I(inode)); in btrfs_inode_ref_exists() 1338 ret = btrfs_search_slot(NULL, BTRFS_I(inode)->root, &key, path, 0, 0); in btrfs_inode_ref_exists() 1372 btrfs_ino(BTRFS_I(dir)), in add_link() 1394 ret = btrfs_unlink_inode(trans, root, BTRFS_I(dir), BTRFS_I(other_inode), in add_link() [all …]
|
| H A D | relocation.c | 997 struct btrfs_root *root = BTRFS_I(reloc_inode)->root; in get_new_location() 1007 bytenr -= BTRFS_I(reloc_inode)->index_cnt; in get_new_location() 1009 btrfs_ino(BTRFS_I(reloc_inode)), bytenr, 0); in get_new_location() 1100 } else if (inode && btrfs_ino(BTRFS_I(inode)) < key.objectid) { in replace_file_extents() 1104 if (inode && btrfs_ino(BTRFS_I(inode)) == key.objectid) { in replace_file_extents() 1111 ret = try_lock_extent(&BTRFS_I(inode)->io_tree, in replace_file_extents() 1116 btrfs_drop_extent_cache(BTRFS_I(inode), in replace_file_extents() 1118 unlock_extent(&BTRFS_I(inode)->io_tree, in replace_file_extents() 1513 ino = btrfs_ino(BTRFS_I(inode)); in invalidate_extent_cache() 1554 lock_extent(&BTRFS_I(inode)->io_tree, start, end); in invalidate_extent_cache() [all …]
|
| H A D | btrfs_inode.h | 240 static inline struct btrfs_inode *BTRFS_I(const struct inode *inode) in BTRFS_I() function 259 unsigned long h = btrfs_inode_hash(inode->i_ino, BTRFS_I(inode)->root); in btrfs_insert_inode_hash() 297 return btrfs_ino(BTRFS_I(inode)) != BTRFS_BTREE_INODE_OBJECTID; in is_data_inode()
|
| H A D | file-item.c | 43 struct btrfs_fs_info *fs_info = BTRFS_I(inode)->root->fs_info; in btrfs_inode_safe_disk_i_size_write() 49 BTRFS_I(inode)->disk_i_size = i_size; in btrfs_inode_safe_disk_i_size_write() 53 spin_lock(&BTRFS_I(inode)->lock); in btrfs_inode_safe_disk_i_size_write() 54 ret = find_contiguous_extent_bit(&BTRFS_I(inode)->file_extent_tree, 0, in btrfs_inode_safe_disk_i_size_write() 60 BTRFS_I(inode)->disk_i_size = i_size; in btrfs_inode_safe_disk_i_size_write() 61 spin_unlock(&BTRFS_I(inode)->lock); in btrfs_inode_safe_disk_i_size_write() 262 struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; in btrfs_lookup_bio_sums() 307 if (btrfs_is_free_space_inode(BTRFS_I(inode))) { in btrfs_lookup_bio_sums() 321 count = btrfs_find_ordered_sum(BTRFS_I(inode), offset, in btrfs_lookup_bio_sums() 338 if (BTRFS_I(inode)->root->root_key.objectid == in btrfs_lookup_bio_sums() [all …]
|
| H A D | inode-map.c | 465 BTRFS_I(inode)->generation = 0; in btrfs_save_ino_cache() 498 ret = btrfs_delalloc_reserve_space(BTRFS_I(inode), &data_reserved, 0, in btrfs_save_ino_cache() 506 btrfs_delalloc_release_extents(BTRFS_I(inode), prealloc); in btrfs_save_ino_cache() 507 btrfs_delalloc_release_metadata(BTRFS_I(inode), prealloc, true); in btrfs_save_ino_cache() 512 btrfs_delalloc_release_extents(BTRFS_I(inode), prealloc); in btrfs_save_ino_cache()
|
| H A D | free-space-cache.c | 118 if (!((BTRFS_I(inode)->flags & flags) == flags)) { in lookup_free_space_inode() 120 BTRFS_I(inode)->flags |= BTRFS_INODE_NODATASUM | in lookup_free_space_inode() 233 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_truncate_free_space_cache() 263 btrfs_i_size_write(BTRFS_I(inode), 0); in btrfs_truncate_free_space_cache() 311 if (btrfs_ino(BTRFS_I(inode)) != BTRFS_FREE_INO_OBJECTID) in io_ctl_init() 392 btrfs_err(BTRFS_I(inode)->root->fs_info, in io_ctl_prepare_pages() 398 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 …]
|
| H A D | extent_io.c | 116 btrfs_debug_rl(BTRFS_I(inode)->root->fs_info, in __btrfs_debug_check_extent_io_range() 118 caller, btrfs_ino(BTRFS_I(inode)), isize, start, end); in __btrfs_debug_check_extent_io_range() 1864 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; in find_lock_delalloc_range() 2457 struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree; in btrfs_get_io_failure_record() 2458 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; in btrfs_get_io_failure_record() 2459 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree; in btrfs_get_io_failure_record() 2650 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; in btrfs_submit_read_repair() 2651 struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree; in btrfs_submit_read_repair() 2825 tree = &BTRFS_I(inode)->io_tree; in end_bio_extent_readpage() 2826 failure_tree = &BTRFS_I(inode)->io_failure_tree; in end_bio_extent_readpage() [all …]
|
| H A D | compression.c | 227 ret = check_compressed_csum(BTRFS_I(inode), bio, in end_compressed_bio_read() 520 em_tree = &BTRFS_I(inode)->extent_tree; in add_ra_bio_pages() 521 tree = &BTRFS_I(inode)->io_tree; in add_ra_bio_pages() 639 em_tree = &BTRFS_I(inode)->extent_tree; in btrfs_submit_compressed_read() 730 if (!(BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM)) { in btrfs_submit_compressed_read() 759 if (!(BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM)) { in btrfs_submit_compressed_read()
|
| H A D | transaction.c | 1017 atomic_inc(&BTRFS_I(fs_info->btree_inode)->sync_writers); in btrfs_write_marked_extents() 1053 atomic_dec(&BTRFS_I(fs_info->btree_inode)->sync_writers); in btrfs_write_marked_extents() 1567 parent_root = BTRFS_I(parent_inode)->root; in create_pending_snapshot() 1575 ret = btrfs_set_inode_index(BTRFS_I(parent_inode), &index); in create_pending_snapshot() 1580 btrfs_ino(BTRFS_I(parent_inode)), in create_pending_snapshot() 1674 btrfs_ino(BTRFS_I(parent_inode)), index, in create_pending_snapshot() 1714 dentry->d_name.len, BTRFS_I(parent_inode), in create_pending_snapshot() 1723 btrfs_i_size_write(BTRFS_I(parent_inode), parent_inode->i_size + in create_pending_snapshot()
|
| H A D | ordered-data.c | 293 tree = &BTRFS_I(entry->inode)->ordered_tree; in btrfs_add_ordered_sum() 444 trace_btrfs_ordered_extent_put(BTRFS_I(entry->inode), entry); in btrfs_put_ordered_extent() 656 struct btrfs_inode *inode = BTRFS_I(entry->inode); in btrfs_start_ordered_extent() 710 ordered = btrfs_lookup_first_ordered_extent(BTRFS_I(inode), end); in btrfs_wait_ordered_range()
|
| H A D | disk-io.c | 406 io_tree = &BTRFS_I(fs_info->btree_inode)->io_tree; in btree_read_extent_buffer_pages() 787 root = BTRFS_I(bvec->bv_page->mapping->host)->root; in btree_csum_one_bio() 820 int async = check_async_write(fs_info, BTRFS_I(inode)); in btrfs_submit_metadata_bio() 891 fs_info = BTRFS_I(mapping->host)->root->fs_info; in btree_writepages() 914 tree = &BTRFS_I(page->mapping->host)->io_tree; in btree_invalidatepage() 918 btrfs_warn(BTRFS_I(page->mapping->host)->root->fs_info, in btree_invalidatepage() 2129 RB_CLEAR_NODE(&BTRFS_I(inode)->rb_node); in btrfs_init_btree_inode() 2130 extent_io_tree_init(fs_info, &BTRFS_I(inode)->io_tree, in btrfs_init_btree_inode() 2132 BTRFS_I(inode)->io_tree.track_uptodate = false; in btrfs_init_btree_inode() 2133 extent_map_tree_init(&BTRFS_I(inode)->extent_tree); in btrfs_init_btree_inode() [all …]
|
| H A D | super.c | 1501 BTRFS_I(d_inode(dentry))->root->root_key.objectid); in btrfs_show_options() 1503 BTRFS_I(d_inode(dentry))->root->root_key.objectid); in btrfs_show_options() 1571 u64 root_objectid = BTRFS_I(root_inode)->root->root_key.objectid; in mount_subvol() 2286 BTRFS_I(d_inode(dentry))->root->root_key.objectid >> 32; in btrfs_statfs() 2288 BTRFS_I(d_inode(dentry))->root->root_key.objectid; in btrfs_statfs()
|
| H A D | block-group.c | 983 ret = btrfs_orphan_add(trans, BTRFS_I(inode)); in btrfs_remove_block_group() 2416 BTRFS_I(inode)->generation = 0; in cache_save_setup() 2489 ret = btrfs_check_data_free_space(BTRFS_I(inode), &data_reserved, 0, in cache_save_setup()
|
| H A D | send.c | 7241 struct btrfs_root *send_root = BTRFS_I(file_inode(mnt_file))->root; in btrfs_ioctl_send()
|
| /OK3568_Linux_fs/kernel/include/trace/events/ |
| H A D | btrfs.h | 220 __entry->ino = btrfs_ino(BTRFS_I(inode)); 222 __entry->disk_i_size = BTRFS_I(inode)->disk_i_size; 223 __entry->generation = BTRFS_I(inode)->generation; 224 __entry->last_trans = BTRFS_I(inode)->last_trans; 225 __entry->logged_trans = BTRFS_I(inode)->logged_trans; 227 BTRFS_I(inode)->root->root_key.objectid; 618 __entry->ino = btrfs_ino(BTRFS_I(inode)); 629 BTRFS_I(inode)->root->root_key.objectid; 669 __entry->ino = btrfs_ino(BTRFS_I(page->mapping->host)); 675 BTRFS_I(page->mapping->host)->root->root_key.objectid; [all …]
|