Lines Matching refs:async_chunk
706 struct async_chunk { struct
720 struct async_chunk chunks[]; argument
723 static noinline int add_async_extent(struct async_chunk *cow, in add_async_extent()
831 struct async_chunk *async_chunk = in compress_file_range() local
832 container_of(work, struct async_chunk, work); in compress_file_range()
833 struct btrfs_inode *inode = async_chunk->inode; in compress_file_range()
837 u64 start = async_chunk->start; in compress_file_range()
838 u64 end = async_chunk->end; in compress_file_range()
1020 add_async_extent(async_chunk, start, total_in, total_compressed, pages, in compress_file_range()
1033 add_async_extent(async_chunk, start, end - start + 1, 0, NULL, 0, in compress_file_range()
1094 static void submit_one_async_extent(struct async_chunk *async_chunk, in submit_one_async_extent() argument
1098 struct btrfs_inode *inode = async_chunk->inode; in submit_one_async_extent()
1110 if (async_chunk->blkcg_css) in submit_one_async_extent()
1111 kthread_associate_blkcg(async_chunk->blkcg_css); in submit_one_async_extent()
1117 if (async_chunk->locked_page) { in submit_one_async_extent()
1118 u64 locked_page_start = page_offset(async_chunk->locked_page); in submit_one_async_extent()
1122 locked_page = async_chunk->locked_page; in submit_one_async_extent()
1184 async_chunk->write_flags, true); in submit_one_async_extent()
1187 if (async_chunk->blkcg_css) in submit_one_async_extent()
1204 if (async_chunk->blkcg_css) in submit_one_async_extent()
1571 struct async_chunk *async_chunk = container_of(work, struct async_chunk, in submit_compressed_extents() local
1578 nr_pages = (async_chunk->end - async_chunk->start + PAGE_SIZE) >> in submit_compressed_extents()
1581 while (!list_empty(&async_chunk->extents)) { in submit_compressed_extents()
1582 async_extent = list_entry(async_chunk->extents.next, in submit_compressed_extents()
1585 submit_one_async_extent(async_chunk, async_extent, &alloc_hint); in submit_compressed_extents()
1596 struct async_chunk *async_chunk; in async_cow_free() local
1599 async_chunk = container_of(work, struct async_chunk, work); in async_cow_free()
1600 btrfs_add_delayed_iput(async_chunk->inode); in async_cow_free()
1601 if (async_chunk->blkcg_css) in async_cow_free()
1602 css_put(async_chunk->blkcg_css); in async_cow_free()
1604 async_cow = async_chunk->async_cow; in async_cow_free()
1616 struct async_chunk *async_chunk; in run_delalloc_compressed() local
1632 async_chunk = ctx->chunks; in run_delalloc_compressed()
1643 async_chunk[i].async_cow = ctx; in run_delalloc_compressed()
1644 async_chunk[i].inode = inode; in run_delalloc_compressed()
1645 async_chunk[i].start = start; in run_delalloc_compressed()
1646 async_chunk[i].end = cur_end; in run_delalloc_compressed()
1647 async_chunk[i].write_flags = write_flags; in run_delalloc_compressed()
1648 INIT_LIST_HEAD(&async_chunk[i].extents); in run_delalloc_compressed()
1671 async_chunk[i].locked_page = locked_page; in run_delalloc_compressed()
1674 async_chunk[i].locked_page = NULL; in run_delalloc_compressed()
1679 async_chunk[i].blkcg_css = blkcg_css; in run_delalloc_compressed()
1680 async_chunk[i].write_flags |= REQ_BTRFS_CGROUP_PUNT; in run_delalloc_compressed()
1682 async_chunk[i].blkcg_css = NULL; in run_delalloc_compressed()
1685 btrfs_init_work(&async_chunk[i].work, compress_file_range, in run_delalloc_compressed()
1691 btrfs_queue_work(fs_info->delalloc_workers, &async_chunk[i].work); in run_delalloc_compressed()