[Pkg-libvirt-commits] [libguestfs] 45/59: tests: fstrim: Sync before running fstrim.
Hilko Bengen
bengen at moszumanska.debian.org
Thu Mar 20 23:05:40 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit d46ceea6014006ab19b6f795e2e28a7360d90b2c
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Fri Mar 14 13:14:24 2014 +0000
tests: fstrim: Sync before running fstrim.
This makes fstrim work. It's not clear why exactly.
Thanks: Paolo Bonzini.
---
daemon/fstrim.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/daemon/fstrim.c b/daemon/fstrim.c
index 2aad155..1ad3630 100644
--- a/daemon/fstrim.c
+++ b/daemon/fstrim.c
@@ -50,6 +50,11 @@ do_fstrim (const char *path,
CLEANUP_FREE char *out = NULL, *err = NULL;
int r;
+ /* Suggested by Paolo Bonzini to fix fstrim problem.
+ * https://lists.gnu.org/archive/html/qemu-devel/2014-03/msg02978.html
+ */
+ sync_disks ();
+
ADD_ARG (argv, i, str_fstrim);
if ((optargs_bitmask & GUESTFS_FSTRIM_OFFSET_BITMASK)) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list