From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.246 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796480377; b=UOr75/x4gyhqChma51uq0Zc9xr7hOTZ8xLU33qxAG0DDZAYOMqe1noDokb0vfXaLI4Mc 5X8U9In7ZgUveHN7hD4sDiwsgpXtgxlTW+pBKmOYZluKZq6ze1UshIRnJzt3LmhuVnNVd NNYrTQ1v+s3s6pYyb6SidLoPpXQ6OJEXGOrDaMrs+fStlspDr3FdkaAsxfMNAmP6R3SJM DATZH4sAwLKPoykthp9WEHwPp4TJGYjLaKARvqe40R6dS0K8u7Z3qGSBEG24tCT2PRTMR QiYiHiRFQEYs/5UqoLiMhpp2ubbHpThhRltxmplJgNbtia+hUmkjpO7Js88Zj12GSGQ== 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=SKuiyBcbFp9mgcDQQX554mVN/ovnI9OEd9sThojhOsTT57s5I4HgTqPLtkBzGK+kcZol y1CN2doPU0iN1pS7p0wh7N8dswVBUwt+Ey4JDhHrqhtuzfPsVBF0LG5tKbDhIVflK+oaO pUPpVsSS4HvSzyYr9qdWidh3xIj5ay64b7NIKm62S1DQCbEkQ31kIINiWb32dUxB+X8En fsiAUG2e+SkUfi2v1J6+TdCIJwRyjTg9M5m/UgefzQRIKuj67PH1EHFEdqVEnL8CTUgPK gcwlKAmJ9ay//5t5y2/HzMmPzhzKSz3ylW96gjTN9OQxbl/VSsU3I1PXTEMEkiif+aQ== 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=95.215.58.246 Received: from mta1.migadu.com (out-246.mta1.migadu.com [95.215.58.246]) (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 E66D0606A32F for ; Sat, 5 Dec 2026 14:19:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E66D0606A32F 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-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=1796480375; v=1; x=1797085175; b=MOzA55X9Qrm77CELD3NoyDMwihqd/P+tlbTMS9/95MqFsbqq2fOmMPnJSYg3FF5d2NRfsE5x Z2KDuB892Qv4PXLj4dUSFev0qMvVOXTMgD9WQlpCwt1XKFUgo3HfsIhSCxJGEfkAIw/Nf1o94Lj a7SZiyUck1TCL0z6VjQEAQkg= X-Envelope-To: linux-block@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-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