[Libguestfs] [PATCH 1/2] v2v: Make fstrim warning clearer (RHBZ#1366456).

Richard W.M. Jones rjones at redhat.com
Fri Aug 12 21:19:09 UTC 2016


On Fri, Aug 12, 2016 at 04:50:31PM +0200, Pino Toscano wrote:
> On Friday, 12 August 2016 10:37:29 CEST Richard W.M. Jones wrote:
> > This reverts the change made for RHBZ#1168144.  The warning is now
> > always displayed.
> > 
> > It would be nice to make the warning actionable, but there is not a
> > lot that end users can do since fstrim is such a complex topic
> > interacting with all filesystem and storage layers.
> > ---
> >  v2v/v2v.ml | 6 +-----
> >  1 file changed, 1 insertion(+), 5 deletions(-)
> > 
> > diff --git a/v2v/v2v.ml b/v2v/v2v.ml
> > index e221f29..8365aae 100644
> > --- a/v2v/v2v.ml
> > +++ b/v2v/v2v.ml
> > @@ -397,11 +397,7 @@ and do_fstrim g inspect =
> >        if mounted then (
> >          try g#fstrim "/"
> >          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
> > +          warning (f_"fstrim on guest filesystem %s failed.  This may mean that conversion takes longer than normal.  Usually you can ignore this as fstrim is just an optimization.  Not all filesystems support trimming, and it can depend on specific details of the filesystem, alignment and backing storage.  Original message: %s") dev msg
> >        )
> 
> The idea is OK, but the message a bit too long perhaps? I'd keep the
> warning short here, and add the longer bit in an own paragraph in the
> manual.

I despair that no one reads the manual ...

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html




More information about the Libguestfs mailing list