diff mbox

[0/5] nbd: error path refactoring

Message ID 5eb45a78-c0f0-c24b-ef58-c21289926270@virtuozzo.com
State New
Headers show

Commit Message

Vladimir Sementsov-Ogievskiy May 16, 2017, 11:15 a.m. UTC
16.05.2017 13:00, Paolo Bonzini wrote:
>
> On 16/05/2017 11:45, Vladimir Sementsov-Ogievskiy wrote:
>> Hi all. There are several patches, as preparation for v2 of my
>> NBD BLOCK_STATUS series.
>>
>> patch 0001 was sent earlier and unchanged here.
> Thanks, applied.  I suppose that if we can remove
> nbd_negotiate_read/write/drop it's also easy to change from LOG to
> error_report_err in nbd/server.c.

Thank you and sorry for build error =(. I've sent updated last patch - 
"[PATCH v2] nbd/client.c: use errp instead of LOG", with following 
changes amended:




>
> Paolo
>
>> Vladimir Sementsov-Ogievskiy (5):
>>    nbd: strict nbd_wr_syncv
>>    nbd: read_sync and friends: return 0 on success
>>    nbd: add errp parameter to nbd_wr_syncv()
>>    nbd: add errp to read_sync, write_sync and drop_sync
>>    nbd/client.c: use errp instead of LOG
>>
>>   block/nbd-client.c  |  11 +++--
>>   include/block/nbd.h |   8 ++--
>>   nbd/client.c        | 121 ++++++++++++++++++++++++----------------------------
>>   nbd/common.c        |  23 +++++-----
>>   nbd/nbd-internal.h  |  40 ++++++++++++++---
>>   nbd/server.c        |  92 ++++++++++++++++-----------------------
>>   qemu-nbd.c          |   3 +-
>>   7 files changed, 153 insertions(+), 145 deletions(-)
>>
diff mbox

Patch

diff --git a/nbd/client.c b/nbd/client.c
index e41b4fd935..f9e1d75be4 100644
--- a/nbd/client.c
+++ b/nbd/client.c
@@ -725,8 +725,10 @@  int nbd_disconnect(int fd)
  }

  #else
-int nbd_init(int fd, QIOChannelSocket *ioc, uint16_t flags, off_t size)
+int nbd_init(int fd, QIOChannelSocket *ioc, uint16_t flags, off_t size,
+             Error **errp)
  {
+    error_setg(errp, "nbd_init is not supported");
      return -ENOTSUP;
  }