alloc track: keep track_drop() closer to similar block drivers
Reads just nicer with a drain begin *and* end call. Also clearing the backing link of the alloc track BDS makes it closer to bdrv_backup_top_drop() with which this driver has a bit in common. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
6d6894394c
commit
aa42ea267e
@ -314,8 +314,6 @@ index 0000000000..b579380279
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ /* we do not need a bdrv_drained_end, since this is applied only to the node
|
||||
+ * which gets removed by bdrv_replace_node */
|
||||
+ bdrv_drained_begin(bs);
|
||||
+
|
||||
+ /* now that we're drained, we can safely set 'DropInProgress' */
|
||||
@ -323,6 +321,8 @@ index 0000000000..b579380279
|
||||
+ bdrv_child_refresh_perms(bs, bs->file, &error_abort);
|
||||
+
|
||||
+ bdrv_replace_node(bs, file, &error_abort);
|
||||
+ bdrv_set_backing_hd(bs, NULL, &error_abort);
|
||||
+ bdrv_drained_end(bs);
|
||||
+ bdrv_unref(bs);
|
||||
+}
|
||||
+
|
||||
|
Loading…
Reference in New Issue
Block a user