Lines Matching refs:async_cow
335 struct async_cow { struct
345 static noinline int add_async_extent(struct async_cow *cow, in add_async_extent() argument
403 struct async_cow *async_cow, in compress_file_range() argument
611 add_async_extent(async_cow, start, num_bytes, in compress_file_range()
637 add_async_extent(async_cow, start, end - start + 1, in compress_file_range()
675 struct async_cow *async_cow) in submit_compressed_extents() argument
687 while (!list_empty(&async_cow->extents)) { in submit_compressed_extents()
688 async_extent = list_entry(async_cow->extents.next, in submit_compressed_extents()
705 ret = cow_file_range(inode, async_cow->locked_page, in submit_compressed_extents()
727 unlock_page(async_cow->locked_page); in submit_compressed_extents()
1078 struct async_cow *async_cow; in async_cow_start() local
1080 async_cow = container_of(work, struct async_cow, work); in async_cow_start()
1082 compress_file_range(async_cow->inode, async_cow->locked_page, in async_cow_start()
1083 async_cow->start, async_cow->end, async_cow, in async_cow_start()
1086 btrfs_add_delayed_iput(async_cow->inode); in async_cow_start()
1087 async_cow->inode = NULL; in async_cow_start()
1096 struct async_cow *async_cow; in async_cow_submit() local
1100 async_cow = container_of(work, struct async_cow, work); in async_cow_submit()
1102 root = async_cow->root; in async_cow_submit()
1103 nr_pages = (async_cow->end - async_cow->start + PAGE_CACHE_SIZE) >> in async_cow_submit()
1114 if (async_cow->inode) in async_cow_submit()
1115 submit_compressed_extents(async_cow->inode, async_cow); in async_cow_submit()
1120 struct async_cow *async_cow; in async_cow_free() local
1121 async_cow = container_of(work, struct async_cow, work); in async_cow_free()
1122 if (async_cow->inode) in async_cow_free()
1123 btrfs_add_delayed_iput(async_cow->inode); in async_cow_free()
1124 kfree(async_cow); in async_cow_free()
1131 struct async_cow *async_cow; in cow_file_range_async() local
1140 async_cow = kmalloc(sizeof(*async_cow), GFP_NOFS); in cow_file_range_async()
1141 BUG_ON(!async_cow); /* -ENOMEM */ in cow_file_range_async()
1142 async_cow->inode = igrab(inode); in cow_file_range_async()
1143 async_cow->root = root; in cow_file_range_async()
1144 async_cow->locked_page = locked_page; in cow_file_range_async()
1145 async_cow->start = start; in cow_file_range_async()
1153 async_cow->end = cur_end; in cow_file_range_async()
1154 INIT_LIST_HEAD(&async_cow->extents); in cow_file_range_async()
1156 btrfs_init_work(&async_cow->work, in cow_file_range_async()
1166 &async_cow->work); in cow_file_range_async()