On 05/23/2011 10:56 AM, Kevin Wolf wrote:
Am 23.05.2011 17:24, schrieb Markus Armbruster:
Kevin Wolf<kw...@redhat.com> writes:
An fd: protocol can't easily support reopen. So fail it. This doesn't
break any existing usage. It's just a restriction on the new protocol.
Restrictions can render the new protocol useless in practice, but we're
not "breaking qemu without libvirt" there.
Perhaps we can make relax the restriction on some system by avoiding the
reopen in a system-dependent way.
Right, you only get the regression once libvirt starts using it (or even
worse, qemu itself, like Blue Swirl suggested). Doesn't make it much better.
libvirt already has the problem you describe. QEMU is designed assuming
that we can access whatever resources the invoking user can. That's how
our UI is constructed.
But libvirt chooses to invoke QEMU in such a way that the actual QEMU
process does not have the same rights as the invoking user. In fact,
the context is entirely different.
That means that to get isolation, libvirt has to understand what QEMU
does for each operation and then do some magic behind the scenes to make
it all work.
This is not different really. 'commit' could require magic in libvirt
anyway if libvirt was smart enough to mark the backing file with
read-only rights.
libvirt already has to parse image file formats to figure out backing
files so it can set the permissions right.
Regards,
Anthony Liguori
Kevin