[Devel] [PATCH RHEL8 COMMIT] ploop: Add synonim for "get_delta_name"

Konstantin Khorenko khorenko at virtuozzo.com
Mon May 24 12:02:30 MSK 2021


The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.31
------>
commit 0acd8053359b2ede1aee9f664d96a7c77b7db69b
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Mon May 24 12:02:30 2021 +0300

    ploop: Add synonim for "get_delta_name"
    
    Delta is a term of ploop. To fit generic interface
    for other types of images, rename it to "get_img_name".
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/md/dm-ploop-cmd.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/md/dm-ploop-cmd.c b/drivers/md/dm-ploop-cmd.c
index 063a687ecdf4..63cca8ab0e05 100644
--- a/drivers/md/dm-ploop-cmd.c
+++ b/drivers/md/dm-ploop-cmd.c
@@ -1565,7 +1565,9 @@ void process_deferred_cmd(struct ploop *ploop, struct ploop_index_wb *piwb)
 
 static bool msg_wants_down_read(const char *cmd)
 {
+	/* TODO: kill get_delta_name */
 	if (!strcmp(cmd, "get_delta_name") ||
+	    !strcmp(cmd, "get_img_name") ||
 	    !strcmp(cmd, "push_backup_get_uuid") ||
 	    !strcmp(cmd, "push_backup_read") ||
 	    !strcmp(cmd, "push_backup_write"))
@@ -1610,7 +1612,8 @@ int ploop_message(struct dm_target *ti, unsigned int argc, char **argv,
 		if (argc != 2 || kstrtou64(argv[1], 10, &val) < 0)
 			goto unlock;
 		ret = ploop_notify_merged(ploop, val, forward);
-	} else if (!strcmp(argv[0], "get_delta_name")) {
+	} else if (!strcmp(argv[0], "get_delta_name") ||
+		   !strcmp(argv[0], "get_img_name")) {
 		if (argc != 2 || kstrtou64(argv[1], 10, &val) < 0)
 			goto unlock;
 		ret = ploop_get_delta_name_cmd(ploop, (u8)val, result, maxlen);


More information about the Devel mailing list