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? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
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. 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 :|
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 ... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
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