[Pkg-libvirt-commits] [libguestfs] 12/59: v2v: Only emit fstrim warning when debugging (RHBZ#1168144).
Hilko Bengen
bengen at moszumanska.debian.org
Sun May 3 21:26:26 UTC 2015
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit 0576fdd0b6bafaeaa3d69bf6fc6fef0d0a1254d1
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Mon Apr 20 13:12:08 2015 +0100
v2v: Only emit fstrim warning when debugging (RHBZ#1168144).
fstrim is an optimization. If it fails, it's not fatal (although
virt-v2v will run a lot more slowly).
We also expect that it will fail for non-aligned NTFS partitions found
on old versions of Windows, and in that case there's nothing that can
be done about it.
Therefore only emit the warning when we are debugging.
---
v2v/v2v.ml | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
index b054bdf..1fc02bb 100644
--- a/v2v/v2v.ml
+++ b/v2v/v2v.ml
@@ -629,7 +629,12 @@ and do_fstrim ~verbose g no_trim inspect =
let mounted = try g#mount dev "/"; true with G.Error _ -> false in
if mounted then (
try g#fstrim "/"
- with G.Error msg -> warning (f_"%s (ignored)") msg
+ with G.Error msg ->
+ (* Only emit this warning when debugging, because otherwise
+ * it causes distress (RHBZ#1168144).
+ *)
+ if verbose then
+ warning (f_"%s (ignored)") msg
)
) fses
--
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