From patchwork Wed Sep 21 09:21:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 115720 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CA624B6F85 for ; Wed, 21 Sep 2011 19:22:18 +1000 (EST) Received: from localhost ([::1]:34351 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6J0O-0007qx-SU for incoming@patchwork.ozlabs.org; Wed, 21 Sep 2011 05:22:12 -0400 Received: from eggs.gnu.org ([140.186.70.92]:38579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6J0I-0007qD-FU for qemu-devel@nongnu.org; Wed, 21 Sep 2011 05:22:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R6J0E-0001T7-Ao for qemu-devel@nongnu.org; Wed, 21 Sep 2011 05:22:06 -0400 Received: from mail-gy0-f173.google.com ([209.85.160.173]:43200) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6J0E-0001T1-7U for qemu-devel@nongnu.org; Wed, 21 Sep 2011 05:22:02 -0400 Received: by gye5 with SMTP id 5so1254118gye.4 for ; Wed, 21 Sep 2011 02:22:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=gr8j7xy/VNd+8JTOMruATJ74KjBpLjTW2Owipn6bA1U=; b=nFNZkUAv+zcgzw1r06mT9TJNbSUq4id6eA1wzt5g24iCrN/oPm6ZDov7pSK63jLEP7 1clsofWNXFVr6XaicTar5aODclIiomspEE/W2E8ndGeS6norhBIBw+KL7aWzPXilNJh5 nnH/qBlwFzmueELMAnaB6WxIybpVyyqfHwDrQ= Received: by 10.236.156.197 with SMTP id m45mr3506408yhk.15.1316596921686; Wed, 21 Sep 2011 02:22:01 -0700 (PDT) Received: from localhost.localdomain (93-34-188-71.ip51.fastwebnet.it. [93.34.188.71]) by mx.google.com with ESMTPS id h20sm19600038ann.7.2011.09.21.02.21.59 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Sep 2011 02:22:00 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 21 Sep 2011 11:21:54 +0200 Message-Id: <1316596914-9570-1-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.6 In-Reply-To: <4E7995B3.3030106@comstyle.com> References: <4E7995B3.3030106@comstyle.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.160.173 Cc: kwolf@redhat.com, blauwirbel@gmail.com, brad@comstyle.com Subject: Re: [Qemu-devel] Tree broken by nbd: support feature negotiation commit. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Date: Wed, 21 Sep 2011 09:34:12 +0200 Subject: [PATCH] nbd: fix non-Linux build failure Signed-off-by: Paolo Bonzini --- 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;