.\" 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 "__MARK_MFT_RECORD_DIRTY" "9" "09 October 2005" "" ""
.SH NAME
__mark_mft_record_dirty \- set the mft record and the page containing it dirty
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
void __mark_mft_record_dirty (ntfs_inode * \fIni\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIni\fB\fR
ntfs inode describing the mapped mft record
.SH "DESCRIPTION"
.PP
Internal function. Users should call \fBmark_mft_record_dirty\fR instead.
.PP
Set the mapped (extent) mft record of the (base or extent) ntfs inode \fIni\fR,
as well as the page containing the mft record, dirty. Also, mark the base
vfs inode dirty. This ensures that any changes to the mft record are
written out to disk.
.SH "NOTE"
.PP
We only set I_DIRTY_SYNC and I_DIRTY_DATASYNC (and not I_DIRTY_PAGES)
on the base vfs inode, because even though file data may have been modified,
it is dirty in the inode meta data rather than the data page cache of the
inode, and thus there are no data pages that need writing out. Therefore, a
full \fBmark_inode_dirty\fR is overkill. A \fBmark_inode_dirty_sync\fR, on the
other hand, is not sufficient, because I_DIRTY_DATASYNC needs to be set to
ensure ->write_inode is called from \fBgeneric_osync_inode\fR and this needs to
happen or the file data would not necessarily hit the device synchronously,
even though the vfs inode has the O_SYNC flag set. Also, I_DIRTY_DATASYNC
simply ``feels'' better than just I_DIRTY_SYNC, since the file data has not
actually hit the block device yet, which is not what I_DIRTY_SYNC on its own
would suggest.