.\" 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_PREPARE_WRITE" "9" "09 October 2005" "" "" .SH NAME ntfs_prepare_write \- prepare a page for receiving data .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp int ntfs_prepare_write (struct file * \fIfile\fB, struct page * \fIpage\fB, unsigned \fIfrom\fB, unsigned \fIto\fB); \fR .SH "ARGUMENTS" .TP \fB\fIfile\fB\fR -- undescribed -- .TP \fB\fIpage\fB\fR -- undescribed -- .TP \fB\fIfrom\fB\fR -- undescribed -- .TP \fB\fIto\fB\fR -- undescribed -- .SH "DESCRIPTION" .PP .PP This is called from \fBgeneric_file_write\fR with i_sem held on the inode (\fIpage\fR->mapping->host). The \fIpage\fR is locked but not \fBkmap\fRped. The source data has not yet been copied into the \fIpage\fR\&. .PP Need to extend the attribute/fill in holes if necessary, create blocks and make partially overwritten blocks uptodate, .PP i_size is not to be modified yet. .PP Return 0 on success or -errno on error. .PP Should be using \fBblock_prepare_write\fR [support for sparse files] or \fBcont_prepare_write\fR [no support for sparse files]. Cannot do that due to ntfs specifics but can look at them for implementation guidance. .SH "NOTE" .PP In the range, \fIfrom\fR is inclusive and \fIto\fR is exclusive, i.e. \fIfrom\fR is the first byte in the page that will be written to and \fIto\fR is the first byte after the last byte that will be written to.