qemu/docs/devel/migration
Fabiano Rosas 61dec06082 migration/multifd: Don't fsync when closing QIOChannelFile
Commit bc38feddeb ("io: fsync before closing a file channel") added a
fsync/fdatasync at the closing point of the QIOChannelFile to ensure
integrity of the migration stream in case of QEMU crash.

The decision to do the sync at qio_channel_close() was not the best
since that function runs in the main thread and the fsync can cause
QEMU to hang for several minutes, depending on the migration size and
disk speed.

To fix the hang, remove the fsync from qio_channel_file_close().

At this moment, the migration code is the only user of the fsync and
we're taking the tradeoff of not having a sync at all, leaving the
responsibility to the upper layers.

Fixes: bc38feddeb ("io: fsync before closing a file channel")
Reviewed-by: "Daniel P. Berrangé" <berrange@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240305195629.9922-1-farosas@suse.de
Link: https://lore.kernel.org/r/20240305174332.2553-1-farosas@suse.de
[peterx: add more comment to the qio_channel_close()]
Signed-off-by: Peter Xu <peterx@redhat.com>
2024-03-11 14:41:40 -04:00
..
best-practices.rst docs/migration: Split "Debugging" and "Firmware" 2024-01-16 11:16:10 +08:00
compatibility.rst docs/migration: Split "Backwards compatibility" separately 2024-01-16 11:16:10 +08:00
dirty-limit.rst docs/migration: Split "dirty limit" 2024-01-16 11:16:10 +08:00
features.rst migration/ram: Introduce 'mapped-ram' migration capability 2024-03-01 15:42:04 +08:00
index.rst docs/migration: Further move virtio to be feature of migration 2024-01-16 11:16:10 +08:00
main.rst migration/multifd: Don't fsync when closing QIOChannelFile 2024-03-11 14:41:40 -04:00
mapped-ram.rst migration/ram: Introduce 'mapped-ram' migration capability 2024-03-01 15:42:04 +08:00
postcopy.rst docs/migration: Organize "Postcopy" page 2024-01-16 11:16:10 +08:00
vfio.rst
virtio.rst docs/migration: Convert virtio.txt into rST 2024-01-16 11:16:10 +08:00