Lines Matching refs:async_extent
475 struct async_extent { struct
509 struct async_extent *async_extent; in add_async_extent() local
511 async_extent = kmalloc(sizeof(*async_extent), GFP_NOFS); in add_async_extent()
512 BUG_ON(!async_extent); /* -ENOMEM */ in add_async_extent()
513 async_extent->start = start; in add_async_extent()
514 async_extent->ram_size = ram_size; in add_async_extent()
515 async_extent->compressed_size = compressed_size; in add_async_extent()
516 async_extent->pages = pages; in add_async_extent()
517 async_extent->nr_pages = nr_pages; in add_async_extent()
518 async_extent->compress_type = compress_type; in add_async_extent()
519 list_add_tail(&async_extent->list, &cow->extents); in add_async_extent()
891 static void free_async_extent_pages(struct async_extent *async_extent) in free_async_extent_pages() argument
895 if (!async_extent->pages) in free_async_extent_pages()
898 for (i = 0; i < async_extent->nr_pages; i++) { in free_async_extent_pages()
899 WARN_ON(async_extent->pages[i]->mapping); in free_async_extent_pages()
900 put_page(async_extent->pages[i]); in free_async_extent_pages()
902 kfree(async_extent->pages); in free_async_extent_pages()
903 async_extent->nr_pages = 0; in free_async_extent_pages()
904 async_extent->pages = NULL; in free_async_extent_pages()
908 struct async_extent *async_extent, in submit_uncompressed_range() argument
911 u64 start = async_extent->start; in submit_uncompressed_range()
912 u64 end = async_extent->start + async_extent->ram_size - 1; in submit_uncompressed_range()
950 kfree(async_extent); in submit_uncompressed_range()
956 struct async_extent *async_extent, in submit_one_async_extent() argument
966 u64 start = async_extent->start; in submit_one_async_extent()
967 u64 end = async_extent->start + async_extent->ram_size - 1; in submit_one_async_extent()
983 if (!async_extent->pages) in submit_one_async_extent()
984 return submit_uncompressed_range(inode, async_extent, locked_page); in submit_one_async_extent()
986 ret = btrfs_reserve_extent(root, async_extent->ram_size, in submit_one_async_extent()
987 async_extent->compressed_size, in submit_one_async_extent()
988 async_extent->compressed_size, in submit_one_async_extent()
991 free_async_extent_pages(async_extent); in submit_one_async_extent()
1004 async_extent->ram_size, /* len */ in submit_one_async_extent()
1009 async_extent->ram_size, /* ram_bytes */ in submit_one_async_extent()
1010 async_extent->compress_type, in submit_one_async_extent()
1019 async_extent->ram_size, /* num_bytes */ in submit_one_async_extent()
1020 async_extent->ram_size, /* ram_bytes */ in submit_one_async_extent()
1025 async_extent->compress_type); in submit_one_async_extent()
1037 async_extent->ram_size, /* num_bytes */ in submit_one_async_extent()
1040 async_extent->pages, /* compressed_pages */ in submit_one_async_extent()
1041 async_extent->nr_pages, in submit_one_async_extent()
1044 const u64 start = async_extent->start; in submit_one_async_extent()
1045 const u64 end = start + async_extent->ram_size - 1; in submit_one_async_extent()
1051 free_async_extent_pages(async_extent); in submit_one_async_extent()
1054 kfree(async_extent); in submit_one_async_extent()
1067 free_async_extent_pages(async_extent); in submit_one_async_extent()
1068 kfree(async_extent); in submit_one_async_extent()
1081 struct async_extent *async_extent; in submit_compressed_extents() local
1089 async_extent = list_entry(async_chunk->extents.next, in submit_compressed_extents()
1090 struct async_extent, list); in submit_compressed_extents()
1091 list_del(&async_extent->list); in submit_compressed_extents()
1092 extent_start = async_extent->start; in submit_compressed_extents()
1093 ram_size = async_extent->ram_size; in submit_compressed_extents()
1095 ret = submit_one_async_extent(inode, async_chunk, async_extent, in submit_compressed_extents()