Lines Matching refs:async_cow
328 struct async_cow { struct
338 static noinline int add_async_extent(struct async_cow *cow, in add_async_extent() argument
396 struct async_cow *async_cow, in compress_file_range() argument
604 add_async_extent(async_cow, start, num_bytes, in compress_file_range()
630 add_async_extent(async_cow, start, end - start + 1, in compress_file_range()
668 struct async_cow *async_cow) in submit_compressed_extents() argument
680 while (!list_empty(&async_cow->extents)) { in submit_compressed_extents()
681 async_extent = list_entry(async_cow->extents.next, in submit_compressed_extents()
698 ret = cow_file_range(inode, async_cow->locked_page, in submit_compressed_extents()
720 unlock_page(async_cow->locked_page); in submit_compressed_extents()
1071 struct async_cow *async_cow; in async_cow_start() local
1073 async_cow = container_of(work, struct async_cow, work); in async_cow_start()
1075 compress_file_range(async_cow->inode, async_cow->locked_page, in async_cow_start()
1076 async_cow->start, async_cow->end, async_cow, in async_cow_start()
1079 btrfs_add_delayed_iput(async_cow->inode); in async_cow_start()
1080 async_cow->inode = NULL; in async_cow_start()
1089 struct async_cow *async_cow; in async_cow_submit() local
1093 async_cow = container_of(work, struct async_cow, work); in async_cow_submit()
1095 root = async_cow->root; in async_cow_submit()
1096 nr_pages = (async_cow->end - async_cow->start + PAGE_CACHE_SIZE) >> in async_cow_submit()
1104 if (async_cow->inode) in async_cow_submit()
1105 submit_compressed_extents(async_cow->inode, async_cow); in async_cow_submit()
1110 struct async_cow *async_cow; in async_cow_free() local
1111 async_cow = container_of(work, struct async_cow, work); in async_cow_free()
1112 if (async_cow->inode) in async_cow_free()
1113 btrfs_add_delayed_iput(async_cow->inode); in async_cow_free()
1114 kfree(async_cow); in async_cow_free()
1121 struct async_cow *async_cow; in cow_file_range_async() local
1130 async_cow = kmalloc(sizeof(*async_cow), GFP_NOFS); in cow_file_range_async()
1131 BUG_ON(!async_cow); /* -ENOMEM */ in cow_file_range_async()
1132 async_cow->inode = igrab(inode); in cow_file_range_async()
1133 async_cow->root = root; in cow_file_range_async()
1134 async_cow->locked_page = locked_page; in cow_file_range_async()
1135 async_cow->start = start; in cow_file_range_async()
1143 async_cow->end = cur_end; in cow_file_range_async()
1144 INIT_LIST_HEAD(&async_cow->extents); in cow_file_range_async()
1146 btrfs_init_work(&async_cow->work, in cow_file_range_async()
1156 &async_cow->work); in cow_file_range_async()