mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
tests: fstrim: Sync before running fstrim.
This makes fstrim work. It's not clear why exactly. Thanks: Paolo Bonzini.
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user