From patchwork Mon Mar 21 15:30:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 553352 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1248:0:0:0:0 with SMTP id z8csp1616753mag; Mon, 21 Mar 2022 08:46:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpMTj7GnMUwCyQCn15lP9t7oTm7xkZ8E0xqsaT1QL5n46wGrUpSyyvY4mpHwr4HoXy48XK X-Received: by 2002:a05:622a:554:b0:2e2:16ad:e2b9 with SMTP id m20-20020a05622a055400b002e216ade2b9mr2515481qtx.392.1647877601403; Mon, 21 Mar 2022 08:46:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647877601; cv=none; d=google.com; s=arc-20160816; b=hkFUa53TnUbsNKzUhyCPFCkGAdPMItK/PASuSs01nO1lH98Tr2/AADhm6oWZE+mR9R UGKBI1XDqOoOTtrtWh7qoinwdYo/hj/SVjEUI455PQ4imT/Yk+AiGB/jiH/2go12cRty LknzQV1QHe0g2gACYe4Ez1Bl67KwEoV5fv2J00AqJyvu92MCN3wqB4HvluQ8g9CNbjAK WFoSlTtArr5JZPrsWeaM+f3VyxL4LH+hM2fjq4/HMx6pH9bk83sAUUSnjo3v1Gd46qfd w7psmwvm3uA0C3UT7uDW1Y7C5UEDaa5QhsKMvQu2Sew2S/o1FIV8ZpVu1cFiFEKojpNw c1xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=9vjmkUfxosvS/+ENW+rV5uag0F+VS01H11+SAfFqIl4=; b=E0TxJWHmMMoHLB8blXkWv9EMe7bdhc+9JvgE2S7jfY1pdS9OpvqMSs0etX9+wsIOkk Giwc5DwTYQK+X8v+7oZm3qN/+70LC0AsVxLDT1afe1qYnmxsX84VfEJ1qKLN4j2RXDPg LVa/SKKaQMYoWaZ4LjAScH4uTkv17NOqS+mto2O+p59JjmMjtHc30ky27UKICU1Ynp0H DqVjbLxqgQ98ZUaJUSABUfoKaPjtZpRcRG49fHWzOpNK+v9La57ABw2+/shayTp+SdrL s0VTCSApOIo3D41QAsVyIOjvbo02QB2Vin4IOwM/o4wTSnNREtiT7ffwcvUQ6cJJIY4f 2hxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=lk+b1QCM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 67-20020a370646000000b0067e4be23987si1941821qkg.460.2022.03.21.08.46.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Mar 2022 08:46:41 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=lk+b1QCM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:58290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nWKEy-0004I2-W9 for patch@linaro.org; Mon, 21 Mar 2022 11:46:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43008) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWJzr-0005Hp-A2 for qemu-devel@nongnu.org; Mon, 21 Mar 2022 11:31:03 -0400 Received: from [2a00:1450:4864:20::536] (port=42735 helo=mail-ed1-x536.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nWJzo-0004xT-Pa for qemu-devel@nongnu.org; Mon, 21 Mar 2022 11:31:02 -0400 Received: by mail-ed1-x536.google.com with SMTP id a17so17254306edm.9 for ; Mon, 21 Mar 2022 08:30:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9vjmkUfxosvS/+ENW+rV5uag0F+VS01H11+SAfFqIl4=; b=lk+b1QCMVBT0dFBEk/Fe5rr/YAI+fBoRZGe4sBoRhaJSJnDl+5RHHIlFO6FQMwCZIW xCmF77z6ubHwF8z24VLBG/LJaaQFe5MQzXozMU0VoHYPRzKqJeInNNdtdhiLNhlipxpy FagFsAl5dHN4svNfD78d0CTmZ/cAMKyIBxiqLvN1fv0j9By801CJ8MeT6N9vM9qYgo/l fFsZuNUm3CE4rLZedym2pk84id5udTc+MFnMs4A2dhx8e+ad4whk2Uz5ShjvG8ERTH30 bzh6DRkaFPuUJ5nye9wx1TK9a8E7aN7ceJtFiZewLJ11t7juycM8uM2rGBuOA3772v+3 7jCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9vjmkUfxosvS/+ENW+rV5uag0F+VS01H11+SAfFqIl4=; b=5pCFel3FNVWQZizM3EgewBEQpSrDxEu9agoTMpAx5GzfmwC+uunbK9GoxikB510LSp MfIhXVAlaHRak5GuMyvKviWjUKLcV4rS6UlBfTV2k0Lzxzyi3kUEEGYq2ISV6vCuLon1 9bBzBNGB1L4fkxI0ak91YSwTXFq7gJzdunCmAdghlDE8z9EzrHD/dkVCPVvwG19XxdWq FetxNcXPYnoaFCRNSDpbKL3DdQF1cr8LE+evRM/eiUidBntv67FlrnQPcwbg6Nxv8W3y Zp6SVoVuUmHYjk3G/Q452OV9uDG9kmtgBds3G07jGR6I7sDunJCoue2fGfDiQVulK7Vf e27g== X-Gm-Message-State: AOAM533/qWnUtMBT6eJN8SKxL9EryJAtxvdpdOvApjC5cFa8vEtWsEsL DDQ0Eb4YFtqGW1p+t090k1HNjw== X-Received: by 2002:aa7:d5d7:0:b0:418:f7b0:88cc with SMTP id d23-20020aa7d5d7000000b00418f7b088ccmr22654066eds.227.1647876658470; Mon, 21 Mar 2022 08:30:58 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id u10-20020a50d94a000000b004131aa2525esm8164736edj.49.2022.03.21.08.30.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 08:30:49 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A12D51FFC3; Mon, 21 Mar 2022 15:30:38 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 11/13] contrib/vhost-user-blk: fix 32 bit build and enable Date: Mon, 21 Mar 2022 15:30:35 +0000 Message-Id: <20220321153037.3622127-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220321153037.3622127-1-alex.bennee@linaro.org> References: <20220321153037.3622127-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::536 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x536.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: slp@redhat.com, mathieu.poirier@linaro.org, mst@redhat.com, viresh.kumar@linaro.org, Raphael Norwitz , stefanha@redhat.com, marcandre.lureau@redhat.com, =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We were not building the vhost-user-blk server due to 32 bit compilation problems. The problem was due to format string types so fix that and then enable the build. Tweak the rule to follow the same rules as other vhost-user daemons. Signed-off-by: Alex Bennée --- meson.build | 2 +- contrib/vhost-user-blk/vhost-user-blk.c | 6 +++--- contrib/vhost-user-blk/meson.build | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 282e7c4650..0435419307 100644 --- a/meson.build +++ b/meson.build @@ -1326,7 +1326,7 @@ have_vhost_user_blk_server = get_option('vhost_user_blk_server') \ error_message: 'vhost_user_blk_server requires linux') \ .require('CONFIG_VHOST_USER' in config_host, error_message: 'vhost_user_blk_server requires vhost-user support') \ - .disable_auto_if(not have_system) \ + .disable_auto_if(not have_tools and not have_system) \ .allowed() if get_option('fuse').disabled() and get_option('fuse_lseek').enabled() diff --git a/contrib/vhost-user-blk/vhost-user-blk.c b/contrib/vhost-user-blk/vhost-user-blk.c index d14b2896bf..0bee79360f 100644 --- a/contrib/vhost-user-blk/vhost-user-blk.c +++ b/contrib/vhost-user-blk/vhost-user-blk.c @@ -146,7 +146,7 @@ vub_readv(VubReq *req, struct iovec *iov, uint32_t iovcnt) req->size = vub_iov_size(iov, iovcnt); rc = preadv(vdev_blk->blk_fd, iov, iovcnt, req->sector_num * 512); if (rc < 0) { - fprintf(stderr, "%s, Sector %"PRIu64", Size %lu failed with %s\n", + fprintf(stderr, "%s, Sector %"PRIu64", Size %zu failed with %s\n", vdev_blk->blk_name, req->sector_num, req->size, strerror(errno)); return -1; @@ -169,7 +169,7 @@ vub_writev(VubReq *req, struct iovec *iov, uint32_t iovcnt) req->size = vub_iov_size(iov, iovcnt); rc = pwritev(vdev_blk->blk_fd, iov, iovcnt, req->sector_num * 512); if (rc < 0) { - fprintf(stderr, "%s, Sector %"PRIu64", Size %lu failed with %s\n", + fprintf(stderr, "%s, Sector %"PRIu64", Size %zu failed with %s\n", vdev_blk->blk_name, req->sector_num, req->size, strerror(errno)); return -1; @@ -188,7 +188,7 @@ vub_discard_write_zeroes(VubReq *req, struct iovec *iov, uint32_t iovcnt, size = vub_iov_size(iov, iovcnt); if (size != sizeof(*desc)) { - fprintf(stderr, "Invalid size %ld, expect %ld\n", size, sizeof(*desc)); + fprintf(stderr, "Invalid size %zd, expect %zd\n", size, sizeof(*desc)); return -1; } buf = g_new0(char, size); diff --git a/contrib/vhost-user-blk/meson.build b/contrib/vhost-user-blk/meson.build index 601ea15ef5..dcb9e2ffcd 100644 --- a/contrib/vhost-user-blk/meson.build +++ b/contrib/vhost-user-blk/meson.build @@ -1,5 +1,4 @@ -# FIXME: broken on 32-bit architectures executable('vhost-user-blk', files('vhost-user-blk.c'), dependencies: [qemuutil, vhost_user], - build_by_default: false, + build_by_default: targetos == 'linux', install: false)