From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.44 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796006396; b=ZfRGZZDtPgNkwplkpo6/jr2JIk90PGrA5NkiWnqWeD+Adg9tmPpsvAyvZEcZc6r7Qg5j K+WofCmnR9wH5gH1L7iW8sfzZCMq+l32zitykDn/6b+7n5Kii9ICQZwEPzKNibn13dWF8 sf3IEoezseX0xoULm1XtKyMwNeZpNec/T+ndL1xLe6SgAcZoGDQNlGUnaspIOPeO23C0A aQtpJWoK0odnt5Yh9Ftoy5w4fdt5hLTQfs20BGQvhye7GVbWAlaVOj9dXJva0bgxq8vgZ 4ARuKpT6XELReiM5wQ/rZJs5EBAOI3MCV2ms6NQxQbMNEVi2ykWdzagi14KdBEVhrVA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796006396; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=EVoh+fzxPfGHkUnIUEnZvjZdidSNGe0kGH20IA7nImg=; b=kY9GM50tk6eVsgjSovqSROiTF/cSDlvP3HsmAcaEcxpvLNs6N9HSm6m2TOdU/EZBj5ST 3uyT61D1z/HCj2gKvfEyweC1lO+NJILTvy0yRgHSDJO07stpuKnHK7F5HM8gb4mL3turq iOhC8R07xH/YyYFvFD7lIUYw+t/D8ivmXSmgBJXB2QKjcNqHqlrrxp4KqRwiu7MXT00tZ 2L+btDxi3DdiCuvDaGvo7l7ShAVLTFTR8N9hmNyW/MqJAuoVBX+uUiSlPY97zKSctPJzc ObBbWu18pfGHOkgINpkZEc1gyFsiH19LI9DSPo1AYLbTquOWbh7+2jfwyf/v8QgXdaA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=kXXqGQWk; arc=none smtp.remote-ip=209.85.210.44 Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com [209.85.210.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 54823606A31D for ; Mon, 30 Nov 2026 02:39:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 54823606A31D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=kXXqGQWk Received: by mail-ot1-f44.google.com with SMTP id 46e09a7af769-862b090e41eso5157544a34.0 for ; Sun, 29 Nov 2026 18:39:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796006394; x=1796611194; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=EVoh+fzxPfGHkUnIUEnZvjZdidSNGe0kGH20IA7nImg=; b=kXXqGQWk332TE4HH+/a39lisXoTjp17kT2DiZOieDIaZALojcp4/Jr7onF6sAIiGt3 fXuvcSllgE4NCsWLILEWfNJSOoz9Mbqb6LyjH0IwRfTMaTJBtK2nXIZzyjR562P2Gd/V v3s84Jd0MZsZU7VfUBxm4zLcEVJlJcAnQGGKCMS34w/kirkQwPvu/0xel9qd1MtWvI9A YhOAJhYx5/m0nHXzTxYomu/W8bI0SKmb83F+kC69ySo53usacbrxsP4uzVFxY7SsuJb9 GtfHH1OabOrnVIJOxVu7YStF1ABkKR+o5uFJCmJTBvf844fSOpJrHlKReMc0BKNWvJsR L94g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796006394; x=1796611194; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=EVoh+fzxPfGHkUnIUEnZvjZdidSNGe0kGH20IA7nImg=; b=UWwnjUBqrQ1si/Of6fqD4SplmaTGJEa4cIstiRYzj3mD0B6Arpkc53+bk6wrsIYTCF eV6pm/NEtjB+BRtfabY/8cX3oYma5JOE9z95tN+gFldn/zb8aX8qChvJp7nD+xrZXJoA YztmiyxCtzPsRLcyLY1f9DJcoG6f4NwxznSylvD4aNIa0veE3DT2a2n7QJOtU4NdsXfw U9lisFyhuAmE920GjtWgoDHr/SiklHyWepZ52opyKtR8S9kbRutTGtGvB+V74SI1TliJ em2aFzP2CoqKJP3RvDjUr1hGN0S6VbKtWRdGbFPBsiLtYSnst4jn6KDjWtpQrxBD3cRq ZaVg== X-Forwarded-Encrypted: i=1; AL+hErH8D1DOC6vcdcTIj6BkJBDjyFGWW/2Eh/n7wAMKWh40Kws4s6Fu03dwjCSPlAzGMAEUt0POeQN/AXGuOg==@vger.kernel.org X-Gm-Message-State: APuU4Z/zday0lzxFVS0rpyvyi3Ik4SYxnNgimBPgqKgVqu09SaurYvRX GWm9uAkHEjZ6WyHl9Xb1vV987Sxt8i5SWoc+4JJ3yUVy0tRi6oaBmoVW X-Gm-Gg: AZFdTZe4xQwh+SqKnqFVYrvM12Y6llv/EdqIT0Jdtc8mTyYwybtbAkLN9NkH2m8RUFc baxH/5XG7tanuDjv6rWmsKNtPONtA9/gDg9UB4dpNtbZFlFTJteRr8qbpRS/LdOV1g0tW/ethhl eNEXNdniCAM6e+hZBNF3IfwYMuN5zQeIxfu42UxjXfh8KurBSQMib7STrVnK0plYThg1Wn3H31U DT7/x1Pa5FTho8ub7cCk4ULeQlUi2+F8NAxICBzs2cJb9/L/XA/80FBeUyTS5ZluAbE624TbzoU UrzJOu1n//Jikd+lQ79C3V5vNBYfnVGv++vhZ5BQgqRPQYB4H3VIuiu4GEHfTnfidDdXeT1Qi/p 2Mj/yv1axh6+jobBI+gAh3YS3bqjyvCNk/k27xPBSCrSAOU7Yo+hfg7mFYS6CkBspkGWOXQvAXc JONQmejdAOmNoT8KSOUQLVKqHtKK66VCVHzutHDicsxptgN8LNbMIU9E2Z3NLxsWpouTYJ0rsuN JpWHCKMVF9VR23nRTmXJFgHP6wFjJzyjUOH+DTANqiCdPwMsTPpLPpIn+BIOs1zPVwrD5YcgIlt ZL4ziG+/wynlrYp6jUYGKHPODxSCD77t2bvQNz0GmiR4TmApoLzacTak1eSM1zeaVYxXTvoC3fp HaVLyAbdob7gNkvLDbVb31gkesSlwq3A4AdVwGu1M4BykkhAc/pEuuvZyxA== X-Received: by 2002:a05:6830:6512:b0:862:acfe:9281 with SMTP id 46e09a7af769-86315979898mr34606714a34.15.1796006394233; Sun, 29 Nov 2026 18:39:54 -0800 (PST) Received: from fedora-laptop.tail348456.ts.net ([172.245.82.59]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-86322db2d1asm21254554a34.4.2026.11.29.18.39.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2026 18:39:53 -0800 (PST) From: Ming Lei To: Jens Axboe , linux-block@vger.kernel.org Cc: Ming Lei , Caleb Sander Mateos , Shuah Khan , linux-kselftest@vger.kernel.org Subject: [PATCH 2/5] selftests: ublk: complete a striped request with its full length Date: Sun, 29 Nov 2026 20:39:27 -0600 Message-ID: <20261130023937.606428-3-tom.leiming@gmail.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261130023937.606428-1-tom.leiming@gmail.com> References: <20261130023937.606428-1-tom.leiming@gmail.com> X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ublk_stripe_io_done() commits the result of the first CQE for the whole request, though the request may span several stripes. The driver is about to act on a short result for WRITE and zero copy again, so each such request would be requeued and its rest redone. Keep only errors in io->result, and commit the request length if all stripes succeed. The removed check of UBLK_U_IO_UNREGISTER_IO_BUF only let the byte count of a READ/WRITE CQE into io->result. It did nothing for the unregister itself: its success is zero, which never changes io->result, and its failure is still recorded. Signed-off-by: Ming Lei --- tools/testing/selftests/ublk/stripe.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/ublk/stripe.c b/tools/testing/selftests/ublk/stripe.c index dca819f5366e..63e3e9ba3608 100644 --- a/tools/testing/selftests/ublk/stripe.c +++ b/tools/testing/selftests/ublk/stripe.c @@ -240,11 +240,10 @@ static void ublk_stripe_io_done(struct ublk_thread *t, struct ublk_queue *q, struct ublk_io *io = ublk_get_io(q, tag); int res = cqe->res; - if (res < 0 || op != ublk_cmd_op_nr(UBLK_U_IO_UNREGISTER_IO_BUF)) { + if (res < 0) { if (!io->result) io->result = res; - if (res < 0) - ublk_err("%s: io failure %d tag %u\n", __func__, res, tag); + ublk_err("%s: io failure %d tag %u\n", __func__, res, tag); } /* buffer register op is IOSQE_CQE_SKIP_SUCCESS */ -- 2.56.1