Lines Matching refs:async_chunk

485 struct async_chunk {  struct
499 struct async_chunk chunks[]; argument
502 static noinline int add_async_extent(struct async_chunk *cow, in add_async_extent()
612 static noinline int compress_file_range(struct async_chunk *async_chunk) in compress_file_range() argument
614 struct inode *inode = async_chunk->inode; in compress_file_range()
617 u64 start = async_chunk->start; in compress_file_range()
618 u64 end = async_chunk->end; in compress_file_range()
835 add_async_extent(async_chunk, start, total_in, in compress_file_range()
875 if (async_chunk->locked_page && in compress_file_range()
876 (page_offset(async_chunk->locked_page) >= start && in compress_file_range()
877 page_offset(async_chunk->locked_page)) <= end) { in compress_file_range()
878 __set_page_dirty_nobuffers(async_chunk->locked_page); in compress_file_range()
884 add_async_extent(async_chunk, start, end - start + 1, 0, NULL, 0, in compress_file_range()
955 struct async_chunk *async_chunk, in submit_one_async_extent() argument
973 if (async_chunk->locked_page) { in submit_one_async_extent()
974 u64 locked_page_start = page_offset(async_chunk->locked_page); in submit_one_async_extent()
978 locked_page = async_chunk->locked_page; in submit_one_async_extent()
1042 async_chunk->write_flags, in submit_one_async_extent()
1043 async_chunk->blkcg_css, true)) { in submit_one_async_extent()
1077 static noinline void submit_compressed_extents(struct async_chunk *async_chunk) in submit_compressed_extents() argument
1079 struct btrfs_inode *inode = BTRFS_I(async_chunk->inode); in submit_compressed_extents()
1085 while (!list_empty(&async_chunk->extents)) { in submit_compressed_extents()
1089 async_extent = list_entry(async_chunk->extents.next, in submit_compressed_extents()
1095 ret = submit_one_async_extent(inode, async_chunk, async_extent, in submit_compressed_extents()
1453 struct async_chunk *async_chunk; in async_cow_start() local
1456 async_chunk = container_of(work, struct async_chunk, work); in async_cow_start()
1458 compressed_extents = compress_file_range(async_chunk); in async_cow_start()
1460 btrfs_add_delayed_iput(async_chunk->inode); in async_cow_start()
1461 async_chunk->inode = NULL; in async_cow_start()
1470 struct async_chunk *async_chunk = container_of(work, struct async_chunk, in async_cow_submit() local
1475 nr_pages = (async_chunk->end - async_chunk->start + PAGE_SIZE) >> in async_cow_submit()
1484 if (async_chunk->inode) in async_cow_submit()
1485 submit_compressed_extents(async_chunk); in async_cow_submit()
1495 struct async_chunk *async_chunk; in async_cow_free() local
1498 async_chunk = container_of(work, struct async_chunk, work); in async_cow_free()
1499 if (async_chunk->inode) in async_cow_free()
1500 btrfs_add_delayed_iput(async_chunk->inode); in async_cow_free()
1501 if (async_chunk->blkcg_css) in async_cow_free()
1502 css_put(async_chunk->blkcg_css); in async_cow_free()
1504 async_cow = async_chunk->async_cow; in async_cow_free()
1518 struct async_chunk *async_chunk; in cow_file_range_async() local
1553 async_chunk = ctx->chunks; in cow_file_range_async()
1567 async_chunk[i].async_cow = ctx; in cow_file_range_async()
1568 async_chunk[i].inode = &inode->vfs_inode; in cow_file_range_async()
1569 async_chunk[i].start = start; in cow_file_range_async()
1570 async_chunk[i].end = cur_end; in cow_file_range_async()
1571 async_chunk[i].write_flags = write_flags; in cow_file_range_async()
1572 INIT_LIST_HEAD(&async_chunk[i].extents); in cow_file_range_async()
1595 async_chunk[i].locked_page = locked_page; in cow_file_range_async()
1598 async_chunk[i].locked_page = NULL; in cow_file_range_async()
1603 async_chunk[i].blkcg_css = blkcg_css; in cow_file_range_async()
1605 async_chunk[i].blkcg_css = NULL; in cow_file_range_async()
1608 btrfs_init_work(&async_chunk[i].work, async_cow_start, in cow_file_range_async()
1614 btrfs_queue_work(fs_info->delalloc_workers, &async_chunk[i].work); in cow_file_range_async()