From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.52 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796196437; b=XSJrmEX/zA/U0+ExLfV3oHyBlzXMshWZfcu8f3HvreZQc+kPnjjzMfDbpRL2YHtF6nSV pPwSdzhXUDH7R8061P3jXHuOtCuq8CdG+k8Va3V448dS9taE0EN+ZTMeGmDMotiAu+Lrq yBtIroOIqIIcu5forANin24d5S5Ikfujwd0LLneV5+NH6Ce3IF3f4o48aAd4TFjlesEte au4J+Uxyac5RbkucZ77/Qj1wYvzokE7KSiG+O/+Cim5TqkPTT+31nt103OKHITC/Au8Pe BbcqaltcSRHH3wIRTbJ7LnsPfM91K4SFdzc0mYCIhjptSKnYZvnIeqHNb0zAZIQJY2A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796196437; 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=yV5J1NyhHW1XfCl0OXRPvxecwFRp/H4aocNO/hM9MyEar+V5i4kze5fSilZro9LNhUMj zy7KqcNzNQC2YnPiPeEA7mfZ4Qw3XMradbLvvGv/toKvrjK2UNDu8eWf0jDqxQmYt5Q81 4w+752+VjrXatukdo6XadkTfdhgGnKC4qfV11eP1EBDiHYogjd7SClfuQ1snCGz63899w 015jkpK7GLX7/PhlGUbMgcA7LN4PKuMhK5s9wLSb3r2jCZVagc9VlsGRB1Jva0qlMS5UH H6k7yww6IKzfMn84jbwrijHK4Bp1AdvGlLme9yeMXoFu32JQH1nCMLQWT5hg1a7gaAg== 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="n/RWm9gz"; arc=none smtp.remote-ip=209.85.210.52 Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.52]) (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 B869E606A323 for ; Wed, 2 Dec 2026 07:27:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B869E606A323 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=n/RWm9gz Received: by mail-ot1-f52.google.com with SMTP id 46e09a7af769-862bb0a189aso5398275a34.1 for ; Tue, 01 Dec 2026 23:27:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796196436; x=1796801236; 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=n/RWm9gz2xyu5kZKh4/fccx6bqHm+7VOBrILd/Jv/us3e4Cfv0tpLCJMBC6XzQ4Bo8 4PWYHlelfVPWD6rwQ2wFCscov/6zWIHMUUilBx04d148jiXwnCKB6EyNA6wjCpB80BNG oLRBgNJtG5zAQjjdR9+AARot5Gq7dvutP2HfsMFD0r9EVQ9heJShlkE0+/iQE335/MTj XRDNmSWRdNkKJJhZ5TxFqh0dZO9DVPF5KKxVV7P83aih6EAHe4OVgZ81ieE0AJCF8pjy vsBgZJtNZ++uoEdodLr6k72Czn4PMJlGRC3ltFpxaD1SRU9Po/gcsUCOCiRoYRixZpcA iJiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796196436; x=1796801236; 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=NEKts5P74JTML4RrGMZl0P/PK94+Vi4R/YHOx5KAy1qn7en17eEVTlgRS8vMddBQ3n dRGjVyl4E0graoN5gulhq5oNvVbBQ/C3izKMYyjwTUiMazBILTFT5uQY3H28lCCgE/1F QmRS+7IxKif/4BwV09PjDL7S83UfTeOhIbPKIL7UUELzYr2fIHXKu9wX4rjAEo+w08+8 MPMvLxFimb+rz0wmQbJQ+vlCjWDbweQHknzxJc0m09BgUfm4b2BRSQ7dZ8fCebJVOTeg NMWTjtIsviPlE7v5n9LWaP3Y+/NYafiIeVt+JasDE5tbs7i/3almTB6YU2qnQAk/Exp6 +q1Q== X-Forwarded-Encrypted: i=1; AL+hErEEZBSzjEJR9OBW/d720AggqCC4mFkD78ZjeBMZKQekzGOyDu/q20t/THDqKWLO0P0PCFHWj3LRlgOeAg==@vger.kernel.org X-Gm-Message-State: APuU4Z+oMp52cBnnWmXCe3lv4ecg0u48PzOqbYNOZRIqSnqvHTb5CDFo 9n6qb9H15u8+TMcc/h89WDxlZph4C/oYih7I3WymhqLwrrq3AcGrlJn+ X-Gm-Gg: AZFdTZccx8vAvMmQd5lPKRz4w2IY1G16wj0FJg6gjNT3kgY6m2zJlXvtjWLUpOmSjwo V7LfVWaKl1Cc5STe4Fnb581PwUlxcj+tePlAyJ3SVKT9j8RcjQVuxZPrtRTfFiVJXOprmh/TRvq fk/Pv8DnovZftAr5rgB3spg7Uh9dOt/Lvk+e4PqWuYDJzAGhRDsoQspGK9rkVTexILhDcOq8ye4 P+J2aTZFu7MecH2aiWLvh2iYRf5YYIIPTN6L3llJ3qnc607UzKt6Hc+9X35gl65W0pbWgGwHcxU Ie3YhDrkadcL8EVpG8qY/1kIReiwwbinl2SQFsp90pC2EJO5qugsW6jqaqT63H2c2XvrgQXUI/k jMCG/M/CLHRzH3ef8AJLRyWZ65tW6UbgkRJ70jvQF9qCvCWRqOUeUlH3a6jX9klg1d+Neqf1o6O m3gCoNFSD+0bjvIbwuMdzDzVcHK6iVpaXv1EdHSgvGXaNiTpQAqIIRi23bfdxPtFVefoCQIwjnJ ZNE30A5KWZIl5aGEJvofJdS0KQGdARxrRn8+xWKPAqrzLvAxhsZit0/vKfpHkh13T71SxTKz9ib GIcvFnPTUGQLlq1VJn41uUEkt8H7etGl83WURH8L+eejYUMwMHiGrb7KLf6sB4djF2nzCaCg+lJ GaI7s//swOGLHyLEa+oTTPzvjmVk44MeBE8jz2y+LBsLMiuzJf7K2DlKaXA== X-Received: by 2002:a05:6830:82cb:b0:863:b020:b1c0 with SMTP id 46e09a7af769-863b020b786mr11888672a34.18.1796196435826; Tue, 01 Dec 2026 23:27:15 -0800 (PST) Received: from fedora-laptop.tail348456.ts.net ([172.245.82.59]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-863168bdaf7sm29355597a34.5.2026.12.01.23.27.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 23:27:15 -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 v3 1/5] selftests: ublk: complete a striped request with its full length Date: Wed, 2 Dec 2026 01:26:59 -0600 Message-ID: <20261202072705.1288588-2-tom.leiming@gmail.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261202072705.1288588-1-tom.leiming@gmail.com> References: <20261202072705.1288588-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