Lines Matching refs:async_extent

325 struct async_extent {  struct
352 struct async_extent *async_extent; in add_async_extent() argument
354 async_extent = kmalloc(sizeof(*async_extent), GFP_NOFS); in add_async_extent()
355 BUG_ON(!async_extent); /* -ENOMEM */ in add_async_extent()
356 async_extent->start = start; in add_async_extent()
357 async_extent->ram_size = ram_size; in add_async_extent()
358 async_extent->compressed_size = compressed_size; in add_async_extent()
359 async_extent->pages = pages; in add_async_extent()
360 async_extent->nr_pages = nr_pages; in add_async_extent()
361 async_extent->compress_type = compress_type; in add_async_extent()
362 list_add_tail(&async_extent->list, &cow->extents); in add_async_extent()
652 static void free_async_extent_pages(struct async_extent *async_extent) in free_async_extent_pages() argument
656 if (!async_extent->pages) in free_async_extent_pages()
659 for (i = 0; i < async_extent->nr_pages; i++) { in free_async_extent_pages()
660 WARN_ON(async_extent->pages[i]->mapping); in free_async_extent_pages()
661 page_cache_release(async_extent->pages[i]); in free_async_extent_pages()
663 kfree(async_extent->pages); in free_async_extent_pages()
664 async_extent->nr_pages = 0; in free_async_extent_pages()
665 async_extent->pages = NULL; in free_async_extent_pages()
677 struct async_extent *async_extent; in submit_compressed_extents() local
688 async_extent = list_entry(async_cow->extents.next, in submit_compressed_extents()
689 struct async_extent, list); in submit_compressed_extents()
690 list_del(&async_extent->list); in submit_compressed_extents()
696 if (!async_extent->pages) { in submit_compressed_extents()
700 lock_extent(io_tree, async_extent->start, in submit_compressed_extents()
701 async_extent->start + in submit_compressed_extents()
702 async_extent->ram_size - 1); in submit_compressed_extents()
706 async_extent->start, in submit_compressed_extents()
707 async_extent->start + in submit_compressed_extents()
708 async_extent->ram_size - 1, in submit_compressed_extents()
721 inode, async_extent->start, in submit_compressed_extents()
722 async_extent->start + in submit_compressed_extents()
723 async_extent->ram_size - 1, in submit_compressed_extents()
728 kfree(async_extent); in submit_compressed_extents()
733 lock_extent(io_tree, async_extent->start, in submit_compressed_extents()
734 async_extent->start + async_extent->ram_size - 1); in submit_compressed_extents()
737 async_extent->compressed_size, in submit_compressed_extents()
738 async_extent->compressed_size, in submit_compressed_extents()
741 free_async_extent_pages(async_extent); in submit_compressed_extents()
744 unlock_extent(io_tree, async_extent->start, in submit_compressed_extents()
745 async_extent->start + in submit_compressed_extents()
746 async_extent->ram_size - 1); in submit_compressed_extents()
755 async_extent->start, in submit_compressed_extents()
756 async_extent->start + in submit_compressed_extents()
757 async_extent->ram_size - 1); in submit_compressed_extents()
767 btrfs_drop_extent_cache(inode, async_extent->start, in submit_compressed_extents()
768 async_extent->start + in submit_compressed_extents()
769 async_extent->ram_size - 1, 0); in submit_compressed_extents()
776 em->start = async_extent->start; in submit_compressed_extents()
777 em->len = async_extent->ram_size; in submit_compressed_extents()
785 em->ram_bytes = async_extent->ram_size; in submit_compressed_extents()
787 em->compress_type = async_extent->compress_type; in submit_compressed_extents()
800 btrfs_drop_extent_cache(inode, async_extent->start, in submit_compressed_extents()
801 async_extent->start + in submit_compressed_extents()
802 async_extent->ram_size - 1, 0); in submit_compressed_extents()
809 async_extent->start, in submit_compressed_extents()
811 async_extent->ram_size, in submit_compressed_extents()
814 async_extent->compress_type); in submit_compressed_extents()
816 btrfs_drop_extent_cache(inode, async_extent->start, in submit_compressed_extents()
817 async_extent->start + in submit_compressed_extents()
818 async_extent->ram_size - 1, 0); in submit_compressed_extents()
825 extent_clear_unlock_delalloc(inode, async_extent->start, in submit_compressed_extents()
826 async_extent->start + in submit_compressed_extents()
827 async_extent->ram_size - 1, in submit_compressed_extents()
832 async_extent->start, in submit_compressed_extents()
833 async_extent->ram_size, in submit_compressed_extents()
835 ins.offset, async_extent->pages, in submit_compressed_extents()
836 async_extent->nr_pages); in submit_compressed_extents()
839 struct page *p = async_extent->pages[0]; in submit_compressed_extents()
840 const u64 start = async_extent->start; in submit_compressed_extents()
841 const u64 end = start + async_extent->ram_size - 1; in submit_compressed_extents()
850 free_async_extent_pages(async_extent); in submit_compressed_extents()
853 kfree(async_extent); in submit_compressed_extents()
860 extent_clear_unlock_delalloc(inode, async_extent->start, in submit_compressed_extents()
861 async_extent->start + in submit_compressed_extents()
862 async_extent->ram_size - 1, in submit_compressed_extents()
868 free_async_extent_pages(async_extent); in submit_compressed_extents()
869 kfree(async_extent); in submit_compressed_extents()