Lines Matching defs:async_chunk

714 struct async_chunk {
728 struct async_chunk chunks[];
731 static noinline int add_async_extent(struct async_chunk *cow,
840 struct async_chunk *async_chunk =
841 container_of(work, struct async_chunk, work);
842 struct btrfs_inode *inode = async_chunk->inode;
846 u64 start = async_chunk->start;
847 u64 end = async_chunk->end;
1029 ret = add_async_extent(async_chunk, start, total_in, total_compressed, pages,
1043 ret = add_async_extent(async_chunk, start, end - start + 1, 0, NULL, 0,
1105 static void submit_one_async_extent(struct async_chunk *async_chunk,
1109 struct btrfs_inode *inode = async_chunk->inode;
1121 if (async_chunk->blkcg_css)
1122 kthread_associate_blkcg(async_chunk->blkcg_css);
1125 * If async_chunk->locked_page is in the async_extent range, we need to
1128 if (async_chunk->locked_page) {
1129 u64 locked_page_start = page_offset(async_chunk->locked_page);
1133 locked_page = async_chunk->locked_page;
1195 async_chunk->write_flags, true);
1198 if (async_chunk->blkcg_css)
1214 if (async_chunk->blkcg_css)
1584 struct async_chunk *async_chunk = container_of(work, struct async_chunk,
1592 struct async_chunk *async_chunk;
1595 async_chunk = container_of(work, struct async_chunk, work);
1596 btrfs_add_delayed_iput(async_chunk->inode);
1597 if (async_chunk->blkcg_css)
1598 css_put(async_chunk->blkcg_css);
1600 async_cow = async_chunk->async_cow;
1606 nr_pages = (async_chunk->end - async_chunk->start + PAGE_SIZE) >>
1609 while (!list_empty(&async_chunk->extents)) {
1610 async_extent = list_entry(async_chunk->extents.next,
1613 submit_one_async_extent(async_chunk, async_extent, &alloc_hint);
1629 struct async_chunk *async_chunk;
1645 async_chunk = ctx->chunks;
1656 async_chunk[i].async_cow = ctx;
1657 async_chunk[i].inode = inode;
1658 async_chunk[i].start = start;
1659 async_chunk[i].end = cur_end;
1660 async_chunk[i].write_flags = write_flags;
1661 INIT_LIST_HEAD(&async_chunk[i].extents);
1666 * this large delalloc region across multiple async_chunk
1684 async_chunk[i].locked_page = locked_page;
1687 async_chunk[i].locked_page = NULL;
1692 async_chunk[i].blkcg_css = blkcg_css;
1693 async_chunk[i].write_flags |= REQ_BTRFS_CGROUP_PUNT;
1695 async_chunk[i].blkcg_css = NULL;
1698 btrfs_init_work(&async_chunk[i].work, compress_file_range,
1704 btrfs_queue_work(fs_info->delalloc_workers, &async_chunk[i].work);