From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.51 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796257968; b=Z17BM58hETb632Nw1UOp8+9eZK6+79XcQUMiWxyRJbX9Q7CYaxjKIsEvptMCEQtUMfZ7 PZoIx9kfjFy5fHM8aT+6TvP8kzQl1jtlmIUOuR2axZ0lsi4TLMCMZl3Tya8dBLdCBaHLo /tl+u83NK2HxqvQRZ6s2k5ZiU/v/NVDERfnhH5otv/FkZg/4BZmI1xhF7dyL+OCaDTNYU YopXSSjS9hxYcaqqJn9sk7eoXEL55Yq5oIp5JwmBFphqnOMhl4I9/nIHmzy7fCFYlcbxx /P2Y90mDo2rAErzY36UVxNXiLv0+cpUHOLYFfp5CQ6uY9CY/vfUeudCqiwY5sTrzWSQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796257968; 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=wN+AJTG2l4Lq0khaIrzsW+fGFGhOY/sfjz1E9BmrspM=; b=TbnU4DnavuKVUnpHobGNKw0/CA8dS8hm2sq74NDo5C911zpC+S1mgMDKMEmx6dPpCDhB LZ9fVsKZvqUDa0B7eMw7MgQhrluH4FudRTnZZzP0ZuOJ2UFPAxrQP684JIRB47rWWLDTo hOQcXiFGSA8gEbAkLbwIO1ptzgfj7daXk/RaDki9ggrLDtdG4dlST5ZRUs5anmtQHTG0z SaJ4Wu8J7918/sKCkAIFu+gDekKl+rxGo/WhyACbFDiuv2ikb/3yjXRFY4Oj+Xiiv+x7t 3XP+4JNN0oQ1g+3aSVz+SOMcxMipytjKFcv4pgvBPetN6qKiS0zbSJ/dpKBXPRIqI1A== 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=iY0L8sjp; arc=none smtp.remote-ip=209.85.210.51 Received: from mail-ot1-f51.google.com (mail-ot1-f51.google.com [209.85.210.51]) (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 77DA2606A322 for ; Thu, 3 Dec 2026 00:32:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 77DA2606A322 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=iY0L8sjp Received: by mail-ot1-f51.google.com with SMTP id 46e09a7af769-862b3a39d0dso6383766a34.3 for ; Wed, 02 Dec 2026 16:32:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796257967; x=1796862767; 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=wN+AJTG2l4Lq0khaIrzsW+fGFGhOY/sfjz1E9BmrspM=; b=iY0L8sjpeb7qpgmZsI+HyOTJdm3cnqWWuzigUTCqgqotKZIhRRnVUqOnaMRNt+fYom CvpqZPv9bqKG2sIlzzIIyHOPvXFfQ3kWgV9UOBZzU36TgQ9jEgMbhlfCQuOWZg9OEYNL YWIvQV1BVMWX+68sKSrSEYcpTA/5aE8hQDqva9GKlPkn00tpoxNjCdYpnvSvnakH9/6g Qrg/S+oVCddZxAp+Suo0rvSGfQvtOZUIpmjqw/Schddq8r+yZ3zvEqZp+lVzuODJqWXF vNnYLp+wBImygRY7TvxvACh3Car2dp7B2/Pyz9PDWJcj88y3+lpqPpDWqejiPlvZpNQC 7ddw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796257967; x=1796862767; 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=wN+AJTG2l4Lq0khaIrzsW+fGFGhOY/sfjz1E9BmrspM=; b=eIJLmLDGJ3YYrFaXblq69rPA4SZBwyVIlvKw/A3bmeaB2EDgFt/JauwGMIWPFfjGWj J5D8e/1st33E8qXkmMKxEqVqV8G2y+KxcJGYrCm+8Et4fdaejoTkhx5rkNpNHKKoCV7/ sz6c3u64VJNqrzpgLGfx+hkC+BkHG0kDsL4pglMFD3TJ5iqObDUPS7jVvSjgw8UlgRnd 3CqYe+7JkL4XjGvtugX4br10ITK11jyjj28zisUqwYOw76mdwPFjyJoeRjtvFJtCtxJ/ tgBk1jfel6bSs7M522HRA/DDjYQoeuxRKvQefS3xb45XXch/SWvinRXknALMmkK6p5HX 5PRA== X-Forwarded-Encrypted: i=1; AL+hErFlUtQ7ssy/p14gTrjPtYuxCXBx21oNV8mR6zy4L5OfQ9h2tlzHsAs9e74NzRkDljxJVke2xikRZ0qSAQ==@vger.kernel.org X-Gm-Message-State: APuU4Z921grB5jjNpvRUZSx8LedKAODOvyaqqrLbqvQGGZBbbGqdtvoM b18EySQnXzc1JDNv6DPHLtO03RlSKD6mgS53hl6hEruPfvelBlzzMAimldkLLYglZUI= X-Gm-Gg: AZFdTZcbVxv/B288ZeBNNjzk/Ae7S3vfzuymHHwWTWdraydU9xqBqALhLamV9Z/Sg8C v1gazIDyUpduS9fohL1u0tt7AHk3U3gmILDAceaVI0Ss5ojT1jsL3FXHksVoIc3DdMHpMOG4KU1 vVFvWSG2GH+zJ5OnPgxlD2mUZy+kjaCCCOgc9thqWVGXGJhBKdwEKC8p2ZDkqvMk4gcEcS4innM qV/9ky1Vkkz1CLh2VEq29giaKrxj3F97Vbcck9yAL1JbFAz6A9XSvAfwd54/ctSsqezAFeg6riJ aJ1BAziECqxMohNCGmLMTPWpnkveQckS1HzGyuRYdTdz4+3iTLW1VxsIPhXVCByaNs7dCXDbEo/ kuw9LfmpZy0gXTk3EHi928BvsqxrOapmq/PGKXeTr1T/66RFILsrSkjjuoy15Y33cd59BeOW5yb SuLpuU9qi3H9OYHHnK+df08vp9X1xkxVHo24SIXQACZokfRiQyQ9sNQO+xb0VVTSQdKb+wma6A1 24jzyg5HxztagSzPCWRhYrLqqAtRGAy+X50kO+H+2tv1ezfl9T+u8yasxgpVItb/MQ10Vqa07Sp SL04ws/EB6EqBgsgUXKNIytN6GRwL3wF6VspKHAswGJtfbHzvAFlb78bDIOYSG8+POBsUVGcsWj UeGV2KzqEaoHvW/q+4sIocjUm/R+2+qBLvuhlcNyBpg06mtvsfqqUTXfea2bclHk0L85IGxXAyt DHdMg= X-Received: by 2002:a05:6830:6f8f:b0:863:959c:7994 with SMTP id 46e09a7af769-863959c7bcbmr18855641a34.1.1796257967521; Wed, 02 Dec 2026 16:32:47 -0800 (PST) Received: from fedora-laptop.tail348456.ts.net ([172.245.82.59]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-863169105b7sm32213309a34.22.2026.12.02.16.32.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 16:32:47 -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, Utkarsh Singh Subject: [PATCH v4 1/5] selftests: ublk: complete a striped request with its full length Date: Wed, 2 Dec 2026 18:32:30 -0600 Message-ID: <20261203003236.1514775-2-tom.leiming@gmail.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261203003236.1514775-1-tom.leiming@gmail.com> References: <20261203003236.1514775-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 Tested-by: Utkarsh Singh --- 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