qemu-block
[Top][All Lists]
Advanced

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

Re: RFC: Qemu backup interface plans


From: Max Reitz
Subject: Re: RFC: Qemu backup interface plans
Date: Tue, 25 May 2021 10:50:11 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 19.05.21 08:11, Vladimir Sementsov-Ogievskiy wrote:
18.05.2021 19:39, Max Reitz wrote:

[...]

On 17.05.21 14:07, Vladimir Sementsov-Ogievskiy wrote:

[...]

Not also, that there is another benefit of such thing: we'll implement this callback in qcow2 driver, so that backup will read clusters not in guest cluster order, but in host cluster order, to read more sequentially, which should bring better performance on rotating disks.

I’m not exactly sure how you envision this to work, but block_status also already gives you the host offset in *map.


But block-status doesn't give a possibility to read sequentially. For this, user should call block-status several times until the whole disk covered, then sort the segments by host offset. I wonder, could it be implemented as some iterator, like

read_iter = bdrv_get_sequential_read_iter(source)

while (extents = bdrv_read_next(read_iter)):
   for ext in extents:
     start_writing_task(target, ext.offset, ext.bytes, ext.qiov)

where bdrv_read_next will read guest data in host-cluster-sequence..

How would you implement this, though? qcow2 doesn’t have a reverse mapping either, so it too would need to read all L2 table entries and sort them, wouldn’t it?

Max




reply via email to

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