Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
tests: fstrim: Sync before running fstrim.
This makes fstrim work.  It's not clear why exactly.

Thanks: Paolo Bonzini.
  • Loading branch information
rwmjones committed Mar 14, 2014
1 parent 55730f6 commit d46ceea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions daemon/fstrim.c
Expand Up @@ -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)) {
Expand Down

0 comments on commit d46ceea

Please sign in to comment.