Currently, if we do get_node_of_data before f2fs_lock_op, there may be dead lock as follows, where process A would be in infinite loop, and B will NOT be awaked.
Process A(cp): Process B: f2fs_lock_all(sbi) get_dnode_of_data <---- lock dn.node_page flush_nodes f2fs_lock_op However, in do_write_data_page path, we had better do get_node_of_data first, since we can check IPU in prior and do IPU without f2fs_lock_op. It make senses for our current FSYNC IPU to avoid being blocked by cp. What's more, in patch 3), we do IPU if sync io is blocked by cp. Hou Pengyang (3): f2fs: do get_dnode_of_data before f2fs_lock_op f2fs: check IPU after reading dnode from disk f2fs: try IPU if sync io is blocked by cp fs/f2fs/data.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++---------- fs/f2fs/f2fs.h | 6 +++++ fs/f2fs/node.c | 1 + 3 files changed, 71 insertions(+), 13 deletions(-) -- 2.10.1 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel