From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.54 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796118728; b=eHm/XT6yLlZG7tsDmoIndkTxxLKHgegsdQxb4uqyHn+thtCaa9Y3eQiwbRLHtsmae236 6tzTDVQOn8C59ADe2fDxECgLVA/DLnjrW9yXCNbX4RGzaPYiPHXgICtApuqRr6VueFqsB I8fNWAb4FBB5lQrZ2JdKK4zvhb2eD+izsd12McTvwp39Bj9QJMHy28RRaJqnApdKpJ5RV LywUR3OYLzd7adjFKweJJ2VkZoT4cScWFR4cdwp35u+JUMkBp7k1Mf+nsZ4I2Y3vmyO6b s3XwLkMs8z5W1f8X1SzRaImjmGiJ/gCUlFiSNZJ5lj/YCGaqYfRlBO/PVQustzd9Zkw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796118728; 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=uu/DkASTRMpcgSLeHawsAZGkWiOiWIuWy/UuhMbfDzk=; b=Zc0NQFI7Kvj0U0EqFXDPwqLJnr05AmXR4NTgkNmRN5aqV4cWF/DeVxyvZl3emQVgVs2G WYohK368IjPKTi90SWLm3Bja53IuNKXcrgfAWD8gfq5I1+UXGFgKvkKftigrhTJZJEck8 o+/r1UhgdUJBLoiAuFjjKribNKPo6VrhqhIoXTo/FzBHnReaX+gGmKOwoGOsjn1udsuBQ M1rIdiYnGBjTK6Wd50to1a1LVVkPG9NC2v483wsAPSL28yAC3mhjhlcDTULI9KwSvUSkZ eyy6mOTtB7yeMGY41+ddoklpXwEYfEuTvyORie9jmTC+yfad1yOmQiVJQIpTMYuAm8w== 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=U5ZudW5Q; arc=none smtp.remote-ip=209.85.210.54 Received: from mail-ot1-f54.google.com (mail-ot1-f54.google.com [209.85.210.54]) (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 8CA48606A682 for ; Tue, 1 Dec 2026 09:52:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8CA48606A682 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=U5ZudW5Q Received: by mail-ot1-f54.google.com with SMTP id 46e09a7af769-8451a619da7so6904594a34.1 for ; Tue, 01 Dec 2026 01:52:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796118724; x=1796723524; 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=uu/DkASTRMpcgSLeHawsAZGkWiOiWIuWy/UuhMbfDzk=; b=U5ZudW5QFbYpmNSEBZ1ceMj2KafJYmd2MFbT4dcTLywL7tESrn0e2LNMjN5PpCEHQs u6gMJtgbFLKRR0OUKf+pCRVp2xO+vKzrbKcEDF4yYusVDEKef4N3P9H8mPeK936CM9HR EQTBPiaYHA0wGNIgAI5X4cM+E0BZvRtDR+D7utvhDOF6x2zORvxQ2xHqwe8kMK9FGPlf HwBFlfrJhN+nL9hVEcunPafREuq3twsTVTeHDbUxdyLR18Ekzjwkv8LOmJ92eDAt0Edo zeIAIVRppBujlYuwGDL73X9ZBfm0XGSn1NI9NWCB6si0zvF7S5XeofLTjTegQ6lmGyXc TcHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796118724; x=1796723524; 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=uu/DkASTRMpcgSLeHawsAZGkWiOiWIuWy/UuhMbfDzk=; b=NaRYoe4nxTWneTleW/9fq5vcQJsh3p30/7EcXgaVpuOL5qHlDaiBzZrZKOKBckYmeL iZxtXCT0ikT1L9QnnBlqUpjm3nGfzWOgY7HfAhexHMI0U8yMusXGN+CcD04E4E/jZBJk 0PKpxFvwasgwh/7CL7UtgxRFBUFOvbgmNerwAAxH7Vc8ELUeVDKUknax++Snv9Ozj8Zj aLBtkrSMcQbre/BakxUbuAYbe4pQh2/8atL0/br0xjLbkjQnLKaHcRhJKTJr8VNpv9QC VPB8CfC7QmvQ7lyY0k7kAjqdx8WBILJAbpDxvzdUZLNSIwYLwU6/7H1vyh6DdONXT5lk U2Vw== X-Forwarded-Encrypted: i=1; AL+hErGvOCSTIWSa8EvAdurmkmNYWBODvKx6qHma/b7ZS1CDN79l5jAwa+n8Sdyz4na5f77mL6q6dFGMEeLakQ==@vger.kernel.org X-Gm-Message-State: APuU4Z9ZjVpmorOA+xLvEvm6fcJd5EPBgTOrGZBrL3noiDsn0pQCxOAf 2BCSPiDgsJnO26Pu4nsz2Vzj3SSz0BTXH4vh8xLUfQNsbWD2aMT1IRUX X-Gm-Gg: AZFdTZeyYw9Xo7/OaWEls3jgoOsw2Z9UYe8F9Yv1vcF0be85sJ4YDe5FBhdQ+JZ+0Q2 D1LiQaKPLSE5AQ67ppyKDp31UaMzejv6ijUMP8K5LufYDARvt/crQPj9guUIWq1nK2AHs9O+ws5 oVEuJody2nErmqYqQJzG4bGmPDfpiEy8gPzLBgATtcpOuo/UrjFymy8i1YwTsMoeMVvDiAErVOH lPsNROG/hPoDVZubGu9GkJIo6p+tiX/qyZ3I/+2F9G1RiF1T53Klm0M825MYVFYSRXRseC4EhD9 hoTfT3CvzjfFeeiHdhfdDoLcRehHE/Y7fid8UEC1ckHhn/4qDaNRQYmy8pFkDYl1qH5JOACYVoC 48cNpWEA8o961RqJfmPje74NjZSJCMr8kAv1ThjpJJSjG1wKz1ay5H95vwTGCkEhzFglf3W8lRk EpA3B/LzYiQ+P0aOpbfIZt/qVh5fu33Zp7JOjhdRwFLU/TapCnTxWZJ+jvmC97lWhVNRuK0DBlP JWmq6+DfKMOm/WtKpQ+dzOsGvm5ZXS5+hax3QEOJibg171b/5kh0nj3n5JNDs+qDHqkMYX4Vr9O cakTqpGvp3x6T2TJZpighqPgvZlTL/0efWSXAyd31F0rJR3QKxKWbfbWuBtCO9nFNd24Zmtyek1 v+ddP9HUwIjmMvuvYjQBxulog/2wxHfILJMioTH01iGu5WQM7JH8jCVQXcRA= X-Received: by 2002:a05:6820:7601:b0:6b7:8415:d780 with SMTP id 006d021491bc7-71b394b8053mr26209268eaf.43.1796118724497; Tue, 01 Dec 2026 01:52:04 -0800 (PST) Received: from fedora-laptop.tail348456.ts.net ([172.245.82.59]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-71b380b6f82sm22698287eaf.10.2026.12.01.01.52.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 01:52:04 -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 v2 1/5] selftests: ublk: complete a striped request with its full length Date: Tue, 1 Dec 2026 03:51:47 -0600 Message-ID: <20261201095153.1012606-2-tom.leiming@gmail.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261201095153.1012606-1-tom.leiming@gmail.com> References: <20261201095153.1012606-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 Reviewed-by: Caleb Sander Mateos --- 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