Lines Matching refs:async_chunk
740 struct async_chunk { struct
754 struct async_chunk chunks[]; argument
757 static noinline int add_async_extent(struct async_chunk *cow, in add_async_extent()
871 struct async_chunk *async_chunk = in compress_file_range() local
872 container_of(work, struct async_chunk, work); in compress_file_range()
873 struct btrfs_inode *inode = async_chunk->inode; in compress_file_range()
877 u64 start = async_chunk->start; in compress_file_range()
878 u64 end = async_chunk->end; in compress_file_range()
1031 ret = add_async_extent(async_chunk, start, total_in, total_compressed, folios, in compress_file_range()
1045 ret = add_async_extent(async_chunk, start, end - start + 1, 0, NULL, 0, in compress_file_range()
1104 static void submit_one_async_extent(struct async_chunk *async_chunk, in submit_one_async_extent() argument
1108 struct btrfs_inode *inode = async_chunk->inode; in submit_one_async_extent()
1122 if (async_chunk->blkcg_css) in submit_one_async_extent()
1123 kthread_associate_blkcg(async_chunk->blkcg_css); in submit_one_async_extent()
1129 if (async_chunk->locked_folio) { in submit_one_async_extent()
1130 u64 locked_folio_start = folio_pos(async_chunk->locked_folio); in submit_one_async_extent()
1132 folio_size(async_chunk->locked_folio) - 1; in submit_one_async_extent()
1135 locked_folio = async_chunk->locked_folio; in submit_one_async_extent()
1191 async_chunk->write_flags, true); in submit_one_async_extent()
1194 if (async_chunk->blkcg_css) in submit_one_async_extent()
1211 if (async_chunk->blkcg_css) in submit_one_async_extent()
1567 struct async_chunk *async_chunk = container_of(work, struct async_chunk, in submit_compressed_extents() local
1577 btrfs_add_delayed_iput(async_chunk->inode); in submit_compressed_extents()
1578 if (async_chunk->blkcg_css) in submit_compressed_extents()
1579 css_put(async_chunk->blkcg_css); in submit_compressed_extents()
1581 async_cow = async_chunk->async_cow; in submit_compressed_extents()
1587 nr_pages = (async_chunk->end - async_chunk->start + PAGE_SIZE) >> in submit_compressed_extents()
1590 while (!list_empty(&async_chunk->extents)) { in submit_compressed_extents()
1591 async_extent = list_entry(async_chunk->extents.next, in submit_compressed_extents()
1594 submit_one_async_extent(async_chunk, async_extent, &alloc_hint); in submit_compressed_extents()
1610 struct async_chunk *async_chunk; in run_delalloc_compressed() local
1625 async_chunk = ctx->chunks; in run_delalloc_compressed()
1636 async_chunk[i].async_cow = ctx; in run_delalloc_compressed()
1637 async_chunk[i].inode = inode; in run_delalloc_compressed()
1638 async_chunk[i].start = start; in run_delalloc_compressed()
1639 async_chunk[i].end = cur_end; in run_delalloc_compressed()
1640 async_chunk[i].write_flags = write_flags; in run_delalloc_compressed()
1641 INIT_LIST_HEAD(&async_chunk[i].extents); in run_delalloc_compressed()
1665 async_chunk[i].locked_folio = locked_folio; in run_delalloc_compressed()
1668 async_chunk[i].locked_folio = NULL; in run_delalloc_compressed()
1673 async_chunk[i].blkcg_css = blkcg_css; in run_delalloc_compressed()
1674 async_chunk[i].write_flags |= REQ_BTRFS_CGROUP_PUNT; in run_delalloc_compressed()
1676 async_chunk[i].blkcg_css = NULL; in run_delalloc_compressed()
1679 btrfs_init_work(&async_chunk[i].work, compress_file_range, in run_delalloc_compressed()
1685 btrfs_queue_work(fs_info->delalloc_workers, &async_chunk[i].work); in run_delalloc_compressed()