Re: [Devel] [PATCH v4 VZ9 3/5] dm-qcow2: make merge_backward command asyncronous

2025-03-04 Thread Andrey Zhadchenko
On 3/4/25 12:32, Pavel Tikhomirov wrote: On 3/4/25 18:51, Andrey Zhadchenko wrote: On 3/3/25 10:37, Pavel Tikhomirov wrote: This adds merge_backward "start", "complete" and "cancel" commands. By that we are able to split single merge_backward into two stages: start asyncronous merging and

Re: [Devel] [PATCH v4 VZ9 4/5] dm-qcow2: add merge_backward set_eventfd command

2025-03-04 Thread Andrey Zhadchenko
On 3/3/25 10:37, Pavel Tikhomirov wrote: This eventfd can be used to get an event when merge_backward start work have finished and is waiting for completion. Note: The eventfd can be changed even while work is running. Locking: The backward_merge.eventfd_ctx is protected from being released

Re: [Devel] [PATCH v4 VZ9 3/5] dm-qcow2: make merge_backward command asyncronous

2025-03-04 Thread Alexander Atanasov
On 3.03.25 11:37, Pavel Tikhomirov wrote: This adds merge_backward "start", "complete" and "cancel" commands. By that we are able to split single merge_backward into two stages: start asyncronous merging and completion. That can be usefull for restarting qemu process while allowing backward mergi

Re: [Devel] [PATCH v4 VZ9 4/5] dm-qcow2: add merge_backward set_eventfd command

2025-03-04 Thread Pavel Tikhomirov
On 3/4/25 19:41, Andrey Zhadchenko wrote: On 3/3/25 10:37, Pavel Tikhomirov wrote: This eventfd can be used to get an event when merge_backward start work have finished and is waiting for completion. Note: The eventfd can be changed even while work is running. Locking: The backward_merge.

Re: [Devel] [PATCH v4 VZ9 3/5] dm-qcow2: make merge_backward command asyncronous

2025-03-04 Thread Andrey Zhadchenko
On 3/3/25 10:37, Pavel Tikhomirov wrote: This adds merge_backward "start", "complete" and "cancel" commands. By that we are able to split single merge_backward into two stages: start asyncronous merging and completion. That can be usefull for restarting qemu process while allowing backward mer

Re: [Devel] [PATCH v4 VZ9 3/5] dm-qcow2: make merge_backward command asyncronous

2025-03-04 Thread Pavel Tikhomirov
On 3/4/25 18:51, Andrey Zhadchenko wrote: On 3/3/25 10:37, Pavel Tikhomirov wrote: This adds merge_backward "start", "complete" and "cancel" commands. By that we are able to split single merge_backward into two stages: start asyncronous merging and completion. That can be usefull for restart

Re: [Devel] [PATCH v4 VZ9 3/5] dm-qcow2: make merge_backward command asyncronous

2025-03-04 Thread Andrey Zhadchenko
On 3/4/25 12:55, Alexander Atanasov wrote: On 3.03.25 11:37, Pavel Tikhomirov wrote: This adds merge_backward "start", "complete" and "cancel" commands. By that we are able to split single merge_backward into two stages: start asyncronous merging and completion. That can be usefull for restart

Re: [Devel] [PATCH v4 VZ9 3/5] dm-qcow2: make merge_backward command asyncronous

2025-03-04 Thread Alexander Atanasov
On 4.03.25 14:08, Andrey Zhadchenko wrote: On 3/4/25 12:55, Alexander Atanasov wrote: On 3.03.25 11:37, Pavel Tikhomirov wrote: This adds merge_backward "start", "complete" and "cancel" commands. By that we are able to split single merge_backward into two stages: start asyncronous merging and

Re: [Devel] [PATCH v4 VZ9 3/5] dm-qcow2: make merge_backward command asyncronous

2025-03-04 Thread Pavel Tikhomirov
On 3/4/25 19:48, Andrey Zhadchenko wrote: On 3/4/25 12:32, Pavel Tikhomirov wrote: On 3/4/25 18:51, Andrey Zhadchenko wrote: On 3/3/25 10:37, Pavel Tikhomirov wrote: This adds merge_backward "start", "complete" and "cancel" commands. By that we are able to split single merge_backward i

Re: [Devel] [PATCH v4 VZ9 3/5] dm-qcow2: make merge_backward command asyncronous

2025-03-04 Thread Pavel Tikhomirov
@@ -63,7 +65,7 @@ static int qcow2_service_iter(struct qcow2_target *tgt, struct qcow2 *qcow2,   WRITE_ONCE(service_status, BLK_STS_OK);   for (pos = 0; pos < end; pos += step) { -    if (fatal_signal_pending(current)) { +    if (qcow2_backward_merge_should_stop(tgt)) {