qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v7 1/2] raw_bsd: add offset and size options


From: Kevin Wolf
Subject: Re: [Qemu-block] [PATCH v7 1/2] raw_bsd: add offset and size options
Date: Thu, 27 Oct 2016 15:32:14 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 27.10.2016 um 14:18 hat Tomáš Golembiovský geschrieben:
> Added two new options 'offset' and 'size'. This makes it possible to use
> only part of the file as a device. This can be used e.g. to limit the
> access only to single partition in a disk image or use a disk inside a
> tar archive (like OVA).
> 
> When 'size' is specified we do our best to honour it.
> 
> Signed-off-by: Tomáš Golembiovský <address@hidden>

The changes that you made look correct to me, but I'm afraid they aren't
complete: .bdrv_co_pwrite_zeroes() and .bdrv_co_pdiscard() don't
consider the offset and size, so calling these when an offset is used
will result in data corruption.

It might also be necessary to return -ENOTSUP in .bdrv_probe_geometry()
because we may return geometry for the real image file size rather than
the part that is visible for the guest.

I didn't see any other callbacks that involve offsets, but please
double-check.

Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]