Home
last modified time | relevance | path

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

/linux-4.4.14/fs/btrfs/
Dbtrfs_inode.h200 static inline struct btrfs_inode *BTRFS_I(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()
226 u64 ino = BTRFS_I(inode)->location.objectid; in btrfs_ino()
232 if (!ino || BTRFS_I(inode)->location.type == BTRFS_ROOT_ITEM_KEY) in btrfs_ino()
240 BTRFS_I(inode)->disk_i_size = size; in btrfs_i_size_write()
245 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_is_free_space_inode()
250 if (BTRFS_I(inode)->location.objectid == BTRFS_FREE_INO_OBJECTID) in btrfs_is_free_space_inode()
259 spin_lock(&BTRFS_I(inode)->lock); in btrfs_inode_in_log()
260 if (BTRFS_I(inode)->logged_trans == generation && in btrfs_inode_in_log()
261 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()
368 struct btrfs_root *root = BTRFS_I(inode)->root; in inode_need_compress()
374 if (BTRFS_I(inode)->flags & BTRFS_INODE_NOCOMPRESS) in inode_need_compress()
377 BTRFS_I(inode)->flags & BTRFS_INODE_COMPRESS || in inode_need_compress()
378 BTRFS_I(inode)->force_compress) in inode_need_compress()
406 struct btrfs_root *root = BTRFS_I(inode)->root; in compress_file_range()
426 (start > 0 || end + 1 < BTRFS_I(inode)->disk_i_size)) in compress_file_range()
455 (start > 0 || end + 1 < BTRFS_I(inode)->disk_i_size)) in compress_file_range()
[all …]
Dprops.c143 set_bit(BTRFS_INODE_HAS_PROPS, &BTRFS_I(inode)->runtime_flags); in __btrfs_set_prop()
274 struct btrfs_root *root = BTRFS_I(inode)->root; in inode_prop_iterator()
284 set_bit(BTRFS_INODE_HAS_PROPS, &BTRFS_I(inode)->runtime_flags); in inode_prop_iterator()
289 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_load_inode_props()
302 struct btrfs_root *root = BTRFS_I(inode)->root; in inherit_props()
307 &BTRFS_I(parent)->runtime_flags)) in inherit_props()
395 BTRFS_I(inode)->flags |= BTRFS_INODE_NOCOMPRESS; in prop_compression_apply()
396 BTRFS_I(inode)->flags &= ~BTRFS_INODE_COMPRESS; in prop_compression_apply()
397 BTRFS_I(inode)->force_compress = BTRFS_COMPRESS_NONE; in prop_compression_apply()
409 BTRFS_I(inode)->flags &= ~BTRFS_INODE_NOCOMPRESS; in prop_compression_apply()
[all …]
Dtransaction.h154 spin_lock(&BTRFS_I(inode)->lock); in btrfs_set_inode_last_trans()
155 BTRFS_I(inode)->last_trans = trans->transaction->transid; in btrfs_set_inode_last_trans()
156 BTRFS_I(inode)->last_sub_trans = BTRFS_I(inode)->root->log_transid; in btrfs_set_inode_last_trans()
157 BTRFS_I(inode)->last_log_commit = BTRFS_I(inode)->root->last_log_commit; in btrfs_set_inode_last_trans()
158 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()
283 tree = &BTRFS_I(inode)->ordered_tree; in btrfs_add_ordered_sum()
314 tree = &BTRFS_I(inode)->ordered_tree; in btrfs_dec_test_first_ordered_pending()
333 btrfs_crit(BTRFS_I(inode)->root->fs_info, in btrfs_dec_test_first_ordered_pending()
338 btrfs_crit(BTRFS_I(inode)->root->fs_info, in btrfs_dec_test_first_ordered_pending()
384 tree = &BTRFS_I(inode)->ordered_tree; in btrfs_dec_test_ordered_pending()
405 btrfs_crit(BTRFS_I(inode)->root->fs_info, in btrfs_dec_test_ordered_pending()
443 tree = &BTRFS_I(inode)->ordered_tree; in btrfs_get_logged_extents()
523 tree = &BTRFS_I(inode)->ordered_tree; in btrfs_wait_logged_extents()
[all …]
Dioctl.c139 struct btrfs_inode *ip = BTRFS_I(inode); in btrfs_update_iflags()
170 flags = BTRFS_I(dir)->flags; in btrfs_inherit_iflags()
173 BTRFS_I(inode)->flags &= ~BTRFS_INODE_COMPRESS; in btrfs_inherit_iflags()
174 BTRFS_I(inode)->flags |= BTRFS_INODE_NOCOMPRESS; in btrfs_inherit_iflags()
176 BTRFS_I(inode)->flags &= ~BTRFS_INODE_NOCOMPRESS; in btrfs_inherit_iflags()
177 BTRFS_I(inode)->flags |= BTRFS_INODE_COMPRESS; in btrfs_inherit_iflags()
181 BTRFS_I(inode)->flags |= BTRFS_INODE_NODATACOW; in btrfs_inherit_iflags()
183 BTRFS_I(inode)->flags |= BTRFS_INODE_NODATASUM; in btrfs_inherit_iflags()
191 struct btrfs_inode *ip = BTRFS_I(file_inode(file)); in btrfs_ioctl_getflags()
217 struct btrfs_inode *ip = BTRFS_I(inode); in btrfs_ioctl_setflags()
[all …]
Dcompression.c114 if (BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM) in check_compressed_csum()
127 btrfs_info(BTRFS_I(inode)->root->fs_info, in check_compressed_csum()
287 tree = &BTRFS_I(inode)->io_tree; in end_compressed_bio_write()
333 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_submit_compressed_write()
336 struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; in btrfs_submit_compressed_write()
342 int skip_sum = BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM; in btrfs_submit_compressed_write()
359 bdev = BTRFS_I(inode)->root->fs_info->fs_devices->latest_bdev; in btrfs_submit_compressed_write()
416 btrfs_info(BTRFS_I(inode)->root->fs_info, in btrfs_submit_compressed_write()
461 em_tree = &BTRFS_I(inode)->extent_tree; in add_ra_bio_pages()
462 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()
636 spin_lock(&BTRFS_I(inode)->lock); in btrfs_delayed_inode_reserve_metadata()
638 &BTRFS_I(inode)->runtime_flags)) { in btrfs_delayed_inode_reserve_metadata()
639 spin_unlock(&BTRFS_I(inode)->lock); in btrfs_delayed_inode_reserve_metadata()
643 spin_unlock(&BTRFS_I(inode)->lock); in btrfs_delayed_inode_reserve_metadata()
1317 delayed_node = ACCESS_ONCE(BTRFS_I(inode)->delayed_node); in btrfs_remove_delayed_node()
1321 BTRFS_I(inode)->delayed_node = NULL; in btrfs_remove_delayed_node()
1605 BTRFS_I(inode)->index_cnt = delayed_node->index_cnt; in btrfs_inode_delayed_dir_index_count()
1752 btrfs_set_stack_inode_size(inode_item, BTRFS_I(inode)->disk_i_size); in fill_stack_inode_item()
[all …]
Dtree-log.c1479 BTRFS_I(inode)->index_cnt = (u64)-1; in fixup_inode_link_count()
3075 if (BTRFS_I(dir)->logged_trans < trans->transid) in btrfs_del_dir_entries_in_log()
3082 mutex_lock(&BTRFS_I(dir)->log_mutex); in btrfs_del_dir_entries_in_log()
3157 mutex_unlock(&BTRFS_I(dir)->log_mutex); in btrfs_del_dir_entries_in_log()
3179 if (BTRFS_I(inode)->logged_trans < trans->transid) in btrfs_del_inode_ref_in_log()
3186 mutex_lock(&BTRFS_I(inode)->log_mutex); in btrfs_del_inode_ref_in_log()
3190 mutex_unlock(&BTRFS_I(inode)->log_mutex); in btrfs_del_inode_ref_in_log()
3538 BTRFS_I(inode)->generation, in fill_inode_item()
3569 btrfs_set_token_inode_flags(leaf, item, BTRFS_I(inode)->flags, &token); in fill_inode_item()
3581 &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()
694 struct btrfs_root *root = BTRFS_I(page->mapping->host)->root; in btree_io_failed_hook()
799 fs_info = BTRFS_I(async->inode)->root->fs_info; in run_one_async_done()
882 root = BTRFS_I(bvec->bv_page->mapping->host)->root; in btree_csum_one_bio()
913 ret = btrfs_map_bio(BTRFS_I(inode)->root, rw, bio, mirror_num, 1); in __btree_submit_bio_done()
944 ret = btrfs_bio_wq_end_io(BTRFS_I(inode)->root->fs_info, in btree_submit_bio_hook()
[all …]
Dextent_io.c99 btrfs_debug_rl(BTRFS_I(inode)->root->fs_info, in __btrfs_debug_check_extent_io_range()
1828 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; in extent_clear_unlock_delalloc()
2065 struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree; in free_io_failure()
2074 ret = clear_extent_bits(&BTRFS_I(inode)->io_tree, rec->start, in free_io_failure()
2097 struct btrfs_fs_info *fs_info = BTRFS_I(inode)->root->fs_info; in repair_io_failure()
2186 struct btrfs_fs_info *fs_info = BTRFS_I(inode)->root->fs_info; in clean_io_failure()
2192 ret = count_range_bits(&BTRFS_I(inode)->io_failure_tree, &private, in clean_io_failure()
2197 ret = get_state_private(&BTRFS_I(inode)->io_failure_tree, start, in clean_io_failure()
2214 spin_lock(&BTRFS_I(inode)->io_tree.lock); in clean_io_failure()
2215 state = find_first_extent_bit_state(&BTRFS_I(inode)->io_tree, in clean_io_failure()
[all …]
Dextent-tree.c3373 BTRFS_I(inode)->generation = 0; in cache_save_setup()
4000 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_alloc_data_chunk_ondemand()
4137 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_check_data_free_space()
4170 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_free_reserved_data_space_noquota()
5427 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_orphan_reserve_metadata()
5444 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_orphan_release_metadata()
5529 ASSERT(BTRFS_I(inode)->outstanding_extents >= num_extents); in drop_outstanding_extent()
5530 BTRFS_I(inode)->outstanding_extents -= num_extents; in drop_outstanding_extent()
5532 if (BTRFS_I(inode)->outstanding_extents == 0 && in drop_outstanding_extent()
5534 &BTRFS_I(inode)->runtime_flags)) 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()
395 btrfs_err(BTRFS_I(inode)->root->fs_info, in io_ctl_prepare_pages()
710 if (!BTRFS_I(inode)->generation) { in __load_free_space_cache()
717 if (BTRFS_I(inode)->generation != generation) { in __load_free_space_cache()
721 BTRFS_I(inode)->generation, generation); in __load_free_space_cache()
997 clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, inode->i_size - 1, in update_cache_item()
1010 clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, in update_cache_item()
1019 BTRFS_I(inode)->generation = trans->transid; in update_cache_item()
1112 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,
2083 lock_extent(&BTRFS_I(inode)->io_tree, start, end);
2085 unlock_extent(&BTRFS_I(inode)->io_tree, start, end);
3027 u64 offset = BTRFS_I(inode)->index_cnt;
3047 lock_extent(&BTRFS_I(inode)->io_tree, start, end);
3052 unlock_extent(&BTRFS_I(inode)->io_tree, start, end);
3068 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()
Dqgroup.c2513 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_qgroup_reserve_data()
2525 ret = set_record_extent_bits(&BTRFS_I(inode)->io_tree, start, in btrfs_qgroup_reserve_data()
2544 clear_extent_bit(&BTRFS_I(inode)->io_tree, unode->val, in btrfs_qgroup_reserve_data()
2563 ret = clear_record_extent_bits(&BTRFS_I(inode)->io_tree, start, in __btrfs_qgroup_release_data()
2570 qgroup_free(BTRFS_I(inode)->root, changeset.bytes_changed); in __btrfs_qgroup_release_data()
2671 ret = clear_record_extent_bits(&BTRFS_I(inode)->io_tree, 0, (u64)-1, in btrfs_qgroup_check_reserved_leak()
2678 btrfs_warn(BTRFS_I(inode)->root->fs_info, in btrfs_qgroup_check_reserved_leak()
2682 qgroup_free(BTRFS_I(inode)->root, changeset.bytes_changed); in btrfs_qgroup_check_reserved_leak()
Dsuper.c1206 BTRFS_I(d_inode(dentry))->root->root_key.objectid); in btrfs_show_options()
1343 u64 root_objectid = BTRFS_I(root_inode)->root->root_key.objectid; in mount_subvol()
2056 buf->f_fsid.val[0] ^= BTRFS_I(d_inode(dentry))->root->objectid >> 32; in btrfs_statfs()
2057 buf->f_fsid.val[1] ^= BTRFS_I(d_inode(dentry))->root->objectid; in btrfs_statfs()
Dinode-map.c458 BTRFS_I(inode)->generation = 0; in btrfs_save_ino_cache()
Dtransaction.c969 struct btrfs_inode *btree_ino = BTRFS_I(root->fs_info->btree_inode); in btrfs_wait_marked_extents()
1365 parent_root = BTRFS_I(parent_inode)->root; in create_pending_snapshot()
1814 struct btrfs_inode *btree_ino = BTRFS_I(root->fs_info->btree_inode); in btrfs_commit_transaction()
Dscrub.c747 ret = set_extent_bits(&BTRFS_I(inode)->io_tree, offset, end, in scrub_fixup_readpage()
757 ret = extent_read_full_page(&BTRFS_I(inode)->io_tree, page, in scrub_fixup_readpage()
762 corrected = !test_range_bit(&BTRFS_I(inode)->io_tree, offset, in scrub_fixup_readpage()
765 clear_extent_bits(&BTRFS_I(inode)->io_tree, offset, end, in scrub_fixup_readpage()
4212 io_tree = &BTRFS_I(inode)->io_tree; in check_extent_to_block()
4288 io_tree = &BTRFS_I(inode)->io_tree; in copy_nocow_pages_for_inode()
Dsend.c5947 send_root = BTRFS_I(file_inode(mnt_file))->root; in btrfs_ioctl_send()
/linux-4.4.14/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.4.14/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;
1133 __entry->rootid = BTRFS_I(inode)->root->objectid;
[all …]