[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 1/2] block/nbd: extract the common cleanup code
From: |
Eric Blake |
Subject: |
Re: [PATCH v5 1/2] block/nbd: extract the common cleanup code |
Date: |
Wed, 26 Feb 2020 17:25:41 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
On 12/4/19 9:45 PM, address@hidden wrote:
From: Pan Nengyuan <address@hidden>
The BDRVNBDState cleanup code is common in two places, add
nbd_clear_bdrvstate() function to do these cleanups.
Signed-off-by: Stefano Garzarella <address@hidden>
Signed-off-by: Pan Nengyuan <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
---
+++ b/block/nbd.c
@@ -94,6 +94,19 @@ typedef struct BDRVNBDState {
static int nbd_client_connect(BlockDriverState *bs, Error **errp);
+void nbd_clear_bdrvstate(BDRVNBDState *s)
+{
Compilation fails if this is not static (no prior prototype). I've
fixed that and now queued this series in my NBD tree, pull request
coming soon.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org