From: Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>
To: Konstantin Khorenko <khorenko@virtuozzo.com>
Cc: Den Lunev <den@virtuozzo.com>, devel@openvz.org
Subject: [Devel] [PATCH hci-8.2 3/3] dm/push_backup: remove the push_backup_read and push_backup_write messages
Date: Wed, 25 Nov 2026 11:29:53 +0000 [thread overview]
Message-ID: <20261125-push-backup-fixes-v1-3-8d5cc55c30a1@virtuozzo.com> (raw)
In-Reply-To: <20261125-push-backup-fixes-v1-0-8d5cc55c30a1@virtuozzo.com>
The current ploop-backup gets the ranges to back up and reports the
backed up ranges through the event fd, see commit d723a1617e61
("dm/push_backup: add event file descriptor interface"). It does not
send the push_backup_read and push_backup_write messages anymore.
push_backup_read is also the message that sleeps inside
target_message() with md->io_barrier SRCU read locked, which is the
reason the fd interface was added. Remove both messages, so that this
path cannot be used again.
push_backup_write() stays, because pb_fd_write() uses it. Also drop the
reference to the removed message from the comment of the fd write() in
the uapi header.
https://virtuozzo.atlassian.net/browse/VSTOR-155816
Feature: dm-backup: push backup target driver
Signed-off-by: Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>
---
drivers/md/dm-push-backup.c | 26 --------------------------
include/uapi/linux/dm-push-backup.h | 5 ++---
2 files changed, 2 insertions(+), 29 deletions(-)
diff --git a/drivers/md/dm-push-backup.c b/drivers/md/dm-push-backup.c
index 433c61b63802..e01e6c464089 100644
--- a/drivers/md/dm-push-backup.c
+++ b/drivers/md/dm-push-backup.c
@@ -550,24 +550,6 @@ static int pb_wait_range(struct push_backup *pb, u64 *clu, u64 *nr)
}
}
-static int push_backup_read(struct push_backup *pb,
- char *result, unsigned int maxlen)
-{
- unsigned int sz = 0;
- u64 clu, nr;
- int ret;
-
- if (!pb)
- return -EBADF;
-
- ret = pb_wait_range(pb, &clu, &nr);
- if (ret == -ERESTARTSYS)
- ret = -EINTR;
- if (ret == 1)
- DMEMIT("%llu:%llu", clu, nr);
- return ret;
-}
-
static int push_backup_write(struct push_backup *pb, u64 clu, u64 nr)
{
u64 i, key, nr_clus = pb->nr_clus;
@@ -790,14 +772,6 @@ static int pb_message(struct dm_target *ti, unsigned int argc, char **argv,
pb_watch_pid(pb);
} else if (!strcmp(argv[0], "push_backup_stop")) {
ret = push_backup_stop(pb, result, maxlen);
- } else if (!strcmp(argv[0], "push_backup_read")) {
- if (argc != 1)
- goto unlock;
- ret = push_backup_read(pb, result, maxlen);
- } else if (!strcmp(argv[0], "push_backup_write")) {
- if (argc != 2 || sscanf(argv[1], "%llu:%llu", &val, &val2) != 2)
- goto unlock;
- ret = push_backup_write(pb, val, val2);
} else if (!strcmp(argv[0], "push_backup_statistics")) {
ret = push_backup_statistics(pb, result, maxlen);
} else if (!strcmp(argv[0], "push_backup_get_fd")) {
diff --git a/include/uapi/linux/dm-push-backup.h b/include/uapi/linux/dm-push-backup.h
index b43e2e55dc69..b8d336f9fcc2 100644
--- a/include/uapi/linux/dm-push-backup.h
+++ b/include/uapi/linux/dm-push-backup.h
@@ -30,9 +30,8 @@
* EBADMSG - internal inconsistency of the pending state.
*
* write(fd, &range, sizeof(range)):
- * acknowledge that @range has been backed up; equivalent to the
- * "push_backup_write clu:nr" message. Fails with E2BIG if @range is out
- * of the device, ESTALE and ENODEV as read(), and EFAULT.
+ * acknowledge that @range has been backed up. Fails with E2BIG if @range
+ * is out of the device, ESTALE and ENODEV as read(), and EFAULT.
*/
#ifndef _UAPI_LINUX_DM_PUSH_BACKUP_H
#define _UAPI_LINUX_DM_PUSH_BACKUP_H
--
2.43.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-11-25 11:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 11:29 [Devel] [PATCH hci-8.2 0/3] dm/push_backup: fix two old bugs and remove the unused messages Vasileios Almpanis
2026-11-25 11:29 ` [Devel] [PATCH hci-8.2 1/3] dm/push_backup: reject a cluster size of 0 Vasileios Almpanis
2026-11-25 11:29 ` [Devel] [PATCH hci-8.2 2/3] dm/push_backup: free the bitmaps of an expired session on restart Vasileios Almpanis
2026-11-25 11:47 ` Konstantin Khorenko
2026-11-25 11:29 ` Vasileios Almpanis [this message]
2026-11-25 11:47 ` [Devel] [PATCH hci-8.2 3/3] dm/push_backup: remove the push_backup_read and push_backup_write messages Konstantin Khorenko
2026-11-25 11:47 ` [Devel] [PATCH hci-8.2 0/3] dm/push_backup: fix two old bugs and remove the unused messages Konstantin Khorenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261125-push-backup-fixes-v1-3-8d5cc55c30a1@virtuozzo.com \
--to=vasileios.almpanis@virtuozzo.com \
--cc=den@virtuozzo.com \
--cc=devel@openvz.org \
--cc=khorenko@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox