NTFS_DECOMPRESS

Section: (9)
Updated: 09 October 2005
Index Return to Main Contents

 

NAME

ntfs_decompress - decompress a compression block into an array of pages  

SYNOPSIS

"SYNOPSIS"

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);  

ARGUMENTS

dest_pages[]
destination array of pages
dest_index
current index into dest_pages (IN/OUT)
dest_ofs
current offset within dest_pages[dest_index] (IN/OUT)
dest_max_index
maximum index into dest_pages (IN)
dest_max_ofs
maximum offset within dest_pages[dest_max_index] (IN)
xpage
the target page (-1 if none) (IN)
xpage_done
set to 1 if xpage was completed successfully (IN/OUT)
cb_start
compression block to decompress (IN)
cb_size
size of compression block cb_start in bytes (IN)
i_size
file size when we started the read (IN)
initialized_size
initialized file size when we started the read (IN)
 

DESCRIPTION

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).  

WARNING

This function *REQUIRES* PAGE_CACHE_SIZE >= 4096 or it will blow up unpredicatbly! You have been warned!  

NOTE TO HACKERS

This function may not sleep until it has finished accessing the compression block cb_start as it is a per-CPU buffer.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION
WARNING
NOTE TO HACKERS

This document was created by man2html, using the manual pages.
Time: 00:02:33 GMT, October 09, 2005