Am 10.07.2020 um 11:59 hat Peter Maydell geschrieben: > On Fri, 10 Jul 2020 at 10:58, Kevin Wolf <kw...@redhat.com> wrote: > > > > Am 09.07.2020 um 16:15 hat Peter Maydell geschrieben: > > > dd/truncate etc won't work if the image file is not raw (eg if > > > it's qcow2). The only chance you have of something that's actually > > > generic would probably involve "qemu-img resize". But I'm a bit > > > wary of having an error message that recommends that, because > > > what if we got it wrong? > > > > What is your concern that we might get wrong? The suggestion is always > > extending the size rather than shrinking, so it should be harmless and > > easy to undo. (Hm, we should finally make --shrink mandatory for > > shrinking. We've printed a deprecation warning for almost three years.) > > If there's a qemu-img command line that will always only > extend the image size and never let the user accidentally > shrink it and throw away data, then great. I'd happily > recommend that.
I think removing deprecated behaviour is a change that we can still make in the early freeze. So if you agree, I'll send a patch that makes shrinking an image without --shrink a hard error in 5.1. Kevin