From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F0DFE405C4F for ; Fri, 10 Jul 2026 10:16:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783678578; cv=none; b=ebOufny+EkarzrY1C0M03/6tyjr176kuD1r7BLV2Eucw8qzdmhxy8Cc6QBaPByBiyO5gZqKnTFaHNfA0/HsJkSoBVx6OPLUSPVHbwIE0hNkUHllmTgkk+0PFkkD/LYJWRY5QX42r/eQq+93G5QzNKXkIgzd197AR8vFBhRDJTc0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783678578; c=relaxed/simple; bh=N2/4bpj+Xkr951tLE4PruUTtiurHt1Y/kuwTFiLb83c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OkTwJ/nPb6UyAYXGqlGgwJe9cQsPcvCKB6+4igBRpTsNSsetM4bT/KDmuaxL75cdthIfpwAca61Ehhe9cjJbywmQ8HDvreUyRwSoJUpjB7wFNlQrN0Uta8Zgzz4HzAMv8Rs1146M7OYopw9WXcBWgmQt/HanOCPSfZNxeOXLq50= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=JijvvJ7m; arc=none smtp.client-ip=209.85.128.43 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.b="JijvvJ7m" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-493f431e317so3699685e9.0 for ; Fri, 10 Jul 2026 03:16:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783678572; x=1784283372; 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=sDXS6mRL4qrhgTwIfHDccn9N8HWpnmgy7FQ0KITOahY=; b=JijvvJ7muYI6KrG9+3FagUnEQJzoooODlQzWawGYRtuVpvTuiwNyk+tZGg+82VAeOe fs4T2zmW0Mk3NNZ55gry4C4/hfoM3NbBiuMcoQqnRjn+yHoxijuy4oNcOWXcTfNwWBi7 58jLwPc4aHOSjHvdRZ3DjMc9Gbogt9cJsCKsXhFnEa3PiHJepnjoewkBo0F8kwFaLDVQ M7ZMFU3g3SUyTwCmW4uWeqKW2mzvdP79ctoo4D8QMCmQ+hu1ol/1lSZTvn6vySoiecQK hXXSmdaVMqmSnc/obbWQPLcV/k5F7xgEuyIpMoyMsk0ijJwDpyMBgjeyTuzT6yBxMEFL DOyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783678572; x=1784283372; 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=sDXS6mRL4qrhgTwIfHDccn9N8HWpnmgy7FQ0KITOahY=; b=Se8YMHm6Rd1jKDfyX4E4wWpusJFQZQdeTuAl6TSiow+ixam3gP+TCbHn9xf1UiXZBf iF1zzgPZM5kzc2rZbgRi5mB+iha13fCj4T71LKj4+nK3HGvxdBj7J0oPVEhjQPxe8sd1 ZsLdCyOMjy7Hc4GCpM6+rHPFpGWmvwuBUs/E/vErfWOs/5q8M8P7+KkfH7x8PN5IZaRb eNugh5hPB48EESt4BYIRNPq+XKvisnGZMVJkP6tYRGf9vqoLE0Lv6p5VYBEEm3Ch//m0 Jt4BTI6vH0+GzP9COhzN/+IrlJzGOVWWwgehQCbP6e8bw2TujG5tIow4fq5CHUbrOwjl kpSw== X-Forwarded-Encrypted: i=1; AHgh+Rql9ffjTUKIGxe8+vicQU6JHetCMYSxxXj+TlczahzZpK/OPqHrRFuEw+pCFGNLhSP6IE8aYiqvPGGQSTQ=@vger.kernel.org X-Gm-Message-State: AOJu0Ywio27nl2AFCzYMkH4FHPi1fCWm/sjgY7tzw76ql4Bm2Onvsl1q V7tfncaLEj370pN1px7yzXtN4A+r/i4mxVa5aWh/z+nB9MlSTXBiUCC7 X-Gm-Gg: AfdE7cnLWoZh9/MMiH3Kv/5/xKhTXhMJhqfptl7BC0liMUe3kizu6V2QwK4evTncDQh e3PZKAaHhPHt5zbL1WWgPSIB++4Ii7TJmmIQErVsw90M8y8fV/MxIoQuCY1DvpocZoCcOYpkff0 PuMNI1CR7bhqHlVohLs8h9ZZnMs0sp/QPbMaUdq6e/PWpM61h/Hmc6Z+7olDMNpL1k5OXZ3hNed O/BH+MekoHT+EtuYSluDxZn0xN9vnMJvkDpmuMfZHRiyWV8oYca8HoP6pV+zqlGDef/87XqK0TO lLISEQTRWM2GCGGpJmjj/q8VXJdcva887sKyhsmKTtNj03AaCANs660u7uDLnTIMLcUdvb/yhE8 X1G/sRmc/majbsD9GGESo1QSKqBDZY3nE8KzfUZmrG2CGVXNdVUE7MFx5rPR4FZkcH/+Np2MUrP gMKP6Nt6jouZlOPJxKYRF8UyTPXsnTP3SJnqfxIhayG50oKvNaMhNlOYV7dYG5Db5K X-Received: by 2002:a05:600c:828c:b0:493:bed9:b53d with SMTP id 5b1f17b1804b1-493e68ee07cmr95833595e9.31.1783678572187; Fri, 10 Jul 2026 03:16:12 -0700 (PDT) Received: from yocto.. (dynamic-176-007-199-185.176.7.pool.telefonica.de. [176.7.199.185]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-493eb670a41sm123554875e9.0.2026.07.10.03.16.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2026 03:16:11 -0700 (PDT) From: Abd-Alrhman Masalkhi To: song@kernel.org, yukuai@fygo.io, magiclinan@didiglobal.com, xiao@kernel.org, axboe@kernel.dk, vverma@digitalocean.com, john.g.garry@oracle.com, martin.petersen@oracle.com, abd.masalkhi@gmail.com, linux-kernel@vger.kernel.org Cc: linux-raid@vger.kernel.org Subject: [PATCH v4 4/7] md/raid10: remove unnecessary barrier around bio_submit_split_bioset() Date: Fri, 10 Jul 2026 10:15:18 +0000 Message-ID: <20260710101521.1714-5-abd.masalkhi@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260710101521.1714-1-abd.masalkhi@gmail.com> References: <20260710101521.1714-1-abd.masalkhi@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit raid10_write_request() drops the barrier before calling bio_submit_split_bioset() and reacquires it afterwards. This is no longer necessary because the split bio cannot re-enter raid10_write_request() while the barrier is held. The allow_barrier()/wait_barrier() pair was introduced by commit e820d55cb99d ("md: fix raid10 hang issue caused by barrier") when submit_flushes() called md_handle_request() directly, allowing re-entry into raid10_write_request(). Since v5.2, submit_flushes() has instead gone through submit_bio(), eliminating that recursion. submit_flushes() was later removed entirely by commit b75197e86e6d ("md: Remove flush handling"). Currently, raid10_write_request() is only entered from the bio submission path, so the split bio submitted by bio_submit_split_bioset() cannot recurse back into wait_barrier(). Remove the redundant allow_barrier()/wait_barrier() pair around bio_submit_split_bioset(). Signed-off-by: Abd-Alrhman Masalkhi --- Changes in v4: - No changes. - Link to v3: https://lore.kernel.org/linux-raid/20260708101341.473750-5-abd.masalkhi@gmail.com/ Changes in v3: - No changes. - Link to v2: https://lore.kernel.org/linux-raid/20260628142420.1051027-5-abd.masalkhi@gmail.com/ Changes in v2: - Expand the commit message to explain why the allow_barrier()/wait_barrier() pair is no longer needed. - Link to v1: https://lore.kernel.org/linux-raid/20260623072456.333437-5-abd.masalkhi@gmail.com/ --- drivers/md/raid10.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 3480fc7907f0..2574f60dd771 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -1487,10 +1487,8 @@ static bool raid10_write_request(struct mddev *mddev, struct bio *bio, if (atomic) goto err_handle; - allow_barrier(conf); bio = bio_submit_split_bioset(bio, r10_bio->sectors, &conf->bio_split); - wait_barrier(conf, false); if (!bio) { set_bit(R10BIO_Returned, &r10_bio->state); goto err_handle; -- 2.43.0