On Fri, Jan 17, 2014 at 03:17:10PM +0800, Stefan Hajnoczi wrote: > On Mon, Jan 13, 2014 at 03:18:44PM -0500, Jeff Cody wrote: > > If a snapshot is larger than a backing file, then the offline bdrv_commit > > and > > the live active layer commit will fail with an i/o error (usually). A live > > commit of a non-active layer will complete successfully, as it runs > > bdrv_truncate() on the backing image to resize it to the larger size. > > > > For both bdrv_commit() and commit_active_start(), this series will resize > > the underlying base image if needed. If the resize fails, an error will > > be returned. > > This got me thinking about the opposite case: when the snapshot is > smaller than the backing file. We leave the backing file with its > original size. In practice this is "safe" because the partition and > volume metadata should show the smaller size. If the user really wants > to shrink the device they can still truncate after completing the > "commit" operation. > > Can you update the QEMU documentation to explicitly cover both snapshot > > backing and snapshot < backing cases? >
Yes, no problem.