Skip to contentSkip to conversation

blockdev: enable non-root nodes for transaction drive-backup source

PATCH Applied Vladimir Sementsov-Ogievskiy 3 participants 5 messages Jun 18, 2019 – Jun 19, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 blockdev: enable non-root nodes for transaction drive-backup source

We forget to enable it for transaction .prepare, while it is already enabled in do_drive_backup since commit a2d665c1bc362
"blockdev: loosen restrictions on drive-backup source node"

---

Hmm, I've to add John by hand, get_maintainer.pl don't report him. Shouldn't we include blockdev.c into Block Jobs in MAINTAINERS? It definitely related to block jobs.

 blockdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
blockdev.c +1 -1
index b5c0fd3c49..4ae81d687a 100644
@@ -1775,7 +1775,7 @@ static void drive_backup_prepare(BlkActionState *common, Error **errp)
     assert(common->action->type == TRANSACTION_ACTION_KIND_DRIVE_BACKUP);
     backup = common->action->u.drive_backup.data;
 
-    bs = qmp_get_root_bs(backup->device, errp);
+    bs = bdrv_lookup_bs(backup->device, backup->device, errp);
     if (!bs) {
         return;
     }
Signature · 1 line
2.18.0
#1 lore raw
Quoted 20 lines · Vladimir Sementsov-Ogievskiy

We forget to enable it for transaction .prepare, while it is already enabled in do_drive_backup since commit a2d665c1bc362
"blockdev: loosen restrictions on drive-backup source node"

---

Hmm, I've to add John by hand, get_maintainer.pl don't report him. Shouldn't we include blockdev.c into Block Jobs in MAINTAINERS? It definitely related to block jobs.

 blockdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
blockdev.c +0 -0
index b5c0fd3c49..4ae81d687a 100644

blockdev.c static void drive_backup_prepare(BlkActionState *common, Error **errp) · line 1781

Quoted 8 lines
blockdev.c +1 -1
@@ -1775,7 +1775,7 @@ static void drive_backup_prepare(BlkActionState *common, Error **errp)
     assert(common->action->type == TRANSACTION_ACTION_KIND_DRIVE_BACKUP);
     backup = common->action->u.drive_backup.data;
 
-    bs = qmp_get_root_bs(backup->device, errp);
+    bs = bdrv_lookup_bs(backup->device, backup->device, errp);
     if (!bs) {
         return;
     }

Ah, tch. I should extend 256 too in this case. Would you like me to take care of that?

Jokingly: "drive-backup is a legacy interface, please don't use it!"

--js

#2 lore raw
Quoted 25 lines · John Snow
Quoted 22 lines · Vladimir Sementsov-Ogievskiy

We forget to enable it for transaction .prepare, while it is already enabled in do_drive_backup since commit a2d665c1bc362
"blockdev: loosen restrictions on drive-backup source node"

---

Hmm, I've to add John by hand, get_maintainer.pl don't report him. Shouldn't we include blockdev.c into Block Jobs in MAINTAINERS? It definitely related to block jobs.

  blockdev.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
blockdev.c +0 -0
index b5c0fd3c49..4ae81d687a 100644
@@ -1775,7 +1775,7 @@ static void drive_backup_prepare(BlkActionState *common, Error **errp)
      assert(common->action->type == TRANSACTION_ACTION_KIND_DRIVE_BACKUP);
      backup = common->action->u.drive_backup.data;
 
Quoted 9 lines

blockdev.c static void drive_backup_prepare(BlkActionState *common, Error **errp) · line 1781

Quoted 6 lines
blockdev.c +1 -1
-    bs = qmp_get_root_bs(backup->device, errp);
+    bs = bdrv_lookup_bs(backup->device, backup->device, errp);
      if (!bs) {
          return;
      }

Ah, tch. I should extend 256 too in this case. Would you like me to take care of that?

It will be great

Quoted 5 lines

Jokingly: "drive-backup is a legacy interface, please don't use it!"

--js

Signature · 2 lines
Best regards,
Vladimir
Reviewed-by on v1 1/1
#3 lore raw
In reply to Vladimir Sementsov-Ogievskiy
Quoted 20 lines · Vladimir Sementsov-Ogievskiy

We forget to enable it for transaction .prepare, while it is already enabled in do_drive_backup since commit a2d665c1bc362
"blockdev: loosen restrictions on drive-backup source node"

---

Hmm, I've to add John by hand, get_maintainer.pl don't report him. Shouldn't we include blockdev.c into Block Jobs in MAINTAINERS? It definitely related to block jobs.

 blockdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
blockdev.c +0 -0
index b5c0fd3c49..4ae81d687a 100644

blockdev.c static void drive_backup_prepare(BlkActionState *common, Error **errp) · line 1781

Quoted 8 lines
blockdev.c +1 -1
@@ -1775,7 +1775,7 @@ static void drive_backup_prepare(BlkActionState *common, Error **errp)
     assert(common->action->type == TRANSACTION_ACTION_KIND_DRIVE_BACKUP);
     backup = common->action->u.drive_backup.data;
 
-    bs = qmp_get_root_bs(backup->device, errp);
+    bs = bdrv_lookup_bs(backup->device, backup->device, errp);
     if (!bs) {
         return;
     }

I'm half asleep, sorry, this isn't related to the patch that necessitated 256. This is fine as-is.

Applied
#4 lore raw
In reply to Vladimir Sementsov-Ogievskiy
Quoted 5 lines · Vladimir Sementsov-Ogievskiy

We forget to enable it for transaction .prepare, while it is already enabled in do_drive_backup since commit a2d665c1bc362
"blockdev: loosen restrictions on drive-backup source node"

Quoted 8 lines

---

Hmm, I've to add John by hand, get_maintainer.pl don't report him. Shouldn't we include blockdev.c into Block Jobs in MAINTAINERS? It definitely related to block jobs.

 blockdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, applied to my block branch:

https://git.xanclic.moe/XanClic/qemu/commits/branch/block

Max