int ntfs_dir_fsync (struct file * filp, struct dentry * dentry, int datasync);
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.
In the past filp could be NULL so we ignore it as we don't need it anyway.
Caller must hold i_sem on the inode.
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.