qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-block] [PATCH RFC v3 3/8] block: add throttle blo


From: Manos Pitsidianakis
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH RFC v3 3/8] block: add throttle block filter driver
Date: Mon, 26 Jun 2017 19:26:41 +0300
User-agent: NeoMutt/20170609-57-1e93be (1.8.3)

On Mon, Jun 26, 2017 at 03:30:55PM +0100, Stefan Hajnoczi wrote:
+    bs->file = bdrv_open_child(NULL, options, "file",
+                                    bs, &child_file, false, &local_err);
+
+    if (local_err) {
+        error_propagate(errp, local_err);
+        return -EINVAL;
+    }
+
+    qdict_flatten(options);
+    return throttle_configure_tgm(bs, tgm, options, errp);

Who destroys bs->file on error?

It is reaped by bdrv_open_inherit() on failure, if I'm not mistaken.
That's how other drivers handle this as well. Some (eg block/qcow2.c)
check if bs->file is NULL instead of the error pointer they pass, so
this is not not very consistent.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]