qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] qemu-img: add seek option to dd


From: Max Reitz
Subject: Re: [Qemu-block] qemu-img: add seek option to dd
Date: Fri, 22 Feb 2019 15:59:07 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0

On 20.02.19 06:54, Richard W.M. Jones wrote:
> It seems like it's not easy to write to a place in a qcow2 file using
> qemu-io or qemu-img.  For example suppose I want to overwrite blocks
> 100 and 101 with my own data:
> 
> $ qemu-img dd -f raw -O qcow2 bs=4096 skip=100 count=2 \
>               if=/tmp/input.raw of=/tmp/disk.qcow2
> qemu-img: /tmp/input.raw: cannot skip to specified offset
> 
> Skip is skipping the input, not the output.  Turning to qemu-io, it
> doesn't look like you can control the data written (only write
> patterns).
> 
> This patch looks good, but AFAICT it never went upstream:
> 
>   https://patchwork.kernel.org/patch/9273161/
>   "qemu-img: add seek option to dd"
> 
> Is there anything I'm missing?  What is the status of that patch?

Eric sent another version last year:

http://lists.nongnu.org/archive/html/qemu-block/2018-08/msg00513.html

My main issue is that dd should be a frontend to convert, but it still
isn't.  On top, I don't see why we need feature parity with dd when it's
also possible to use qemu-nbd and just the normal dd.

(Or qemu-blkfuse for which I should sent patches one of these days...)

I think it's wrong to re-implement existing tools in qemu.  Instead, we
should work on making it simpler for those existing tools to access qemu
images.

Note that while I did rant a bit about the concept of Eric's patch, I
didn't object it in principle.  I pointed out two technical issues, Eric
talked about a v2, but that never appeared, I think.

Max

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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