__MARK_MFT_RECORD_DIRTY

Section: (9)
Updated: 09 October 2005
Index Return to Main Contents

 

NAME

__mark_mft_record_dirty - set the mft record and the page containing it dirty  

SYNOPSIS

"SYNOPSIS"

void __mark_mft_record_dirty (ntfs_inode * ni);  

ARGUMENTS

ni
ntfs inode describing the mapped mft record
 

DESCRIPTION

Internal function. Users should call mark_mft_record_dirty instead.

Set the mapped (extent) mft record of the (base or extent) ntfs inode ni, 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.  

NOTE

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 mark_inode_dirty is overkill. A mark_inode_dirty_sync, on the other hand, is not sufficient, because I_DIRTY_DATASYNC needs to be set to ensure ->write_inode is called from generic_osync_inode 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.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION
NOTE

This document was created by man2html, using the manual pages.
Time: 00:01:52 GMT, October 09, 2005