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 merging to run asyncronously in
kernel.
The "sta
This allows to see progress of backward merge. It shows the stage we are
at and for iterative stages it provides progress in form of how many
iteratious are done and how many iterations there are in total.
Locking:
The progress data consistency is protected by tgt->ctl_mutex, we always
update sta
In file included from ./include/linux/kernel.h:20,
from ./include/linux/list.h:9,
from ./include/linux/preempt.h:12,
from ./include/linux/spinlock.h:56,
from drivers/md/dm-qcow2-map.c:5:
drivers/md/dm-qcow2-map.c: In fu
The label "out" is excess, lets remove it in accordance with:
"If there is no cleanup needed then just return directly."
https://www.kernel.org/doc/html/v4.10/process/coding-style.html#centralized-exiting-of-functions
https://virtuozzo.atlassian.net/browse/VSTOR-100466
Signed-off-by: Pavel Tikhom
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 by
tgt->ctl_mutex.
https://virtuozzo.atlassi
That can be usefull for restarting qemu process while allowing backward
merging to run asyncronously in kernel.
v2: rebase on top of vz9.80.19, make completion event consistent, fix
deadlock when cancel after start and before work run
v3: weaken locking in progress printing a bit to decrease possi
Fixes compilation warning:
drivers/vhost/vsock.c: In function ‘vhost_vsock_reset_owner’:
drivers/vhost/vsock.c:846:16: warning: unused variable ‘i’ [-Wunused-variable]
846 | size_t i;
|^
Fixes: ad35221ad1341 ("vhost/vsock: add VHOST_RESET_OWNER ioctl")
Sign