.\" 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_COMMIT_WRITE" "9" "09 October 2005" "" ""
.SH NAME
ntfs_commit_write \- commit the received data
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
int ntfs_commit_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 already been copied into the \fIpage\fR\&. \fBntfs_prepare_write\fR has been
called before the data copied and it returned success so we can take the
results of various BUG checks and some error handling for granted.
.PP
Need to mark modified blocks dirty so they get written out later when
\fBntfs_writepage\fR is invoked by the VM.
.PP
Return 0 on success or -errno on error.
.PP
Should be using \fBgeneric_commit_write\fR\&. This marks buffers uptodate and
dirty, sets the page uptodate if all buffers in the page are uptodate, and
updates i_size if the end of io is beyond i_size. In that case, it also
marks the inode dirty.
.PP
Cannot use \fBgeneric_commit_write\fR due to ntfs specialities but can look at
it for implementation guidance.
.PP
If things have gone as outlined in \fBntfs_prepare_write\fR, then we do not
need to do any page content modifications here at all, except in the write
to resident attribute case, where we need to do the uptodate bringing here
which we combine with the copying into the mft record which means we save
one atomic kmap.