Lines Matching refs:async_cow
370 struct async_cow { struct
381 static noinline int add_async_extent(struct async_cow *cow, in add_async_extent() argument
472 struct async_cow *async_cow, in compress_file_range() argument
671 add_async_extent(async_cow, start, total_in, in compress_file_range()
718 add_async_extent(async_cow, start, end - start + 1, 0, NULL, 0, in compress_file_range()
748 struct async_cow *async_cow) in submit_compressed_extents() argument
760 while (!list_empty(&async_cow->extents)) { in submit_compressed_extents()
761 async_extent = list_entry(async_cow->extents.next, in submit_compressed_extents()
778 ret = cow_file_range(inode, async_cow->locked_page, in submit_compressed_extents()
802 unlock_page(async_cow->locked_page); in submit_compressed_extents()
889 async_cow->write_flags)) { in submit_compressed_extents()
1184 struct async_cow *async_cow; in async_cow_start() local
1186 async_cow = container_of(work, struct async_cow, work); in async_cow_start()
1188 compress_file_range(async_cow->inode, async_cow->locked_page, in async_cow_start()
1189 async_cow->start, async_cow->end, async_cow, in async_cow_start()
1192 btrfs_add_delayed_iput(async_cow->inode); in async_cow_start()
1193 async_cow->inode = NULL; in async_cow_start()
1203 struct async_cow *async_cow; in async_cow_submit() local
1207 async_cow = container_of(work, struct async_cow, work); in async_cow_submit()
1209 root = async_cow->root; in async_cow_submit()
1211 nr_pages = (async_cow->end - async_cow->start + PAGE_SIZE) >> in async_cow_submit()
1219 if (async_cow->inode) in async_cow_submit()
1220 submit_compressed_extents(async_cow->inode, async_cow); in async_cow_submit()
1225 struct async_cow *async_cow; in async_cow_free() local
1226 async_cow = container_of(work, struct async_cow, work); in async_cow_free()
1227 if (async_cow->inode) in async_cow_free()
1228 btrfs_add_delayed_iput(async_cow->inode); in async_cow_free()
1229 kfree(async_cow); in async_cow_free()
1238 struct async_cow *async_cow; in cow_file_range_async() local
1246 async_cow = kmalloc(sizeof(*async_cow), GFP_NOFS); in cow_file_range_async()
1247 BUG_ON(!async_cow); /* -ENOMEM */ in cow_file_range_async()
1248 async_cow->inode = igrab(inode); in cow_file_range_async()
1249 async_cow->root = root; in cow_file_range_async()
1250 async_cow->locked_page = locked_page; in cow_file_range_async()
1251 async_cow->start = start; in cow_file_range_async()
1252 async_cow->write_flags = write_flags; in cow_file_range_async()
1260 async_cow->end = cur_end; in cow_file_range_async()
1261 INIT_LIST_HEAD(&async_cow->extents); in cow_file_range_async()
1263 btrfs_init_work(&async_cow->work, in cow_file_range_async()
1272 btrfs_queue_work(fs_info->delalloc_workers, &async_cow->work); in cow_file_range_async()