qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/2] qemu-nbd: Add --image-size option


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 2/2] qemu-nbd: Add --image-size option
Date: Tue, 20 Sep 2016 13:45:08 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0


On 20/09/2016 13:12, Daniel P. Berrange wrote:
> On Tue, Sep 20, 2016 at 11:59:28AM +0200, Paolo Bonzini wrote:
>>
>>
>> On 20/09/2016 11:41, Tomáš Golembiovský wrote:
>>> When image is part of the file it makes sense to limit the length of the
>>> image in the file. Otherwise it is assumed that the image spans to the
>>> end of the file. This assumption may lead to reads/writes outside of the
>>> image and thus lead to errors or data corruption.
>>>
>>> To limit the assumed image size new option is introduced.
>>
>> The patch makes sense, but I think the commit message is incorrect
>> because this bug is already fixed by patch 1.  Also, the option in the
>> help is --device-size, not --image-size; I would just call it --size.
> 
> I don't think it makes sense as a special case in qemu-nbd.
> 
> It feels like this is better done by extending the 'raw'
> block driver with 'offset' and 'length' parameters. You
> can then layer the 'raw' block driver over any existing
> QEMU blocker driver, anywhere in QEMU / tools that accept
> a block device description. No need to add extra parameters
> to any of the programs.

This makes sense too (and then --offset and partitions can be
implemented on top).

Paolo



reply via email to

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