On 29/02/2016 09:14, Markus Armbruster wrote: > I completely agree with you that Get LBA Status cannot just reflect the > top layer. But that's not what I meant to propose. Let me try to > explain myself more clearly. > > Consider a QCOW2 image D (for delta) with a backing file B (for base). > If you open it normally, you see "D over B". Get LBA Status should > certainly claim the "deallocated" state only for blocks that are > allocated neither in D nor B. > > However, you can also open D *without* its backing file. Then you see > "D over nothing". Here, get LBA Status should claim "deallocated" state > for anything not allocated in D.
Ok, this makes more sense. The question then is whether to implement this NBD server inside QEMU, or outside it as a separate process to which QEMU "pushes" blocks as in the existing backup job. I would prefer the latter, so that it is possible to implement various APIs (get block status, but also VMware or Parallels or whatever). Basically the same points made in https://lists.gnu.org/archive/html/qemu-devel/2013-03/msg01969.html still apply. Paolo