Home
last modified time | relevance | path

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

/linux-4.1.27/fs/btrfs/
Dbtrfs_inode.h204 static inline struct btrfs_inode *BTRFS_I(struct inode *inode) in BTRFS_I() function
223 unsigned long h = btrfs_inode_hash(inode->i_ino, BTRFS_I(inode)->root); in btrfs_insert_inode_hash()
230 u64 ino = BTRFS_I(inode)->location.objectid; in btrfs_ino()
236 if (!ino || BTRFS_I(inode)->location.type == BTRFS_ROOT_ITEM_KEY) in btrfs_ino()
244 BTRFS_I(inode)->disk_i_size = size; in btrfs_i_size_write()
249 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_is_free_space_inode()
254 if (BTRFS_I(inode)->location.objectid == BTRFS_FREE_INO_OBJECTID) in btrfs_is_free_space_inode()
263 spin_lock(&BTRFS_I(inode)->lock); in btrfs_inode_in_log()
264 if (BTRFS_I(inode)->logged_trans == generation && in btrfs_inode_in_log()
265 BTRFS_I(inode)->last_sub_trans <= in btrfs_inode_in_log()
[all …]
Dinode.c115 BTRFS_I(inode)->io_tree.ops = &btrfs_extent_io_ops; in btrfs_test_inode_set_ops()
225 BTRFS_I(inode)->disk_i_size = inode->i_size; in insert_inline_extent()
309 set_bit(BTRFS_INODE_NEEDS_FULL_SYNC, &BTRFS_I(inode)->runtime_flags); in cow_file_range_inline()
361 struct btrfs_root *root = BTRFS_I(inode)->root; in inode_need_compress()
367 if (BTRFS_I(inode)->flags & BTRFS_INODE_NOCOMPRESS) in inode_need_compress()
370 BTRFS_I(inode)->flags & BTRFS_INODE_COMPRESS || in inode_need_compress()
371 BTRFS_I(inode)->force_compress) in inode_need_compress()
399 struct btrfs_root *root = BTRFS_I(inode)->root; in compress_file_range()
419 (start > 0 || end + 1 < BTRFS_I(inode)->disk_i_size)) in compress_file_range()
448 (start > 0 || end + 1 < BTRFS_I(inode)->disk_i_size)) in compress_file_range()
[all …]
Dprops.c145 set_bit(BTRFS_INODE_HAS_PROPS, &BTRFS_I(inode)->runtime_flags); in __btrfs_set_prop()
276 struct btrfs_root *root = BTRFS_I(inode)->root; in inode_prop_iterator()
286 set_bit(BTRFS_INODE_HAS_PROPS, &BTRFS_I(inode)->runtime_flags); in inode_prop_iterator()
291 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_load_inode_props()
305 struct btrfs_root *root = BTRFS_I(inode)->root; in inherit_props()
309 &BTRFS_I(parent)->runtime_flags)) in inherit_props()
396 BTRFS_I(inode)->flags |= BTRFS_INODE_NOCOMPRESS; in prop_compression_apply()
397 BTRFS_I(inode)->flags &= ~BTRFS_INODE_COMPRESS; in prop_compression_apply()
398 BTRFS_I(inode)->force_compress = BTRFS_COMPRESS_NONE; in prop_compression_apply()
410 BTRFS_I(inode)->flags &= ~BTRFS_INODE_NOCOMPRESS; in prop_compression_apply()
[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.c98 struct btrfs_root *root = BTRFS_I(inode)->root; in __btrfs_add_inode_defrag()
126 set_bit(BTRFS_INODE_IN_DEFRAG, &BTRFS_I(inode)->runtime_flags); in __btrfs_add_inode_defrag()
150 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_add_inode_defrag()
158 if (test_bit(BTRFS_INODE_IN_DEFRAG, &BTRFS_I(inode)->runtime_flags)) in btrfs_add_inode_defrag()
164 transid = BTRFS_I(inode)->root->last_trans; in btrfs_add_inode_defrag()
175 if (!test_bit(BTRFS_INODE_IN_DEFRAG, &BTRFS_I(inode)->runtime_flags)) { in btrfs_add_inode_defrag()
199 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_requeue_inode_defrag()
320 clear_bit(BTRFS_INODE_IN_DEFRAG, &BTRFS_I(inode)->runtime_flags); in __btrfs_run_defrag_inode()
537 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree; in btrfs_drop_extent_cache()
722 if (start >= BTRFS_I(inode)->disk_i_size && !replace_extent) in __btrfs_drop_extents()
[all …]
Dordered-data.c188 struct btrfs_root *root = BTRFS_I(inode)->root; in __btrfs_add_ordered_extent()
193 tree = &BTRFS_I(inode)->ordered_tree; in __btrfs_add_ordered_extent()
201 if (!(BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM) && in __btrfs_add_ordered_extent()
286 tree = &BTRFS_I(inode)->ordered_tree; in btrfs_add_ordered_sum()
321 tree = &BTRFS_I(inode)->ordered_tree; in btrfs_dec_test_first_ordered_pending()
340 btrfs_crit(BTRFS_I(inode)->root->fs_info, in btrfs_dec_test_first_ordered_pending()
345 btrfs_crit(BTRFS_I(inode)->root->fs_info, in btrfs_dec_test_first_ordered_pending()
388 tree = &BTRFS_I(inode)->ordered_tree; in btrfs_dec_test_ordered_pending()
409 btrfs_crit(BTRFS_I(inode)->root->fs_info, in btrfs_dec_test_ordered_pending()
444 tree = &BTRFS_I(inode)->ordered_tree; in btrfs_get_logged_extents()
[all …]
Dioctl.c138 struct btrfs_inode *ip = BTRFS_I(inode); in btrfs_update_iflags()
169 flags = BTRFS_I(dir)->flags; in btrfs_inherit_iflags()
172 BTRFS_I(inode)->flags &= ~BTRFS_INODE_COMPRESS; in btrfs_inherit_iflags()
173 BTRFS_I(inode)->flags |= BTRFS_INODE_NOCOMPRESS; in btrfs_inherit_iflags()
175 BTRFS_I(inode)->flags &= ~BTRFS_INODE_NOCOMPRESS; in btrfs_inherit_iflags()
176 BTRFS_I(inode)->flags |= BTRFS_INODE_COMPRESS; in btrfs_inherit_iflags()
180 BTRFS_I(inode)->flags |= BTRFS_INODE_NODATACOW; in btrfs_inherit_iflags()
182 BTRFS_I(inode)->flags |= BTRFS_INODE_NODATASUM; in btrfs_inherit_iflags()
190 struct btrfs_inode *ip = BTRFS_I(file_inode(file)); in btrfs_ioctl_getflags()
216 struct btrfs_inode *ip = BTRFS_I(inode); in btrfs_ioctl_setflags()
[all …]
Dcompression.c117 if (BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM) in check_compressed_csum()
130 btrfs_info(BTRFS_I(inode)->root->fs_info, in check_compressed_csum()
290 tree = &BTRFS_I(inode)->io_tree; in end_compressed_bio_write()
336 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_submit_compressed_write()
339 struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; in btrfs_submit_compressed_write()
345 int skip_sum = BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM; in btrfs_submit_compressed_write()
362 bdev = BTRFS_I(inode)->root->fs_info->fs_devices->latest_bdev; in btrfs_submit_compressed_write()
419 btrfs_info(BTRFS_I(inode)->root->fs_info, in btrfs_submit_compressed_write()
464 em_tree = &BTRFS_I(inode)->extent_tree; in add_ra_bio_pages()
465 tree = &BTRFS_I(inode)->io_tree; in add_ra_bio_pages()
[all …]
Dexport.c34 fid->root_objectid = BTRFS_I(inode)->root->objectid; in btrfs_encode_fh()
40 fid->parent_objectid = BTRFS_I(parent)->location.objectid; in btrfs_encode_fh()
42 parent_root_id = BTRFS_I(parent)->root->objectid; in btrfs_encode_fh()
156 struct btrfs_root *root = BTRFS_I(dir)->root; in btrfs_get_parent()
226 struct btrfs_root *root = BTRFS_I(dir)->root; in btrfs_get_name()
250 key.objectid = BTRFS_I(inode)->root->root_key.objectid; in btrfs_get_name()
Dxattr.c39 struct btrfs_root *root = BTRFS_I(inode)->root; in __btrfs_getxattr()
96 struct btrfs_root *root = BTRFS_I(inode)->root; in do_setxattr()
237 struct btrfs_root *root = BTRFS_I(inode)->root; in __btrfs_setxattr()
253 set_bit(BTRFS_INODE_COPY_EVERYTHING, &BTRFS_I(inode)->runtime_flags); in __btrfs_setxattr()
265 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_listxattr()
422 struct btrfs_root *root = BTRFS_I(d_inode(dentry))->root; in btrfs_setxattr()
457 struct btrfs_root *root = BTRFS_I(d_inode(dentry))->root; in btrfs_removexattr()
Ddelayed-inode.c89 struct btrfs_inode *btrfs_inode = BTRFS_I(inode); in btrfs_get_delayed_node()
125 struct btrfs_inode *btrfs_inode = BTRFS_I(inode); in btrfs_get_or_create_delayed_node()
632 spin_lock(&BTRFS_I(inode)->lock); in btrfs_delayed_inode_reserve_metadata()
634 &BTRFS_I(inode)->runtime_flags)) { in btrfs_delayed_inode_reserve_metadata()
635 spin_unlock(&BTRFS_I(inode)->lock); in btrfs_delayed_inode_reserve_metadata()
639 spin_unlock(&BTRFS_I(inode)->lock); in btrfs_delayed_inode_reserve_metadata()
1313 delayed_node = ACCESS_ONCE(BTRFS_I(inode)->delayed_node); in btrfs_remove_delayed_node()
1317 BTRFS_I(inode)->delayed_node = NULL; in btrfs_remove_delayed_node()
1601 BTRFS_I(inode)->index_cnt = delayed_node->index_cnt; in btrfs_inode_delayed_dir_index_count()
1748 btrfs_set_stack_inode_size(inode_item, BTRFS_I(inode)->disk_i_size); in fill_stack_inode_item()
[all …]
Dtree-log.c1432 BTRFS_I(inode)->index_cnt = (u64)-1; in fixup_inode_link_count()
2967 if (BTRFS_I(dir)->logged_trans < trans->transid) in btrfs_del_dir_entries_in_log()
2974 mutex_lock(&BTRFS_I(dir)->log_mutex); in btrfs_del_dir_entries_in_log()
3049 mutex_unlock(&BTRFS_I(dir)->log_mutex); in btrfs_del_dir_entries_in_log()
3071 if (BTRFS_I(inode)->logged_trans < trans->transid) in btrfs_del_inode_ref_in_log()
3078 mutex_lock(&BTRFS_I(inode)->log_mutex); in btrfs_del_inode_ref_in_log()
3082 mutex_unlock(&BTRFS_I(inode)->log_mutex); in btrfs_del_inode_ref_in_log()
3430 BTRFS_I(inode)->generation, in fill_inode_item()
3461 btrfs_set_token_inode_flags(leaf, item, BTRFS_I(inode)->flags, &token); in fill_inode_item()
3473 &BTRFS_I(inode)->location, in log_inode_item()
[all …]
Ddisk-io.c221 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree; in btree_get_extent()
229 BTRFS_I(inode)->root->fs_info->fs_devices->latest_bdev; in btree_get_extent()
244 em->bdev = BTRFS_I(inode)->root->fs_info->fs_devices->latest_bdev; in btree_get_extent()
449 io_tree = &BTRFS_I(root->fs_info->btree_inode)->io_tree; in btree_read_extent_buffer_pages()
606 struct btrfs_root *root = BTRFS_I(page->mapping->host)->root; in btree_readpage_end_io_hook()
695 struct btrfs_root *root = BTRFS_I(page->mapping->host)->root; in btree_io_failed_hook()
800 fs_info = BTRFS_I(async->inode)->root->fs_info; in run_one_async_done()
879 root = BTRFS_I(bvec->bv_page->mapping->host)->root; in btree_csum_one_bio()
910 ret = btrfs_map_bio(BTRFS_I(inode)->root, rw, bio, mirror_num, 1); in __btree_submit_bio_done()
939 ret = btrfs_bio_wq_end_io(BTRFS_I(inode)->root->fs_info, in btree_submit_bio_hook()
[all …]
Dextent_io.c1760 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; in extent_clear_unlock_delalloc()
1997 struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree; in free_io_failure()
2006 ret = clear_extent_bits(&BTRFS_I(inode)->io_tree, rec->start, in free_io_failure()
2029 struct btrfs_fs_info *fs_info = BTRFS_I(inode)->root->fs_info; in repair_io_failure()
2118 struct btrfs_fs_info *fs_info = BTRFS_I(inode)->root->fs_info; in clean_io_failure()
2124 ret = count_range_bits(&BTRFS_I(inode)->io_failure_tree, &private, in clean_io_failure()
2129 ret = get_state_private(&BTRFS_I(inode)->io_failure_tree, start, in clean_io_failure()
2146 spin_lock(&BTRFS_I(inode)->io_tree.lock); in clean_io_failure()
2147 state = find_first_extent_bit_state(&BTRFS_I(inode)->io_tree, in clean_io_failure()
2150 spin_unlock(&BTRFS_I(inode)->io_tree.lock); in clean_io_failure()
[all …]
Dextent-tree.c3275 BTRFS_I(inode)->generation = 0; in cache_save_setup()
3889 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_check_data_free_space()
4027 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_free_reserved_data_space()
5201 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_orphan_reserve_metadata()
5218 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_orphan_release_metadata()
5305 ASSERT(BTRFS_I(inode)->outstanding_extents >= num_extents); in drop_outstanding_extent()
5306 BTRFS_I(inode)->outstanding_extents -= num_extents; in drop_outstanding_extent()
5308 if (BTRFS_I(inode)->outstanding_extents == 0 && in drop_outstanding_extent()
5310 &BTRFS_I(inode)->runtime_flags)) in drop_outstanding_extent()
5317 if (BTRFS_I(inode)->outstanding_extents >= in drop_outstanding_extent()
[all …]
Dfree-space-cache.c114 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()
397 btrfs_err(BTRFS_I(inode)->root->fs_info, in io_ctl_prepare_pages()
712 if (!BTRFS_I(inode)->generation) { in __load_free_space_cache()
719 if (BTRFS_I(inode)->generation != generation) { in __load_free_space_cache()
723 BTRFS_I(inode)->generation, generation); in __load_free_space_cache()
999 clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, inode->i_size - 1, in update_cache_item()
1012 clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, in update_cache_item()
1021 BTRFS_I(inode)->generation = trans->transid; in update_cache_item()
1114 clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, inode->i_size - 1, in flush_dirty_cache()
[all …]
Drelocation.c1580 struct btrfs_root *root = BTRFS_I(reloc_inode)->root;
1590 bytenr -= BTRFS_I(reloc_inode)->index_cnt;
1690 ret = try_lock_extent(&BTRFS_I(inode)->io_tree,
1697 unlock_extent(&BTRFS_I(inode)->io_tree,
2081 lock_extent(&BTRFS_I(inode)->io_tree, start, end);
2083 unlock_extent(&BTRFS_I(inode)->io_tree, start, end);
3021 u64 offset = BTRFS_I(inode)->index_cnt;
3041 lock_extent(&BTRFS_I(inode)->io_tree, start, end);
3046 unlock_extent(&BTRFS_I(inode)->io_tree, start, end);
3062 struct btrfs_root *root = BTRFS_I(inode)->root;
[all …]
Dfile-item.c168 struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; in __btrfs_lookup_bio_sums()
243 if (BTRFS_I(inode)->root->root_key.objectid == in __btrfs_lookup_bio_sums()
249 btrfs_info(BTRFS_I(inode)->root->fs_info, in __btrfs_lookup_bio_sums()
885 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_extent_item_to_extent_map()
Dinode-map.c458 BTRFS_I(inode)->generation = 0; in btrfs_save_ino_cache()
Dtransaction.c925 struct btrfs_inode *btree_ino = BTRFS_I(root->fs_info->btree_inode); in btrfs_wait_marked_extents()
1314 parent_root = BTRFS_I(parent_inode)->root; in create_pending_snapshot()
1775 struct btrfs_inode *btree_ino = BTRFS_I(root->fs_info->btree_inode); in btrfs_commit_transaction()
Dscrub.c755 ret = set_extent_bits(&BTRFS_I(inode)->io_tree, offset, end, in scrub_fixup_readpage()
765 ret = extent_read_full_page(&BTRFS_I(inode)->io_tree, page, in scrub_fixup_readpage()
770 corrected = !test_range_bit(&BTRFS_I(inode)->io_tree, offset, in scrub_fixup_readpage()
773 clear_extent_bits(&BTRFS_I(inode)->io_tree, offset, end, in scrub_fixup_readpage()
4034 io_tree = &BTRFS_I(inode)->io_tree; in check_extent_to_block()
4110 io_tree = &BTRFS_I(inode)->io_tree; in copy_nocow_pages_for_inode()
Dsuper.c1922 buf->f_fsid.val[0] ^= BTRFS_I(d_inode(dentry))->root->objectid >> 32; in btrfs_statfs()
1923 buf->f_fsid.val[1] ^= BTRFS_I(d_inode(dentry))->root->objectid; in btrfs_statfs()
Dsend.c5698 send_root = BTRFS_I(file_inode(mnt_file))->root; in btrfs_ioctl_send()
/linux-4.1.27/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()
274 BTRFS_I(inode)->root = root; in test_btrfs_get_extent()
830 BTRFS_I(inode)->location.type = BTRFS_INODE_ITEM_KEY; in test_hole_first()
831 BTRFS_I(inode)->location.objectid = BTRFS_FIRST_FREE_OBJECTID; in test_hole_first()
832 BTRFS_I(inode)->location.offset = 0; in test_hole_first()
855 BTRFS_I(inode)->root = root; in test_hole_first()
938 BTRFS_I(inode)->root = root; in test_extent_accounting()
942 BTRFS_I(inode)->outstanding_extents++; in test_extent_accounting()
[all …]
/linux-4.1.27/include/trace/events/
Dbtrfs.h109 __entry->disk_i_size = BTRFS_I(inode)->disk_i_size;
110 __entry->generation = BTRFS_I(inode)->generation;
111 __entry->last_trans = BTRFS_I(inode)->last_trans;
112 __entry->logged_trans = BTRFS_I(inode)->logged_trans;
114 BTRFS_I(inode)->root->root_key.objectid;
259 BTRFS_I(inode)->root->root_key.objectid;
338 BTRFS_I(inode)->root->root_key.objectid;
384 BTRFS_I(page->mapping->host)->root->root_key.objectid;
416 BTRFS_I(inode)->root->root_key.objectid;