{"id":2197741,"url":"http://patchwork.ozlabs.org/api/1.0/patches/2197741/?format=json","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/1.0/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260218132633.29748-13-hreitz@redhat.com>","date":"2026-02-18T13:26:21","name":"[v4,12/24] fuse: fuse_{read,write}: Rename length to blk_len","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"151db0727883363c3c258c09f38f9b4070d0e6a8","submitter":{"id":82279,"url":"http://patchwork.ozlabs.org/api/1.0/people/82279/?format=json","name":"Hanna Czenczek","email":"hreitz@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260218132633.29748-13-hreitz@redhat.com/mbox/","series":[{"id":492547,"url":"http://patchwork.ozlabs.org/api/1.0/series/492547/?format=json","date":"2026-02-18T13:26:09","name":"export/fuse: Use coroutines and multi-threading","version":4,"mbox":"http://patchwork.ozlabs.org/series/492547/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2197741/checks/","tags":{},"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=JBSxTCCr;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=google header.b=Wuz/EEoZ;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fGHWr6MzTz1xvq\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 19 Feb 2026 00:33:12 +1100 (AEDT)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1vshfe-0004EG-3O; Wed, 18 Feb 2026 08:32:50 -0500","from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <hreitz@redhat.com>) id 1vshfQ-0003xd-Bu\n for qemu-devel@nongnu.org; Wed, 18 Feb 2026 08:32:36 -0500","from us-smtp-delivery-124.mimecast.com ([170.10.133.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <hreitz@redhat.com>) id 1vshfA-0005R3-Ir\n for qemu-devel@nongnu.org; Wed, 18 Feb 2026 08:32:32 -0500","from mail-wm1-f70.google.com (mail-wm1-f70.google.com\n [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-256-d1ClUX85OmGkIDRkebFn7A-1; Wed, 18 Feb 2026 08:27:15 -0500","by mail-wm1-f70.google.com with SMTP id\n 5b1f17b1804b1-4837a718f41so18968675e9.2\n for <qemu-devel@nongnu.org>; Wed, 18 Feb 2026 05:27:15 -0800 (PST)","from localhost\n (p200300cfd737d029edef7b8da7441ac2.dip0.t-ipconnect.de.\n [2003:cf:d737:d029:edef:7b8d:a744:1ac2])\n by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-4834d5ebd1bsm649071375e9.6.2026.02.18.05.27.12\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 18 Feb 2026 05:27:12 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1771421538;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=/GpJAltRXiG3BftU38An+U5DT1j7yTwOzEMSCvYcGWQ=;\n b=JBSxTCCrVo/q/ifgCc9y+ootDlamQkUVvsLVCCoi7nZe+nPJmyJgz38hOKEThLQyMYT12r\n pzIK582Bblq4a6gyQZGDxWLHwEGpj1wiveWuE7+jy7t4ou89qmjVAPL02/UGNzjljqCbGA\n Kyzb/uKaOsJ4S1GLd1UyslGVrvTOQGM=","v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1771421234; x=1772026034; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=/GpJAltRXiG3BftU38An+U5DT1j7yTwOzEMSCvYcGWQ=;\n b=Wuz/EEoZpsw6f46BaBB0BUZf+40AiNMuzJtdMoL07+bCAWWhQrUtznU39/nUvp13ZY\n KFkg65FEAQa0DzK9+delkGTZhKmYPVQDI+eF4G/PU5o5ciR8M121SmSXar4hqgYEgN5j\n 4d9uVUdLvVAxYyGaXpME9mEXIEY6hcdMONh8A+GWLhiL5GqxTEOOaNnn2WII95R9wRFI\n L76bSSpbKykqgItj7TF/Cb4+n7n9Sn95z0JcUzadeIpdAsy9U3be7bBouEXB+7T86N8r\n Jdw22nHN7k0dznmth/zUAn3v5flDrKFp6bu9uHq6pS9pQEbV0x2ImyKwrvnqiWTRzB7t\n MbRw=="],"X-MC-Unique":"d1ClUX85OmGkIDRkebFn7A-1","X-Mimecast-MFC-AGG-ID":"d1ClUX85OmGkIDRkebFn7A_1771421234","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1771421234; x=1772026034;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=/GpJAltRXiG3BftU38An+U5DT1j7yTwOzEMSCvYcGWQ=;\n b=iRSDHP030Z/hfnUTJGweod4nLDUYKMKCKD0Ym3cneBYYz6y5+WC5uwZsvMdcP5eowB\n skfdlOeUgg1EspsgsyWQVgKYROC1f0JYOyyHskk0pdQwEyPj7wGGPNBYyiv+Epzl26nj\n K4D5cOWrUZz0x6T7d6uc/63Lm6oJOjvA649m3UtBa0PRc+9zDO6Ed2qEF8y/x0dyqz95\n ZON9TrBcZ70+8+quZUUf5VjGK4Ls6lBhRxw7zbIrRnK/tzRb9PI5I77yG9bdyBxSA++6\n spENe9KU/I6YigkfQaVg+Nd6ifFXJiAizeISLxaSUAcGXc+oBzN9oTjNQp66IC0dn1sD\n pcCw==","X-Gm-Message-State":"AOJu0Yw4F/1HVNvvtfFUmthVakkWzgMeMazsiMkkiOUusMur36esiLCb\n N30v6Lo7HBiWKry5/MzvCgPYisVKTREusCAa1MWhRzHMB6J9/hAgzrprMaqAGoDYpAnSOpBO/fx\n sg/U8831zpLZBiDdeFCBpuFtQQwmfejhBQRENffcnuXFgAB0pMka2uCiQeqpD9XV/","X-Gm-Gg":"AZuq6aJL7ZzoEA+Xx0dI667HRclxYtA7zt4x/L4V1PREtxELYPn/oGv2HUe+1vHMUk9\n cNoE657EUodEjSiqOQ+K6hG3p8035FlZA0GY72Ht7QB2e+2dZkE7aq7fvijpJHK3NXaqipRiLVc\n 0fFjiPdrBp1617UwnQHxlcWZ+CcoEKGm8ip36DzJZPhtEoiiDOKOqeiMATZr89qxud0yYmTuMAZ\n EJRWV+V4REfmbwmMzG98lI7b0LKFrSO0peGLvUSEimPPm2ohiZpNuhqxz1mNEnb+U0mpwUVZ1oX\n O6yzfS2CttDt2caYTwGFFUwC9/GHrwPXUQXp+az1WHRV8pe7gc3pfRnqSLkplXuutigS16BUKYx\n BNkNsOPo6RCUJ28UwW416mrSIMShAlS0apRCVrWhzGC8Grg+2u0EDgnreT3zmq7MquJ+yuebGxo\n z6WFEw","X-Received":["by 2002:a05:600c:1c08:b0:47a:8cce:2940 with SMTP id\n 5b1f17b1804b1-48379b991c6mr243244885e9.14.1771421233838;\n Wed, 18 Feb 2026 05:27:13 -0800 (PST)","by 2002:a05:600c:1c08:b0:47a:8cce:2940 with SMTP id\n 5b1f17b1804b1-48379b991c6mr243244465e9.14.1771421233400;\n Wed, 18 Feb 2026 05:27:13 -0800 (PST)"],"From":"Hanna Czenczek <hreitz@redhat.com>","To":"qemu-block@nongnu.org","Cc":"qemu-devel@nongnu.org, Hanna Czenczek <hreitz@redhat.com>,\n Kevin Wolf <kwolf@redhat.com>, Brian Song <hibriansong@gmail.com>","Subject":"[PATCH v4 12/24] fuse: fuse_{read,write}: Rename length to blk_len","Date":"Wed, 18 Feb 2026 14:26:21 +0100","Message-ID":"<20260218132633.29748-13-hreitz@redhat.com>","X-Mailer":"git-send-email 2.53.0","In-Reply-To":"<20260218132633.29748-1-hreitz@redhat.com>","References":"<20260218132633.29748-1-hreitz@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Received-SPF":"pass client-ip=170.10.133.124; envelope-from=hreitz@redhat.com;\n helo=us-smtp-delivery-124.mimecast.com","X-Spam_score_int":"-20","X-Spam_score":"-2.1","X-Spam_bar":"--","X-Spam_report":"(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.043,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001,\n RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,\n SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no","X-Spam_action":"no action","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"qemu development <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"},"content":"The term \"length\" is ambiguous, use \"blk_len\" instead to be clear.\n\nSigned-off-by: Hanna Czenczek <hreitz@redhat.com>\n---\n block/export/fuse.c | 24 ++++++++++++------------\n 1 file changed, 12 insertions(+), 12 deletions(-)","diff":"diff --git a/block/export/fuse.c b/block/export/fuse.c\nindex f6a5f4fa0a..d45c6b814f 100644\n--- a/block/export/fuse.c\n+++ b/block/export/fuse.c\n@@ -637,7 +637,7 @@ static void fuse_read(fuse_req_t req, fuse_ino_t inode,\n                       size_t size, off_t offset, struct fuse_file_info *fi)\n {\n     FuseExport *exp = fuse_req_userdata(req);\n-    int64_t length;\n+    int64_t blk_len;\n     void *buf;\n     int ret;\n \n@@ -651,14 +651,14 @@ static void fuse_read(fuse_req_t req, fuse_ino_t inode,\n      * Clients will expect short reads at EOF, so we have to limit\n      * offset+size to the image length.\n      */\n-    length = blk_getlength(exp->common.blk);\n-    if (length < 0) {\n-        fuse_reply_err(req, -length);\n+    blk_len = blk_getlength(exp->common.blk);\n+    if (blk_len < 0) {\n+        fuse_reply_err(req, -blk_len);\n         return;\n     }\n \n-    if (offset + size > length) {\n-        size = length - offset;\n+    if (offset + size > blk_len) {\n+        size = blk_len - offset;\n     }\n \n     buf = qemu_try_blockalign(blk_bs(exp->common.blk), size);\n@@ -685,7 +685,7 @@ static void fuse_write(fuse_req_t req, fuse_ino_t inode, const char *buf,\n {\n     FuseExport *exp = fuse_req_userdata(req);\n     QEMU_AUTO_VFREE void *copied = NULL;\n-    int64_t length;\n+    int64_t blk_len;\n     int ret;\n \n     /* Limited by max_write, should not happen */\n@@ -711,13 +711,13 @@ static void fuse_write(fuse_req_t req, fuse_ino_t inode, const char *buf,\n      * Clients will expect short writes at EOF, so we have to limit\n      * offset+size to the image length.\n      */\n-    length = blk_getlength(exp->common.blk);\n-    if (length < 0) {\n-        fuse_reply_err(req, -length);\n+    blk_len = blk_getlength(exp->common.blk);\n+    if (blk_len < 0) {\n+        fuse_reply_err(req, -blk_len);\n         return;\n     }\n \n-    if (offset + size > length) {\n+    if (offset + size > blk_len) {\n         if (exp->growable) {\n             ret = fuse_do_truncate(exp, offset + size, true, PREALLOC_MODE_OFF);\n             if (ret < 0) {\n@@ -725,7 +725,7 @@ static void fuse_write(fuse_req_t req, fuse_ino_t inode, const char *buf,\n                 return;\n             }\n         } else {\n-            size = length - offset;\n+            size = blk_len - offset;\n         }\n     }\n \n","prefixes":["v4","12/24"]}