NTFS_DIR_FSYNC

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

 

NAME

ntfs_dir_fsync - sync a directory to disk  

SYNOPSIS

"SYNOPSIS"

int ntfs_dir_fsync (struct file * filp, struct dentry * dentry, int datasync);  

ARGUMENTS

filp
directory to be synced
dentry
dentry describing the directory to sync
datasync
if non-zero only flush user data and not metadata
 

DESCRIPTION

Data integrity sync of a directory to disk. Used for fsync, fdatasync, and msync system calls. This function is based on file.c::ntfs_file_fsync.

Write the mft record and all associated extent mft records as well as the $INDEX_ALLOCATION and $BITMAP attributes and then sync the block device.

If datasync is true, we do not wait on the inode(s) to be written out but we always wait on the page cache pages to be written out.  

NOTE

In the past filp could be NULL so we ignore it as we don't need it anyway.  

LOCKING

Caller must hold i_sem on the inode.  

TODO

We should probably also write all attribute/index inodes associated with this inode but since we have no simple way of getting to them we ignore this problem for now. We do write the $BITMAP attribute if it is present which is the important one for a directory so things are not too bad.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION
NOTE
LOCKING
TODO

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