From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (mail.openvz.org [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id 6B02480032 for ; Fri, 27 Nov 2026 11:53:27 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6ARBqFOl025626; Fri, 27 Nov 2026 14:52:16 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6ARBqFOl025626 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="iLoRjqn4" Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6ARBpiS3025511 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Fri, 27 Nov 2026 14:51:44 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6ARBpiS3025511 Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-6b9095eeb5bso1474212a12.0 for ; Fri, 27 Nov 2026 03:51:44 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErHcTzZYF7FW3/t45E2Sk0gMI6E3WP+8wYhIgz5M6JGS+IiLiAI1oKYq3ta0DrFm4/7/3+lImQ==@openvz.org X-Gm-Message-State: APuU4Z9ILMEHWjNcBQYgDqwoVzw/dq5zcsS/UpNL89a4oxJFXckp1GOh Ktc2kywsuXDAMK/gE8dneVqQd4eJVnnH/7cAyIjfwuJMa66PTWk3Vx4VtKhtkbG2V82+XaFH/5I XG/S7prqS0+Oxz3HA6Cfu8iTan/Fqt3C4f/HK6QLGiteoFSR2/6W0/g== X-Gm-Gg: AZFdTZe6rzWBb7RbuiIXZxcX2h91eXmwQqqI+xdrbxFWyA/TuounxPcwH2yAH+Ujejw QaK0jGimasorF7Ifw1hLIyUJa7mMeQ5yle3B6cM7yX5DZeKsjTOUojSLAnLkqFzk3JYIgTGWNbX JLs2i5dcPSPaJnSXSAPAYlXD8cLgQmn8Bqecv38nezt5K8Ns/FVul/8zQ1K4EMsHG5r47F+lf8b /YbtH4adl7ULty+SquipkWX0PiIcF+JI24TUAH/xqlVjMOla1Zf37FieSdH7+2Kxif5eWmnXKW2 DSTvfkZQDLT1dqo6ZZ+HjLA7iefCAxP4EoK4A/dDwAH8OrZz9lMvF8knpCXNDjHeilTQGIXJqL+ 1KSUAlDHp9RW8A+ZoAQ== X-Received: by 2002:a17:907:9301:b0:c46:78af:6150 with SMTP id a640c23a62f3a-c5131585160mr2252181566b.2.1795780304030; Fri, 27 Nov 2026 03:51:44 -0800 (PST) X-Received: by 2002:a17:907:9301:b0:c46:78af:6150 with SMTP id a640c23a62f3a-c5131585160mr2252180266b.2.1795780303587; Fri, 27 Nov 2026 03:51:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795780303; cv=none; d=google.com; s=arc-20260327; b=MdOcemNjYGeJVIokZEs5hyQymghKbZtmHmVI9Gz74vaE2lcPme+6RmRCMQtDvKR/k9 KLLTe04lnp+pmxH65tJxadYFLfwe5qOU3SeShJ37ZEYazU0Vcr5enmHHWEJNx271iu9R udBKjex5O8S2Twfn3l/c4zTSNVj+Tp5K4tmtbPzTTPu/BV8gBrzr4ZV/5Aaugf3lp6+t F1jpiDLAIVPxAAZANbX3utr06zPt+qsh3WpVYY/Gy8i9t4Ml6GO5J+3PQGnljxTv28va VEqyhArg2ISS2U5Wt9znBp6q1wb/Zy9QmNR7dx/6Zn43WCKin8DDEiBAhDFAABOeP5tk eW4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=message-id:date:references:in-reply-to:cc:to:from:subject :content-transfer-encoding:mime-version:dkim-signature; bh=77T/AYdDDNzRLk47FnfQtb6gVSXKMqgomHkQZW9x/g4=; fh=YDx/sgeCfUIZ9eyfBjqETg92hV70ladS2omuMPCV2do=; b=bEu0T5peN3+KZRzUiklUz2gzUQwToXe0kMNZLxWqerwLHw9DgdePe9pLGySu/+93+9 HSGlHI6gJ8MfctUTBjyEf+2zouhYKv/s1/ITX0/ZJjROmiUWjAQYQUYJue7+dMQDekvP QKusuGHHBeatPQJL2eEgfoUeIjytCGQJfJJS6OJ6IVZUh584fmZ42mhwSPtYfxSLG4eE 0bMpWFZa7kW6OiaqK/ZWHjYfJm6ZErJlDI+yPRTtdS5Hb80MW95q1ySv5x14K9Ws+aEf teDrl5o3QUMrxJZOg0m3r1pEhhzZNNpb4vLEpnLvk10gmg2/1IDYP/fRDUd4pWtSRGdd mGZw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=iLoRjqn4; spf=pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=khorenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id a640c23a62f3a-c513b0309f9si1519421366b.153.2026.11.27.03.51.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Nov 2026 03:51:43 -0800 (PST) Received-SPF: pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=iLoRjqn4; spf=pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=khorenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=Message-Id:Date:From:Subject:Content-Type: MIME-Version; bh=77T/AYdDDNzRLk47FnfQtb6gVSXKMqgomHkQZW9x/g4=; b=iLoRjqn4E3T/ zaSuGiLvtnkgYETsUBrjzFH0J6bOHaNA/Y9Ei6BseI15ho9+wQBzZEPIOiPiZ30jiSoZeVvMDSk8D XZGtebL2l9yyy4GkDlx+Ovp+vgaHlQXYNk7jZebJKbBd/5CK1S9GW4Kdb8RKc9bg8M9hzaH3FKsKx 5rgTmTlA+f6MbqANZeu25ETmfMNsZVUyTvX6qt55YK3nBzQ7RG2bFiLmyT61IuOZMEUDwH94vH6Us 15JAKKa/rr/cYezwpwbmxlvkM2z0jDkHdbSvZo0b981QBgq9WBEiLpmL7efGguBiZ1Um4Ke+hF7Qz sScIR0SFPMmIDIwf2GP6gQ==; Received: from ch-demo-asa.virtuozzo.com ([130.117.225.8] helo=f0.sw.ru) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1xWuUD-008LtV-02; Fri, 27 Nov 2026 12:51:39 +0100 MIME-Version: 1.0 From: Konstantin Khorenko To: Alexander Ivanov In-Reply-To: <20261127111604.1151696-4-alexander.ivanov@virtuozzo.com> References: <20261127111604.1151696-1-alexander.ivanov@virtuozzo.com> <20261127111604.1151696-4-alexander.ivanov@virtuozzo.com> Date: Fri, 27 Nov 2026 12:51:40 +0100 Message-Id: <179578030084.10258.18214528503636203075.b4-review@b4> X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1712; i=khorenko@virtuozzo.com; h=from:subject:message-id; bh=gEjya2cOr4vegx2ip4Z7tVcU07EV+b0xqZdKYWOHpoQ=; b=owEBbQKS/ZANAwAKAVGWCkf5YVwqAcsmYgBrCW7N5RKKsxfEuBuRWo4Nu+fPMZWGjSptUEmNh uuAFODtLreJAjMEAAEKAB0WIQRWD23IPcXT0GO9CCxRlgpH+WFcKgUCawluzQAKCRBRlgpH+WFc Kp0lD/9X9l6Z1jsmMDxzw7sMNUkBSnuIvQNtWDn2yWu5/EfOefB9wOcSuOrrv9arfHM8mtDX1AY 2DGRkiZ5jmy25eGDK/8d3GdVSsoQr4lZTzkX6XGIWKADypraqbi9H63Qeocqc/Lh9s2UYUUeAC5 DYVHVkPGAPGJdeyJ0W72skHinN657r9VmhXONRw0lhPF4bCB2gHb7bYzJBZjL9zlfrwj61a7cBC oDiSFBaV9tqlDHJ/iN8sjpD5EYc5UXNewsxWSjQUeKjuPV7IUDaWs4leh4cba5XtF2Db+elp0oo rsboxxH5tC6x+bv7x3Sln57m86POBu3hq+g+WV/TW/ID2cls8q73PqJ+7BlHvC6SOWryXQg5jq+ +I7wND0q6TjnVZ3C8QqAHzvX8000xmW/eNr41nW9+T3EKViu+zqKR+9wwAnO6wSIxNTfTs8WP3w WPPiJzxp7UxUgVUpFIVfkHJEIAjmbLm9D8qml30xKxD+7upCGzzLNtFaKy8zdxySUI3PTY+BBLu fCPvAJRxEBh8345Js/0YAnfjM8p/tNaD6ssm1hN0eT5VnEJZGJFsU1YcgHDkDQXvXdNrQE0cmMG BWyUi/YfZtAZsbZkolbTQMwAwmey8pQTUvWUNQO7IhQwZ2b/XTyll9Lr4L96WAHGLnTrb90QZME vx5/tkKXwys06nQ== X-Developer-Key: i=khorenko@virtuozzo.com; a=openpgp; fpr=560F6DC83DC5D3D063BD082C51960A47F9615C2A X-OZ-Fwd: true Cc: devel@openvz.org Subject: Re: [Devel] [PATCH hci-8.2 3/4] drivers/vhost/blk: hold requests failed with ENOSPC X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org Items 1, 2 and 3 of the cover letter reply; item 6 is about this patch too. On Fri, 27 Nov 2026 12:16:02 +0100, Alexander Ivanov wrote: > A held request is not counted as inflight, so that unsetting the > backend does not wait for it. Its head stays taken, so a guest reusing > it gets the same error as for a head in flight. Item 1. Only until the backend is unset: vhost_blk_drop_backend() frees blk->vqs[i].req, and vhost_blk_setup_vqs() allocates it zeroed, so after the stop and start QEMU does before VHOST_BLK_RESUBMIT the head is free. A guest that reuses it then gets it accepted, and the later RESUBMIT of that head fails with -EBUSY or completes it twice. Only that guest is hurt, so saying it is enough, but the sentence and the uapi comment must not promise more. > + held = kvcalloc(nr, sizeof(*held), GFP_KERNEL); > + if (!held) > + return -ENOMEM; > + vhost_blk_reset_held(blk, held); Item 2. The old list is dropped here, before the vq setup below can still fail. QEMU needs that list to resubmit, so a failed VHOST_BLK_SET_BACKEND loses the held heads and the guest waits for them forever. Swap the new list in once the setup succeeded, and drop "A failing one may empty it too" from the uapi comment. > err = blk_status_to_errno(bio->bi_status); > if (err) > req->bio_err = err; Item 3. A request split into several bios keeps the error of the bio that completes last. One bio failing with EIO and another with ENOSPC make the request held or failed depending on completion order, and a held EIO comes back on every resume. Keep the first error, or let any error other than ENOSPC win. -- Konstantin Khorenko, Virtuozzo Linux Kernel Team _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel