int ntfs_decompress (struct page * dest_pages[], int * dest_index, int * dest_ofs, const int dest_max_index, const int dest_max_ofs, const int xpage, char * xpage_done, u8 *const cb_start, const u32 cb_size, const loff_t i_size, const s64 initialized_size);
The caller must have disabled preemption. ntfs_decompress reenables it when the critical section is finished.
This decompresses the compression block cb_start into the array of destination pages dest_pages starting at index dest_index into dest_pages and at offset dest_pos into the page dest_pages[dest_index].
When the page dest_pages[xpage] is completed, xpage_done is set to 1. If xpage is -1 or xpage has not been completed, xpage_done is not modified.
cb_start is a pointer to the compression block which needs decompressing and cb_size is the size of cb_start in bytes (8-64kiB).
Return 0 if success or -EOVERFLOW on error in the compressed stream. xpage_done indicates whether the target page (dest_pages[xpage]) was completed during the decompression of the compression block (cb_start).
This function *REQUIRES* PAGE_CACHE_SIZE >= 4096 or it will blow up unpredicatbly! You have been warned!
This function may not sleep until it has finished accessing the compression block cb_start as it is a per-CPU buffer.