Go to file
Rusty Bird 4f59b3df6f
qfile-unpacker: syncfs() to avoid qvm-move-to-vm data loss
Commit https://github.com/QubesOS/qubes-linux-utils/commit/c1d42f1 --
"qfile-unpacker: do not call fdatasync() at each file" fixing
QubesOS/qubes-issues#1257 -- increased the chance of data loss with
qvm-move-to-vm: Say it nominally succeeds, and *deletes* the files from
the source VM. Soon after, the destination VM or the system could crash,
or an external drive hosting ~/QubesIncoming/srcVM could get unplugged
by accident, all before the data had really been persisted to disk.

But reverting the commit (ignoring the performance issue) wouldn't
completely solve this:

  "Calling fsync() does not necessarily ensure that the entry in the
   directory containing the file has also reached disk. For that an
   explicit fsync() on a file descriptor for the directory is also
   needed."  - fsync(2)

It gets even worse for "slow symlinks" (whose target is too long to be
stored directly in the inode metadata), apparently they can't be synced
at all individually.

So instead, just call syncfs() once after everything has been unpacked:

  + Should prevent all data loss (if fs and disk are well behaved)
  + Allows caching and reordering -> no slowdown with many small files
  - Blocks until any unrelated writes on the filesystem finish :\
2015-11-18 13:11:30 +00:00
archlinux
core impconverter: add icon data getters 2015-09-20 04:47:38 +02:00
debian version 3.1.3 2015-11-11 05:12:11 +01:00
dracut initramfs: fix swap size 2015-11-13 14:42:51 +01:00
initramfs-tools debian: introduce qubes-kernel-vm-support package 2015-11-11 05:10:59 +01:00
kernel-modules kernel-modules: build/install u2mfn module by default 2015-11-08 03:51:18 +01:00
pkgs
qmemman use 64-bit integers for memory sizes to support > 2 TB RAM 2015-10-10 01:37:30 +02:00
qrexec-lib qfile-unpacker: syncfs() to avoid qvm-move-to-vm data loss 2015-11-18 13:11:30 +00:00
rpm_spec rpm: disable debuginfo subpackage in qubes-kernel-vm-support 2015-11-13 06:02:37 +01:00
udev
.gitignore
Makefile debian: introduce qubes-kernel-vm-support package 2015-11-11 05:10:59 +01:00
Makefile.builder
version version 3.1.3 2015-11-11 05:12:11 +01:00