> ret = sync_mapping_buffers(inode->i_mapping); > - if (!(inode->i_state & I_DIRTY)) > - return ret; > - if (datasync && !(inode->i_state & I_DIRTY_DATASYNC)) > - return ret; > - > > err = sync_inode_metadata(inode, 1); This makes fdatasync equivalent to fsync, which means a huge drop in performance for database an virtualization performance. I think the right aproach is to extend the sync_inode_metadata to writeback_single_inode chain with a datasync parameter so that we can do the correct decision there. Note that there are a lot more fsync implementations than just generic_file_fsync and exofs_fsync that have the same issue. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html