.\" 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_READPAGE" "9" "09 October 2005" "" ""
.SH NAME
ntfs_readpage \- fill a page of a file with data from the device
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
int ntfs_readpage (struct file * \fIfile\fB, struct page * \fIpage\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIfile\fB\fR
open file to which the page \fIpage\fR belongs or NULL
.TP
\fB\fIpage\fB\fR
page cache page to fill with data
.SH "DESCRIPTION"
.PP
For non-resident attributes, \fBntfs_readpage\fR fills the \fIpage\fR of the open
file \fIfile\fR by calling the ntfs version of the generic \fBblock_read_full_page\fR
function, \fBntfs_read_block\fR, which in turn creates and reads in the buffers
associated with the page asynchronously.
.PP
For resident attributes, OTOH, \fBntfs_readpage\fR fills \fIpage\fR by copying the
data from the mft record (which at this stage is most likely in memory) and
fills the remainder with zeroes. Thus, in this case, I/O is synchronous, as
even if the mft record is not cached at this point in time, we need to wait
for it to be read in before we can do the copy.
.PP
Return 0 on success and -errno on error.