Lines Matching refs:BTRFS_I
98 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()
1076 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_mark_extent_written()
1396 lock_extent_bits(&BTRFS_I(inode)->io_tree, in lock_and_cleanup_extent_if_need()
1403 unlock_extent_cached(&BTRFS_I(inode)->io_tree, in lock_and_cleanup_extent_if_need()
1417 clear_extent_bit(&BTRFS_I(inode)->io_tree, start_pos, in lock_and_cleanup_extent_if_need()
1439 struct btrfs_root *root = BTRFS_I(inode)->root; in check_can_nocow()
1453 lock_extent(&BTRFS_I(inode)->io_tree, lockstart, lockend); in check_can_nocow()
1459 unlock_extent(&BTRFS_I(inode)->io_tree, lockstart, lockend); in check_can_nocow()
1474 unlock_extent(&BTRFS_I(inode)->io_tree, lockstart, lockend); in check_can_nocow()
1484 struct btrfs_root *root = BTRFS_I(inode)->root; in __btrfs_buffered_write()
1529 if (BTRFS_I(inode)->flags & (BTRFS_INODE_NODATACOW | in __btrfs_buffered_write()
1621 spin_lock(&BTRFS_I(inode)->lock); in __btrfs_buffered_write()
1622 BTRFS_I(inode)->outstanding_extents++; in __btrfs_buffered_write()
1623 spin_unlock(&BTRFS_I(inode)->lock); in __btrfs_buffered_write()
1645 unlock_extent_cached(&BTRFS_I(inode)->io_tree, in __btrfs_buffered_write()
1662 set_extent_bit(&BTRFS_I(inode)->io_tree, lockstart, in __btrfs_buffered_write()
1758 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_file_write_iter()
1815 atomic_inc(&BTRFS_I(inode)->sync_writers); in btrfs_file_write_iter()
1832 spin_lock(&BTRFS_I(inode)->lock); in btrfs_file_write_iter()
1833 BTRFS_I(inode)->last_sub_trans = root->log_transid; in btrfs_file_write_iter()
1834 spin_unlock(&BTRFS_I(inode)->lock); in btrfs_file_write_iter()
1842 atomic_dec(&BTRFS_I(inode)->sync_writers); in btrfs_file_write_iter()
1859 &BTRFS_I(inode)->runtime_flags)) in btrfs_release_file()
1868 atomic_inc(&BTRFS_I(inode)->sync_writers); in start_ordered_ops()
1870 atomic_dec(&BTRFS_I(inode)->sync_writers); in start_ordered_ops()
1890 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_sync_file()
1917 &BTRFS_I(inode)->runtime_flags); in btrfs_sync_file()
2001 (BTRFS_I(inode)->last_trans <= in btrfs_sync_file()
2011 &BTRFS_I(inode)->runtime_flags); in btrfs_sync_file()
2154 struct btrfs_root *root = BTRFS_I(inode)->root; in fill_holes()
2158 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree; in fill_holes()
2220 &BTRFS_I(inode)->runtime_flags); in fill_holes()
2243 &BTRFS_I(inode)->runtime_flags); in fill_holes()
2282 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_punch_hole()
2319 lockstart = round_up(offset, BTRFS_I(inode)->root->sectorsize); in btrfs_punch_hole()
2321 BTRFS_I(inode)->root->sectorsize) - 1; in btrfs_punch_hole()
2400 lock_extent_bits(&BTRFS_I(inode)->io_tree, lockstart, lockend, in btrfs_punch_hole()
2419 unlock_extent_cached(&BTRFS_I(inode)->io_tree, lockstart, in btrfs_punch_hole()
2560 unlock_extent_cached(&BTRFS_I(inode)->io_tree, lockstart, lockend, in btrfs_punch_hole()
2641 int blocksize = BTRFS_I(inode)->root->sectorsize; in btrfs_fallocate()
2707 lock_extent_bits(&BTRFS_I(inode)->io_tree, alloc_start, in btrfs_fallocate()
2715 unlock_extent_cached(&BTRFS_I(inode)->io_tree, in btrfs_fallocate()
2788 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_fallocate()
2810 unlock_extent_cached(&BTRFS_I(inode)->io_tree, alloc_start, locked_end, in btrfs_fallocate()
2830 struct btrfs_root *root = BTRFS_I(inode)->root; in find_desired_extent()
2855 lock_extent_bits(&BTRFS_I(inode)->io_tree, lockstart, lockend, 0, in find_desired_extent()
2887 unlock_extent_cached(&BTRFS_I(inode)->io_tree, lockstart, lockend, in find_desired_extent()
2977 &BTRFS_I(inode)->runtime_flags)) in btrfs_fdatawrite_range()