Patchwork Tree broken by nbd: support feature negotiation commit.

login
register
mail settings
Submitter Paolo Bonzini
Date Sept. 21, 2011, 9:21 a.m.
Message ID <1316596914-9570-1-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/115720/
State New
Headers show

Comments

Paolo Bonzini - Sept. 21, 2011, 9:21 a.m.
On 09/21/2011 09:43 AM, Brad wrote:
>> It is not portable code, and (unlike the rest of qemu-nbd and the
>> block/nbd.c protocol) not meant to be portable. Are BLKROSET (defined in
>> linux/fs.h) and the whole set of NBD ioctls available under OpenBSD?
> 
> Ok. What confused me a bit is that particular code path before your 
> commit was being built on anything but Windows but is now Linux only.
> No we don't have BLKROSET. So am I to understand that even before this
> particular commit that this code was only supported on Linux?

Yes.

Here's a fix.

Paolo

----------------------- 8< -----------------------

From: Paolo Bonzini <pbonzini@redhat.com>
Date: Wed, 21 Sep 2011 09:34:12 +0200
Subject: [PATCH] nbd: fix non-Linux build failure

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 nbd.c |   29 ++++++++++++-----------------
 1 files changed, 12 insertions(+), 17 deletions(-)
Brad - Sept. 21, 2011, 9:23 a.m.
On 21/09/11 5:21 AM, Paolo Bonzini wrote:
> On 09/21/2011 09:43 AM, Brad wrote:
>>> It is not portable code, and (unlike the rest of qemu-nbd and the
>>> block/nbd.c protocol) not meant to be portable. Are BLKROSET (defined in
>>> linux/fs.h) and the whole set of NBD ioctls available under OpenBSD?
>>
>> Ok. What confused me a bit is that particular code path before your
>> commit was being built on anything but Windows but is now Linux only.
>> No we don't have BLKROSET. So am I to understand that even before this
>> particular commit that this code was only supported on Linux?
>
> Yes.
>
> Here's a fix.

Yes, this is what I also came up with to get the tree to build for me.

> Paolo
>
> ----------------------- 8<  -----------------------
>
> From: Paolo Bonzini<pbonzini@redhat.com>
> Date: Wed, 21 Sep 2011 09:34:12 +0200
> Subject: [PATCH] nbd: fix non-Linux build failure
>
> Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
> ---
>   nbd.c |   29 ++++++++++++-----------------
>   1 files changed, 12 insertions(+), 17 deletions(-)
>
> diff --git a/nbd.c b/nbd.c
> index 595f4d8..9810f99 100644
> --- a/nbd.c
> +++ b/nbd.c
> @@ -437,7 +447,7 @@ int nbd_client(int fd)
>       return ret;
>   }
>   #else
> -int nbd_init(int fd, int csock, off_t size, size_t blocksize)
> +int nbd_init(int fd, int csock, uint32_t flags, off_t size, size_t blocksize)
>   {
>       errno = ENOTSUP;
>       return -1;

Patch

diff --git a/nbd.c b/nbd.c
index 595f4d8..9810f99 100644
--- a/nbd.c
+++ b/nbd.c
@@ -437,7 +447,7 @@  int nbd_client(int fd)
     return ret;
 }
 #else
-int nbd_init(int fd, int csock, off_t size, size_t blocksize)
+int nbd_init(int fd, int csock, uint32_t flags, off_t size, size_t blocksize)
 {
     errno = ENOTSUP;
     return -1;