[Libguestfs] Tests and trimming vfat

Pino Toscano ptoscano at redhat.com
Wed Sep 5 15:49:01 UTC 2018


On Wednesday, 5 September 2018 17:41:01 CEST 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?

What about filesystems such as minix or cramfs (their mkfs helpers are
part of util-linux), or nilfs2/jfs/hfsplus?

> Presumably something ancient like ext2 will not support it, and is unlikely
> to be given it given that its ancient with no active development.

Nowadays there is no more separate ext2 module in linux, and the ext4
module handles it as well.

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20180905/da47d3e6/attachment.sig>


More information about the Libguestfs mailing list