[Libguestfs] Tests and trimming vfat

Daniel P. Berrangé berrange at redhat.com
Wed Sep 5 15:58:26 UTC 2018


On Wed, Sep 05, 2018 at 04:53:03PM +0100, Daniel P. Berrangé wrote:
> On Wed, Sep 05, 2018 at 04:45:51PM +0100, Richard W.M. Jones wrote:
> > On Wed, Sep 05, 2018 at 04:41:01PM +0100, Daniel P. Berrangé wrote:
> > > On Wed, Sep 05, 2018 at 04:37:05PM +0100, Richard W.M. Jones wrote:
> > > > 
> > > > Here's a fun one:
> > > > 
> > > > + guestfish -N test-virt-sparsify-in-place-fstrim-unsupported.img=fs:vfat exit
> > > > + virt-sparsify --in-place test-virt-sparsify-in-place-fstrim-unsupported.img
> > > > + tee test-virt-sparsify-in-place-fstrim-unsupported.log
> > > > [   2.4] Trimming /dev/sda1
> > > > [   7.5] Sparsify in-place operation completed with no errors
> > > > + grep 'warning:.*fstrim' test-virt-sparsify-in-place-fstrim-unsupported.log
> > > > FAIL test-virt-sparsify-in-place-fstrim-unsupported.sh (exit status: 1)
> > > > 
> > > > We expect (for the purposes of the regression test) that vfat
> > > > filesystems cannot be trimmed.  It turns out that fstrim for vfat has
> > > > now been implemented in Linux (commit f663b5b38fff) :-)  Thanks
> > > > Wentao Wang (this is actually great for virt-v2v).
> > > > 
> > > > So we need to find another filesystem which doesn't support fstrim.
> > > > Or maybe just delete this regression test.
> > > > 
> > > > Thoughts?
> > > 
> > > Presumably something ancient like ext2 will not support it, and is unlikely
> > > to be given it given that its ancient with no active development.
> > 
> > I think it does because we're using the ext4 driver for ext2/3 ...
> 
> Yeah, a quick test confirms you're right.

Fedora has the "minix" FS driver built in its kernels and that lacks
trim. For RHEL though, I fear you might be out of luck as it only
compiles a very few FS drivers.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the Libguestfs mailing list