Lines Matching defs:async_chunk
692 struct async_chunk {
706 struct async_chunk chunks[];
709 static int add_async_extent(struct async_chunk *cow, u64 start, u64 ram_size,
858 struct async_chunk *async_chunk =
859 container_of(work, struct async_chunk, work);
860 struct btrfs_inode *inode = async_chunk->inode;
864 u64 start = async_chunk->start;
865 u64 end = async_chunk->end;
945 compress_level, async_chunk->write_flags);
976 ret = add_async_extent(async_chunk, start, total_in, cb);
989 ret = add_async_extent(async_chunk, start, end - start + 1, NULL);
1024 static void submit_one_async_extent(struct async_chunk *async_chunk,
1028 struct btrfs_inode *inode = async_chunk->inode;
1043 if (async_chunk->blkcg_css)
1044 kthread_associate_blkcg(async_chunk->blkcg_css);
1047 * If async_chunk->locked_folio is in the async_extent range, we need to
1050 if (async_chunk->locked_folio) {
1051 u64 locked_folio_start = folio_pos(async_chunk->locked_folio);
1053 folio_size(async_chunk->locked_folio) - 1;
1056 locked_folio = async_chunk->locked_folio;
1119 if (async_chunk->blkcg_css)
1137 if (async_chunk->blkcg_css)
1524 struct async_chunk *async_chunk = container_of(work, struct async_chunk,
1534 btrfs_add_delayed_iput(async_chunk->inode);
1535 if (async_chunk->blkcg_css)
1536 css_put(async_chunk->blkcg_css);
1538 async_cow = async_chunk->async_cow;
1544 nr_pages = (async_chunk->end - async_chunk->start + PAGE_SIZE) >>
1547 while (!list_empty(&async_chunk->extents)) {
1548 async_extent = list_first_entry(&async_chunk->extents,
1551 submit_one_async_extent(async_chunk, async_extent, &alloc_hint);
1567 struct async_chunk *async_chunk;
1582 async_chunk = ctx->chunks;
1593 async_chunk[i].async_cow = ctx;
1594 async_chunk[i].inode = inode;
1595 async_chunk[i].start = start;
1596 async_chunk[i].end = cur_end;
1597 async_chunk[i].write_flags = write_flags;
1598 INIT_LIST_HEAD(&async_chunk[i].extents);
1603 * this large delalloc region across multiple async_chunk
1622 async_chunk[i].locked_folio = locked_folio;
1625 async_chunk[i].locked_folio = NULL;
1630 async_chunk[i].blkcg_css = blkcg_css;
1631 async_chunk[i].write_flags |= REQ_BTRFS_CGROUP_PUNT;
1633 async_chunk[i].blkcg_css = NULL;
1636 btrfs_init_work(&async_chunk[i].work, compress_file_range,
1642 btrfs_queue_work(fs_info->delalloc_workers, &async_chunk[i].work);