From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.226 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796480377; b=kz+U7LU8eJ5zNEwoWCxEPsPpPFy95ERpvZkbaTDdXaE3nYO0Cvrde5M6t0thh0+s9Sao RvUh2QCVu0QuPMu+XFl73rhm5WsMzKkGuTvxqdAOlbys2UcGZlKn6pi/gKj01chTP75zJ 7V9dx4aIzUpK1opuzkkAoPx6kLvAyOECrhKx6jum2bKjIgq3bCHjMhRZ4BoUtbt+uRUr5 Y3bITwK1G4vOhFVWkPYKZ3ahiActWHTCPmQZjGBLUQd0jid22j+ttRFjInZefeNour1a5 Suj0jvjGcXZGx3C6LbRd09P4xcM2ZuUy/NRuEoKHlpo0VbzwgGUFGoQSTNDfUo9HbOg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796480377; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:From:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=NDDY4csKPLAhxUbcTtUNW4SZFS1MmMHrWvRDsKmoX98=; b=MTzd8TgzEhyjLFjZxAWbj7sWzZuWftTkbe/lhaY1ONaUoHEdh5yDibM134syhxioI/Bi JWyMxVhVQbm5iIr9e8qmJipstrMGdUSyWTl1zK21UmBkpOz8fRuraYcuCAOJwdWRqXI6W JxiUY0fOuN35JKa+Gi2+24ya/mCcEMTo2YEF5fNAyLxGYNifnc1AjExi9adrbFtuxDtyI ZnI20LaaAt6VEDBlS/vsYQIjPO4sUHlXWXQAdplZv1XwgvVeim0QlvKCSea7ae07eV0N2 kme+WxXsIwqMcHVQi3BJNb/bNetKomnS97EeIYUc69Y2oOPfLJhrnA/Qpru6Ub07EtQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=MOzA55X9; arc=none smtp.remote-ip=91.218.175.226 Received: from mta0.migadu.com (out-226.mta0.migadu.com [91.218.175.226]) (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 474CB606A33B for ; Sat, 5 Dec 2026 14:19:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 474CB606A33B Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=MOzA55X9 X-Envelope-To: linux-doc@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=4dVd9/DmcA/Gm3shtObwg1npCcuQh5E1hb2eTHUX1EY=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796480375; v=1; x=1797085175; b=MOzA55X9Qrm77CELD3NoyDMwihqd/P+tlbTMS9/95MqFsbqq2fOmMPnJSYg3FF5d2NRfsE5x Z2KDuB892Qv4PXLj4dUSFev0qMvVOXTMgD9WQlpCwt1XKFUgo3HfsIhSCxJGEfkAIw/Nf1o94Lj a7SZiyUck1TCL0z6VjQEAQkg= X-Envelope-To: linux-doc@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 7f51625d99b95926; Sat, 05 Dec 2026 14:19:35 +0000 X-Mizu-Trace-ID: 7f51625d99b95926 X-Migadu-Flow: FLOW_OUT From: Md Haris Iqbal To: Jens Axboe , linux-block@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Christoph Hellwig , Jonathan Corbet , linux-doc@vger.kernel.org, Md Haris Iqbal , Sashiko Subject: [PATCH for-rc 3/3] block: copy BIO_ERROR_INJECTED to the split in bio_split() Date: Sat, 5 Dec 2026 15:19:12 +0100 Message-ID: <20261205141912.37608-4-haris.iqbal@linux.dev> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261205141912.37608-1-haris.iqbal@linux.dev> References: <20261205141912.37608-1-haris.iqbal@linux.dev> X-Mailing-List: linux-doc@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 BIO_ERROR_INJECTED keeps a bio that was delayed by an error injection rule from being evaluated again when it is resubmitted. bio_split() does not copy the flag to the split. raid10_handle_discard() resubmits the front split of an unaligned discard to the md device, so a discard delayed by a rule on that device has its front part evaluated, and possibly delayed, a second time. Copy the flag in bio_split(), as is already done for BIO_TRACE_COMPLETION. Fixes: 6bd856cc9996 ("block: allow error injection rules to delay bios") Reported-by: Sashiko Link: https://sashiko.dev/#/patchset/20261111215838.103356-1-haris.iqbal%40linux.dev?part=2 Signed-off-by: Md Haris Iqbal --- block/bio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/bio.c b/block/bio.c index b0fcc69de653..0bf72f7b9f4d 100644 --- a/block/bio.c +++ b/block/bio.c @@ -1962,6 +1962,8 @@ struct bio *bio_split(struct bio *bio, int sectors, if (bio_flagged(bio, BIO_TRACE_COMPLETION)) bio_set_flag(split, BIO_TRACE_COMPLETION); + if (bio_flagged(bio, BIO_ERROR_INJECTED)) + bio_set_flag(split, BIO_ERROR_INJECTED); return split; } -- 2.53.0