Lines Matching defs:inode

108 	struct inode *inode = tree->private_data;
111 if (!inode || !is_data_inode(inode))
114 isize = i_size_read(inode);
116 btrfs_debug_rl(BTRFS_I(inode)->root->fs_info,
118 caller, btrfs_ino(BTRFS_I(inode)), isize, start, end);
270 * For the file_extent_tree, we want to hold the inode lock when we lookup and
272 * the tree lock and get the inode lock when setting delalloc. These two things
1491 void extent_range_clear_dirty_for_io(struct inode *inode, u64 start, u64 end)
1498 page = find_get_page(inode->i_mapping, index);
1506 void extent_range_redirty_for_io(struct inode *inode, u64 start, u64 end)
1513 page = find_get_page(inode->i_mapping, index);
1815 static noinline void __unlock_for_delalloc(struct inode *inode,
1826 __process_pages_contig(inode->i_mapping, locked_page, index, end_index,
1830 static noinline int lock_delalloc_pages(struct inode *inode,
1844 ret = __process_pages_contig(inode->i_mapping, locked_page, index,
1847 __unlock_for_delalloc(inode, locked_page, delalloc_start,
1860 noinline_for_stack bool find_lock_delalloc_range(struct inode *inode,
1864 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree;
1901 ret = lock_delalloc_pages(inode, locked_page,
1929 __unlock_for_delalloc(inode, locked_page,
2019 void extent_clear_unlock_delalloc(struct btrfs_inode *inode, u64 start, u64 end,
2024 clear_extent_bit(&inode->io_tree, start, end, clear_bits, 1, 0, NULL);
2026 __process_pages_contig(inode->vfs_inode.i_mapping, locked_page,
2421 * - the inode is freeing
2423 void btrfs_free_io_failure_record(struct btrfs_inode *inode, u64 start, u64 end)
2425 struct extent_io_tree *failure_tree = &inode->io_failure_tree;
2451 static struct io_failure_record *btrfs_get_io_failure_record(struct inode *inode,
2454 struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
2457 struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree;
2458 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree;
2459 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree;
2526 /* Set the bits in the inode's tree */
2536 static bool btrfs_check_repairable(struct inode *inode, bool needs_validation,
2540 struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
2600 static bool btrfs_io_needs_validation(struct inode *inode, struct bio *bio)
2603 const u32 blocksize = inode->i_sb->s_blocksize;
2642 blk_status_t btrfs_submit_read_repair(struct inode *inode,
2649 struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
2650 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree;
2651 struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree;
2653 const int icsum = phy_offset >> inode->i_sb->s_blocksize_bits;
2664 failrec = btrfs_get_io_failure_record(inode, start, end);
2668 need_validation = btrfs_io_needs_validation(inode, failed_bio);
2670 if (!btrfs_check_repairable(inode, need_validation, failrec,
2697 btrfs_debug(btrfs_sb(inode->i_sb),
2701 status = submit_bio_hook(inode, repair_bio, failrec->this_mirror,
2747 struct inode *inode = page->mapping->host;
2748 struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
2818 struct inode *inode = page->mapping->host;
2819 struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
2825 tree = &BTRFS_I(inode)->io_tree;
2826 failure_tree = &BTRFS_I(inode)->io_failure_tree;
2850 if (is_data_inode(inode))
2859 clean_io_failure(BTRFS_I(inode)->root->fs_info,
2862 btrfs_ino(BTRFS_I(inode)), 0);
2868 if (is_data_inode(inode)) {
2880 if (!btrfs_submit_read_repair(inode, bio, offset, page,
2901 loff_t i_size = i_size_read(inode);
3110 __get_extent_map(struct inode *inode, struct page *page, size_t pg_offset,
3127 em = btrfs_get_extent(BTRFS_I(inode), page, pg_offset, start, len);
3146 struct inode *inode = page->mapping->host;
3151 u64 last_byte = i_size_read(inode);
3160 size_t blocksize = inode->i_sb->s_blocksize;
3162 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree;
3205 em = __get_extent_map(inode, page, pg_offset, cur,
3353 struct btrfs_inode *inode = BTRFS_I(pages[0]->mapping->host);
3356 btrfs_lock_and_flush_ordered_range(inode, start, end, NULL);
3381 static noinline_for_stack int writepage_delalloc(struct btrfs_inode *inode,
3394 found = find_lock_delalloc_range(&inode->vfs_inode, page,
3401 ret = btrfs_run_delalloc_range(inode, page, delalloc_start,
3454 static noinline_for_stack int __extent_writepage_io(struct btrfs_inode *inode,
3462 struct extent_io_tree *tree = &inode->io_tree;
3488 * we don't want to touch the inode after unlocking the page,
3494 blocksize = inode->vfs_inode.i_sb->s_blocksize;
3505 em = btrfs_get_extent(inode, NULL, 0, cur, end - cur + 1);
3542 btrfs_err(inode->root->fs_info,
3578 struct inode *inode = page->mapping->host;
3584 loff_t i_size = i_size_read(inode);
3588 trace___extent_writepage(page, inode, wbc);
3615 ret = writepage_delalloc(BTRFS_I(inode), page, wbc, start,
3623 ret = __extent_writepage_io(BTRFS_I(inode), page, wbc, epd, i_size,
3791 * the btree inode), we might have
3805 * Note: setting AS_EIO/AS_ENOSPC in the btree inode's i_mapping would
3815 * Using the flags below in the btree inode also makes us achieve the
4115 struct inode *inode = mapping->host;
4129 * We have to hold onto the inode so that ordered extents can do their
4132 * to deal with, so instead just hold onto the inode throughout the
4133 * writepages operation. If it fails here we are freeing up the inode
4137 if (!igrab(inode))
4159 * and we are the first one who do the filemap_flush() on this inode.
4166 &BTRFS_I(inode)->runtime_flags))
4256 btrfs_add_delayed_iput(inode);
4281 int extent_write_locked_range(struct inode *inode, u64 start, u64 end,
4285 struct address_space *mapping = inode->i_mapping;
4305 wbc_attach_fdatawrite_inode(&wbc_writepages, inode);
4500 * is no need to set the full fsync flag on the inode (it
4524 static struct extent_map *get_extent_skip_holes(struct btrfs_inode *inode,
4527 u64 sectorsize = btrfs_inode_sectorsize(inode);
4539 em = btrfs_get_extent_fiemap(inode, offset, len);
4668 int extent_fiemap(struct btrfs_inode *inode, struct fiemap_extent_info *fieinfo,
4679 u64 isize = i_size_read(&inode->vfs_inode);
4684 struct btrfs_root *root = inode->root;
4713 start = round_down(start, btrfs_inode_sectorsize(inode));
4714 len = round_up(max, btrfs_inode_sectorsize(inode)) - start;
4720 ret = btrfs_lookup_file_extent(NULL, root, path, btrfs_ino(inode), -1,
4735 if (found_key.objectid != btrfs_ino(inode) ||
4761 lock_extent_bits(&inode->io_tree, start, start + len - 1,
4764 em = get_extent_skip_holes(inode, start, last_for_get_extent);
4830 ret = btrfs_check_shared(root, btrfs_ino(inode),
4852 em = get_extent_skip_holes(inode, off, last_for_get_extent);
4874 unlock_extent_cached(&inode->io_tree, start, start + len - 1,