Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2514283lqp; Mon, 25 Mar 2024 00:35:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU8vF38tZCkLh8jeYd3UE+emzmljXCJGYHWnQjqmE2rEOZEtIMTIVkcrYY/1DMwpD/vP2EL1OUsvRecBuSPKw6QyjlhaK3f6m9HPpv8Hw== X-Google-Smtp-Source: AGHT+IEMzGV3IHRURmtwRzlAiSr+6XciNKPEq+ujUqVWAlTHfSxjIobGCk8B7lLmuWe42jYtXl7U X-Received: by 2002:a05:6102:2413:b0:476:f355:124b with SMTP id j19-20020a056102241300b00476f355124bmr1576742vsi.32.1711352124395; Mon, 25 Mar 2024 00:35:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711352124; cv=pass; d=google.com; s=arc-20160816; b=nlqTMjveIthJ/prewT6SN5WvnF/8gW3lC0USSAkkoJkmc7rHoVVxMckm2bS/s3mQyZ huokjFYZs6WMqufP4nHJxFs0Y7EYpO1JjiHdntqLJxGDMFks0KIFWhXIeMD/5Mq8Dyx3 /5XozkWITv8MW8zbkZyMFLdqGtfz9PuSwde/dCR4Zx0tQTmF6Is2zrZKNzIk0ihH2C6i 5TspzAaAF8YcHEgx+a7SCCVWqEMRJ4xkJd8mz9lsyAtsbJ7VD9Ror59cwU8Gsluw1esR EWx+NZuVN9pxDDaIuBvEnPhie7OeJLKNsLgZPrwMZNulstozpBF2Jbe0M2f0/trVXFVq pPPg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=6+0ftuDuzE6jV2UmH/0irmSQJ0wbJY+Up55mn6+LOI4=; fh=JwasWLzX45KWMyubiubl0YZ8g2ygEZwmBm2GQlRj2nY=; b=YnjR7EHVGDwapZRk3Qh0s/hxfmpkGYWvvfeZEE0FzGjt2y6uLdIzSdBwQx0vqFenfh UtLQPK/BohhQCb0520ODtwykSlqupVo4hrKZ6xFE0RxfOcC5LTFkuIHY71wY0Sp2xHwk +a/YfyATdM2vtOVfIr4E+dDwMrO4qKO7aURl6f2C3U5sCzBVqjJmO36o4rr5x38NwDAs wSMijiI9WUZn5KNBDyRCD5CXsDGJ6DAUclBoA99xL98GB6fK35wKrvfywsyTAOZUh920 jcbwMFPIvZSR9ER5nHnPCLL0NU3Y2En8iqlhgmlkYzEz5HWagUzr0+pImEG0jnKpcbCb 4M0Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UtfoF4rF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113238-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113238-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id a18-20020a05620a02f200b0078a4399adffsi4737811qko.181.2024.03.25.00.35.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 00:35:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113238-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UtfoF4rF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113238-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113238-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 20B6F1C2E8C0 for ; Mon, 25 Mar 2024 07:35:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0AFCA132818; Sun, 24 Mar 2024 22:40:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UtfoF4rF" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19EA81327F7; Sun, 24 Mar 2024 22:40:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320039; cv=none; b=uqbhF4UqT5tPdhoyT2jInwrkr/CG1G9fHNfqi4C2o4SwF2SeZoiFjkWg8uvg+33Dnq6r2aLBkvqyaQxW5Tx/Y230bhONC48wXOvrfNJLREgiH5XDeakh+zzptr8PcxGRtSRcZXKRGCZUKh5cL8FV5Oxhr2muPIJ+pmQNbRiRrRU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320039; c=relaxed/simple; bh=MPJsfCYG3IQN5G/QHQfx5aTxiuzR9zsnaOhfuWbMtVI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ThhH1HdLDxEdvmUC2dHvpKs9zOntY47ZeNotEL8Fg0DkQ1AmTKUnpEvn1hsgkTSPKmNJtLFXXb79xSMOnpbHring7UllijQIjYvz+HbaMcks8LAMi8GCGOfTmyB4KhmZ8fzRFbSKjPdMUli8ZddH589VDyOsQ7acPrv3NTkzJ2U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UtfoF4rF; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4238FC433A6; Sun, 24 Mar 2024 22:40:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320039; bh=MPJsfCYG3IQN5G/QHQfx5aTxiuzR9zsnaOhfuWbMtVI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UtfoF4rFgWMhsaC1bED+3EBLOYUl8QldKqPvBi7w/SBAwZGEniN2bKtgd7csW5SvS VYEaJjglqfUKFPnevaamF1z6A/WyrUu9N3M+GcGm2GXpt38tz0sZG3N12Ny6K01HYo GtmUjq2DuMKBNOliQKnFmHvbfxyl1tb/EjKLORF/qcGB4+O/lTLYumV9Uwd8kOMlKa 7kruMuoleVM13ZpC5Xv/swQ1oYHSRRfXbMB5BkaeRKuckHiliMJ+U0n6adkkbtRz2C 42e02Cdxib1e+N+R2kMmpP9+ghxOSbwVuy5YweQmWCGzABukE68QjvIbxY9SNDYxaL CLMzCVzHhFF0A== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Ming Lei , Patrick Plenefisch , Mike Snitzer , Sasha Levin Subject: [PATCH 6.8 347/715] dm raid: fix false positive for requeue needed during reshape Date: Sun, 24 Mar 2024 18:28:46 -0400 Message-ID: <20240324223455.1342824-348-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Ming Lei [ Upstream commit b25b8f4b8ecef0f48c05f0c3572daeabefe16526 ] An empty flush doesn't have a payload, so it should never be looked at when considering to possibly requeue a bio for the case when a reshape is in progress. Fixes: 9dbd1aa3a81c ("dm raid: add reshaping support to the target") Reported-by: Patrick Plenefisch Signed-off-by: Ming Lei Signed-off-by: Mike Snitzer Signed-off-by: Sasha Levin --- drivers/md/dm-raid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c index eb009d6bb03a1..13eb47b997f94 100644 --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c @@ -3329,14 +3329,14 @@ static int raid_map(struct dm_target *ti, struct bio *bio) struct mddev *mddev = &rs->md; /* - * If we're reshaping to add disk(s)), ti->len and + * If we're reshaping to add disk(s), ti->len and * mddev->array_sectors will differ during the process * (ti->len > mddev->array_sectors), so we have to requeue * bios with addresses > mddev->array_sectors here or * there will occur accesses past EOD of the component * data images thus erroring the raid set. */ - if (unlikely(bio_end_sector(bio) > mddev->array_sectors)) + if (unlikely(bio_has_data(bio) && bio_end_sector(bio) > mddev->array_sectors)) return DM_MAPIO_REQUEUE; md_handle_request(mddev, bio); -- 2.43.0