From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.38 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796475347; b=IvTtZ6NrCwFgk+1VmU6taPpJa6MCDrdTo0ZeSo9WpyUXDw0GA6zhs+KZw79OsUpPsBiS YGcKdaPLkrfjZKuo2Qsmn4mBMyYAzcP9MyqXs1wD9cczCYM7HG1Scmr1xjc2ELPk3rndk KNQdalUJqxl6QNbamW3hcHGFUY7+45scBeePQZ/nHorg4+uToS5doMGZAd5d1J7iMij0C nvSH4MAnsDjFniJeC9GRTtd5ZxuvhQWFhQ9ZrEhEDCN4eLcUNEaLjk0fbpak8NcTLWG3x JxzdDdxixJJPn93+EGUxV2foctcdypdeGk+EoiTpolsAis673MBEpYec5B7tCQS9tsQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796475347; 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=nJghgJSSGAny7FC8g7MaLxu0D1y6nZPdnIcg5rwgAaiEPfZKiTE0qDRCP0xmlWU5B73H OCYTkRGH81FkPZFl38t8k/weJjwZ/Tj8z51wtIgS/wpopHvJkM/BRBDQmeoQ04X13NjRP pk8zN2JG3wHkNEZaEsEFqn4oaYuVlEWcrNYdlwYpqjvE8Xy3EvDIdxmSBT2njoTbBkTWB Xsjx8XV5y5vTtjwJnrFRxM0db2GEefTz3Gt+wcm137Je1nlhC8rduipmdUlMC/DYLo511 B16GWFzFlKIDoBkyQHgxWm9SMvUN9+74RMhjq5m8NGnb6iWp3GTt34kqA4D8HeZyLVA== 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=BgcloYrX; arc=none smtp.remote-ip=95.215.58.38 Received: from mta1.migadu.com (out-38.mta1.migadu.com [95.215.58.38]) (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 E4C14606A334 for ; Sat, 5 Dec 2026 12:55:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E4C14606A334 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=BgcloYrX X-Envelope-To: linux-block@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=1796475344; v=1; x=1797080144; b=BgcloYrXWLjcOmxnhgjO9Bd7BQOrOlYa+9zIngjde0DHk8cXzzxCdBOtcGU8rHSoHh1Zc40/ FoSov/2ZYinkKjFGPEq6gLaG5YIqsAP91VA7F0grZXF/76cBc3mpotaDAyPjL7czEKIjb2bgvO+ 5H2qeESWluoU8VIuOCoq3CKQ= X-Envelope-To: linux-block@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id dc1bf09b7f797c5d; Sat, 05 Dec 2026 12:55:44 +0000 X-Mizu-Trace-ID: dc1bf09b7f797c5d 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 13:55:10 +0100 Message-ID: <20261205125510.29717-6-haris.iqbal@linux.dev> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261205125510.29717-1-haris.iqbal@linux.dev> References: <20261205125510.29717-1-haris.iqbal@linux.dev> 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 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