Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2723191pxj; Mon, 31 May 2021 09:07:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7m/Ec2oFlv0kqDLH2Ncj7lSnapwrlLNYZ5jXCpv/2SeRxx7JZ8m5EuoqR6vdAobH/stp9 X-Received: by 2002:a05:6e02:1147:: with SMTP id o7mr17830876ill.20.1622477258205; Mon, 31 May 2021 09:07:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622477258; cv=none; d=google.com; s=arc-20160816; b=uej3KGkN73Nex0Xr/q7U7euZWrhLhgVv9EkWwR7ts//nXBWF67WuSWvB0HR0F37BjF k+TMDqU7+cR1CphC1e3Sm37o2ThWoX2mNThGrEl6d8Nom6gBNVOJ+zkCzqvoHnO1g6He LIrl3VEnL7brsrWAxCMyqWWY8xV2ScX3KRJILZ/Oqq0O3/8vCZHR2B0Jaidf+rwPy4XK YhTd9Fbe0BB1w6hxU6xG+Sk46PYwMmvH3PUboK7kAtp5eXbZeH/3BQrBpmfesC+whvJ/ ohsco7zbkNgUsg4iBNaynLaxQHXSAmALe3+D32GXvLImhk0AUnKWs6FY6++Nx0Wm/Ata GKZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zPfVrZ5JyRHz5NJamAs4gGI6JkbheuhujaxGNIVuETA=; b=i/n5IAhp/XBWwXDs/5Wk3yI3uyjsws3fDqnhg6L/fOJCKKJ/T8kLaEzfOaPPj0rq89 fRJGbklwwt5t1AaGk8HmAz5hknxDQ4q+L5OMk3//6uINTa6CgxqZUb+0regNlUdDTqqV lBknbQ2JR79li+EEf0LnGFqb8zOcMKh56pCuMfR4no+43RQhOLPYoNSEi031kLKR5VnN NoXTYazKaT/aOdi6KtTWXUzjPCLipi4cgcLGxA8KNw+m7EmhZcfnQzO67nLCvPXA1E+K QTmtQLxJJZbN+tcPeIQ4/xz+JuyiyQzEWSANwIPW+14Uw+aaZZ/r1bnYYCm4/ZixiDdu hDLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1UPTP5t8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m1si14034794ilu.13.2021.05.31.09.07.23; Mon, 31 May 2021 09:07:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1UPTP5t8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232657AbhEaQHI (ORCPT + 99 others); Mon, 31 May 2021 12:07:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:33164 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233401AbhEaOfg (ORCPT ); Mon, 31 May 2021 10:35:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9AEBC61C43; Mon, 31 May 2021 13:50:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622469060; bh=nyc10DwBaetmEFQ6b1FKSSzvX7sk3sts3UMZXY6bnJs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1UPTP5t87/+3iXiwrRumUtDVCZL9QCIriTYW7s0To2R+FibAvqZ8ZL71TK2jqMcNR ycDYvPyT76fugXX8QtD3uWHxQR4Q6uiNVWRZiyuccCiZMJm6v2dwdogb2RBQ4VE6eS NstLOT61v5jiCvZmxLonBih7YFwvk7yEBNAHHNmY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Florian Dazinger , Guoqing Jiang , Christoph Hellwig , Song Liu Subject: [PATCH 5.12 053/296] md/raid5: remove an incorrect assert in in_chunk_boundary Date: Mon, 31 May 2021 15:11:48 +0200 Message-Id: <20210531130705.606176292@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130703.762129381@linuxfoundation.org> References: <20210531130703.762129381@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christoph Hellwig commit cc146267914950b12c2bdee68c1e9e5453c81cde upstream. Now that the original bdev is stored in the bio this assert is incorrect and will trigger for any partitioned raid5 device. Reported-by: Florian Dazinger Tested-by: Florian Dazinger Cc: stable@vger.kernel.org # 5.12 Fixes: 309dca309fc3 ("block: store a block_device pointer in struct bio"), Reviewed-by: Guoqing Jiang Signed-off-by: Christoph Hellwig Signed-off-by: Song Liu Signed-off-by: Greg Kroah-Hartman --- drivers/md/raid5.c | 2 -- 1 file changed, 2 deletions(-) --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -5310,8 +5310,6 @@ static int in_chunk_boundary(struct mdde unsigned int chunk_sectors; unsigned int bio_sectors = bio_sectors(bio); - WARN_ON_ONCE(bio->bi_bdev->bd_partno); - chunk_sectors = min(conf->chunk_sectors, conf->prev_chunk_sectors); return chunk_sectors >= ((sector & (chunk_sectors - 1)) + bio_sectors);