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.52
------>
commit ae1d725f78cea78f941a82510d4e97957741266f
Author: Kirill Tkhai <[email protected]>
Date:   Wed Jul 7 12:02:51 2021 +0300

    push-backup: Make addr argument of start optional
    
    Full backup may skip passing address argument.
    
    Signed-off-by: Kirill Tkhai <[email protected]>
---
 drivers/md/dm-push-backup.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/md/dm-push-backup.c b/drivers/md/dm-push-backup.c
index f1637e70b599..62bf314fbe04 100644
--- a/drivers/md/dm-push-backup.c
+++ b/drivers/md/dm-push-backup.c
@@ -532,8 +532,12 @@ static int pb_message(struct dm_target *ti, unsigned int 
argc, char **argv,
                down_write(&pb->ctl_rwsem);
 
        if (!strcmp(argv[0], "push_backup_start")) {
-               if (argc != 3 || kstrtou64(argv[1], 10, &val) < 0 ||
-                                kstrtou64(argv[2], 10, &val2) < 0)
+               if (argc < 2 || argc > 3)
+                       goto unlock;
+               if (kstrtou64(argv[1], 10, &val) < 0)
+                       goto unlock;
+               val2 = 0;
+               if (argc == 3 && kstrtou64(argv[2], 10, &val2) < 0)
                        goto unlock;
                ret = push_backup_start(pb, val, (void *)val2);
        } else if (!strcmp(argv[0], "push_backup_stop")) {
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to