There are number of races exist caused by lack of synchronization between DIO workers in flight and truncate/fsync/punch_hole routines This patch series try to optimize and fix existing DIO/AIO code. This patch-set survives after all my tests(except fsdefrag) I observe significant performance improvements for big SMP hosts performind DIO for single file. TOC: # first one is simply a cleanup ext4: ext4_inode_info diet # Cleanup and bug fixes ext4: completed_io locking cleanup V2 ext4: serialize dio nonlocked reads with defrag workers V3 ext4: punch_hole should wait for DIO writers ext4: serialize unlocked dio reads with truncate ext4: endless truncate due to nonlocked dio readers V2 ext4: serialize truncate with owerwrite DIO workers V2 # Nasty panch_hole regressions ext4: fix ext_remove_space for punch_hole case ext4: fix ext4_ext_remove_space tree traversal Signed-off-by: Dmitry Monakhov <dmonakhov@xxxxxxxxxx> ext4.h | 27 +++++++++++++++---- extents.c | 82 ++++++++++++++++++++++++++++++++-------------------------- fsync.c | 47 +++++++++++---------------------- indirect.c | 17 +++++++++--- inode.c | 49 ++++++++++++++-------------------- move_extent.c | 8 +++++ page-io.c | 76 ++++++++++++++--------------------------------------- super.c | 1 8 files changed, 148 insertions(+), 159 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html