|
@@ -274,9 +274,19 @@ sync_nodes:
|
|
|
goto sync_nodes;
|
|
|
}
|
|
|
|
|
|
- ret = wait_on_node_pages_writeback(sbi, ino);
|
|
|
- if (ret)
|
|
|
- goto out;
|
|
|
+ /*
|
|
|
+ * If it's atomic_write, it's just fine to keep write ordering. So
|
|
|
+ * here we don't need to wait for node write completion, since we use
|
|
|
+ * node chain which serializes node blocks. If one of node writes are
|
|
|
+ * reordered, we can see simply broken chain, resulting in stopping
|
|
|
+ * roll-forward recovery. It means we'll recover all or none node blocks
|
|
|
+ * given fsync mark.
|
|
|
+ */
|
|
|
+ if (!atomic) {
|
|
|
+ ret = wait_on_node_pages_writeback(sbi, ino);
|
|
|
+ if (ret)
|
|
|
+ goto out;
|
|
|
+ }
|
|
|
|
|
|
/* once recovery info is written, don't need to tack this */
|
|
|
remove_ino_entry(sbi, ino, APPEND_INO);
|