From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.37 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796475342; b=H1Xj96ENeywJP2vbnDeAwJPbvJ4FnNDYUA41G5RUqIqWqC8RDRb7C9ztx1+OOyNVXtIx NDV4lvkpWi8aRLLZG/GU2YyFgLqAqVi1PuZ8ZJ1KOC5wBkRKUbJvLF82tiXkrDIHQgcrk p5W3q8/9c5U8bsPQ9CTtuOZztOpVKOdNIdEf+XBVLYCt5AGD4NGGt9aU4TOMwt0SvWKPT fh8Ecl8oqRDTlkn0Soo1cJaKzjlPk3DOGjUryokE3dldxZdxQ0NbmQjPpxf4R3UZecxPG 0rRyM8gJVB0oIgpae+cy0gxV54vqzoqtguScmBCXXhE2fZE1aRllLITArARwQhPWKgQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796475342; 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=8aT+nNJOCiE+xVjJTRDzaLHUW7yaQSwobFQVRoG2CqU=; b=HGsgONeSBm+aZiDf6pypJcYI4cE8+zsZUiR1qWTW+KWp719xjPJQYkEzvkpzzYFhB6R1 5Th3jqVCcKdzn+tUcoFPoo+N4L6/5tQCzhLxnd2L0AQdDE/RdWBEZjR0Xn5AZfymRyIuD nZKjrDLiqq3dyLD9Y5KuQx168x1nmVnJFWtD/V6Tc+pArVGS8PqyZwzK+vfAq2Ir9DUw0 jr4uRsMDJTevxuCphEifwuPSaLeqY0ZjfJ5+PdXHVWNcv9/97+xCifB8Kosf+E6OFF8wp L6yB12PiN1ulBc4oJyEFi5m30RXPsDehGy0Ku2R2vCrgr2sbp3F308ZY5fVZQwVDLBw== 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=dT7QEX28; arc=none smtp.remote-ip=95.215.58.37 Received: from mta1.migadu.com (out-37.mta1.migadu.com [95.215.58.37]) (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 E556C606A322 for ; Sat, 5 Dec 2026 12:55:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E556C606A322 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=dT7QEX28 X-Envelope-To: linux-doc@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=lwlm5Yw8Nzd9q38Ut5KE+Zq3HL73Cn3wAUjwWLq4aQY=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796475340; v=1; x=1797080140; b=dT7QEX28dUWwMbbrktP7WP01Ic3BsTtt29slXipTeI8BR1Tb/BNBj8ePYZXjQWl6gXJzRhnL BY71L7MiK3PbpLCJrCvrkdB1RxN/JSPQmTNAw21DJRy49UBumkf3m86uTlaqJP5MfVBE288ubOb dyetcBH0eE1q0+A/RBglh+bA= X-Envelope-To: linux-doc@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 046999bb12efd831; Sat, 05 Dec 2026 12:55:34 +0000 X-Mizu-Trace-ID: 046999bb12efd831 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 Subject: [PATCH 2/2] block: copy BIO_ERROR_INJECTED to the split in bio_split() Date: Sat, 5 Dec 2026 13:55:09 +0100 Message-ID: <20261205125510.29717-5-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-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 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") 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