.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "NTFS_DECOMPRESS" "9" "09 October 2005" "" ""
.SH NAME
ntfs_decompress \- decompress a compression block into an array of pages
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
int ntfs_decompress (struct page * \fIdest_pages[]\fB, int * \fIdest_index\fB, int * \fIdest_ofs\fB, const int \fIdest_max_index\fB, const int \fIdest_max_ofs\fB, const int \fIxpage\fB, char * \fIxpage_done\fB, u8 *const \fIcb_start\fB, const u32 \fIcb_size\fB, const loff_t \fIi_size\fB, const s64 \fIinitialized_size\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIdest_pages[]\fB\fR
destination array of pages
.TP
\fB\fIdest_index\fB\fR
current index into \fIdest_pages\fR (IN/OUT)
.TP
\fB\fIdest_ofs\fB\fR
current offset within \fIdest_pages\fR[\fIdest_index\fR] (IN/OUT)
.TP
\fB\fIdest_max_index\fB\fR
maximum index into \fIdest_pages\fR (IN)
.TP
\fB\fIdest_max_ofs\fB\fR
maximum offset within \fIdest_pages\fR[\fIdest_max_index\fR] (IN)
.TP
\fB\fIxpage\fB\fR
the target page (-1 if none) (IN)
.TP
\fB\fIxpage_done\fB\fR
set to 1 if xpage was completed successfully (IN/OUT)
.TP
\fB\fIcb_start\fB\fR
compression block to decompress (IN)
.TP
\fB\fIcb_size\fB\fR
size of compression block \fIcb_start\fR in bytes (IN)
.TP
\fB\fIi_size\fB\fR
file size when we started the read (IN)
.TP
\fB\fIinitialized_size\fB\fR
initialized file size when we started the read (IN)
.SH "DESCRIPTION"
.PP
The caller must have disabled preemption. \fBntfs_decompress\fR reenables it when
the critical section is finished.
.PP
This decompresses the compression block \fIcb_start\fR into the array of
destination pages \fIdest_pages\fR starting at index \fIdest_index\fR into \fIdest_pages\fR
and at offset \fIdest_pos\fR into the page \fIdest_pages\fR[\fIdest_index\fR].
.PP
When the page \fIdest_pages\fR[\fIxpage\fR] is completed, \fIxpage_done\fR is set to 1.
If xpage is -1 or \fIxpage\fR has not been completed, \fIxpage_done\fR is not modified.
.PP
\fIcb_start\fR is a pointer to the compression block which needs decompressing
and \fIcb_size\fR is the size of \fIcb_start\fR in bytes (8-64kiB).
.PP
Return 0 if success or -EOVERFLOW on error in the compressed stream.
\fIxpage_done\fR indicates whether the target page (\fIdest_pages\fR[\fIxpage\fR]) was
completed during the decompression of the compression block (\fIcb_start\fR).
.SH "WARNING"
.PP
This function *REQUIRES* PAGE_CACHE_SIZE >= 4096 or it will blow up
unpredicatbly! You have been warned!
.SH "NOTE TO HACKERS"
.PP
This function may not sleep until it has finished accessing
the compression block \fIcb_start\fR as it is a per-CPU buffer.