.\" 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_DIR_FSYNC" "9" "09 October 2005" "" "" .SH NAME ntfs_dir_fsync \- sync a directory to disk .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp int ntfs_dir_fsync (struct file * \fIfilp\fB, struct dentry * \fIdentry\fB, int \fIdatasync\fB); \fR .SH "ARGUMENTS" .TP \fB\fIfilp\fB\fR directory to be synced .TP \fB\fIdentry\fB\fR dentry describing the directory to sync .TP \fB\fIdatasync\fB\fR if non-zero only flush user data and not metadata .SH "DESCRIPTION" .PP Data integrity sync of a directory to disk. Used for fsync, fdatasync, and msync system calls. This function is based on file.c::\fBntfs_file_fsync\fR\&. .PP Write the mft record and all associated extent mft records as well as the \fB$INDEX_ALLOCATION\fR and \fB$BITMAP\fR attributes and then sync the block device. .PP If \fIdatasync\fR 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. .SH "NOTE" .PP In the past \fIfilp\fR could be NULL so we ignore it as we don't need it anyway. .SH "LOCKING" .PP Caller must hold i_sem on the inode. .SH "TODO" .PP 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 \fB$BITMAP\fR attribute if it is present which is the important one for a directory so things are not too bad.