Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp320334rwl; Thu, 6 Apr 2023 20:09:13 -0700 (PDT) X-Google-Smtp-Source: AKy350YKH62HBMsWRJZmnbmFkywEG2i4fcZkSQrw/bkHctN3UtElxWPAHDpY74eagj9EOiX9JDGZ X-Received: by 2002:a17:903:11d1:b0:1a3:c8bc:6a41 with SMTP id q17-20020a17090311d100b001a3c8bc6a41mr1596008plh.21.1680836952827; Thu, 06 Apr 2023 20:09:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680836952; cv=none; d=google.com; s=arc-20160816; b=mRXf9FwaLO6vOiMKKpgf/lqwz7jdrWAw3LwIKr1OI03qj8WClGKkb8GFwLdwTzp9r0 GQOGIt4mxK2gRuTEF7IFf2pb7IgSNtA7pa2tWv/7uej50oHNQM2fg2B8V9j+hjibG5eT hAM3mXhl7uw/Mjnh5BdKNGZVaQz9qKlw4Oh4Kb3vl7CcgZ+Zy7S351hdduuZBTgKiDHQ L2d6nMvH4feXSKY7pI6C88P/39KnNcbY+aZoa6VL0P7YiGaGHFF+jTiAred13At5knq/ CABBGSKiBeQ35rMSxDiht/B0DHsmexP6dTeeS8mXpBvLnJ4T1pNlRsB8mphU7J4M5J29 EGng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=X8X/ofNJxOyXBKtu6E6tFhvwKT4AgBrWgfgReTBYBmo=; b=SFimzGkJ7QJXhzNjYgfyP5/BB9hZisNLq7FcHGqszLa1maZ5IgAd9J1dDxREdGbSix qwFSi/76NCCvSmjlTHKeaDSBmxjyAFNZWWWPUhES93RCEpLfXCULtfXNgSb8Yuyz9Hz7 l5zUcsI5a5Z1FO2lRPDYv5S/KPBzIgVj2mkeEsUa2N7aNaOnrOXBV/e+hI3RVPIoSMp9 B7DZ/mEeZFIRh0X1BffJ6qFPAMEnbD0HhD69kpRVBQD4DWNxoZxfthp1DbMHZh3c0QzU lgNrpa+txjUUSFyZE7h8y8rO1hdR1Y+CVU1nPIpgfDSeo/GXqK6GT3dni4P9I2s6tM2F bgjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b="rho/IPf5"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j16-20020a170902da9000b0019e69892709si3169293plx.596.2023.04.06.20.07.51; Thu, 06 Apr 2023 20:09:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b="rho/IPf5"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239478AbjDGCmo (ORCPT + 99 others); Thu, 6 Apr 2023 22:42:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237624AbjDGCmn (ORCPT ); Thu, 6 Apr 2023 22:42:43 -0400 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 478C583D1 for ; Thu, 6 Apr 2023 19:42:41 -0700 (PDT) Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-503e7129077so452675a12.1 for ; Thu, 06 Apr 2023 19:42:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.com; s=20210112; t=1680835361; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=X8X/ofNJxOyXBKtu6E6tFhvwKT4AgBrWgfgReTBYBmo=; b=rho/IPf5hqzPDcmZdhV1K7zLDdw33k6FbSbSB5xn0zILh6XsXvisZTDlSj2FlKPjBh 4OzQKMAF6WBjsbimCTiXST58KxhQXaTd2OS4JdDEdas4MvZVPxm6J7xZIfYrjA9WK6TK Ct4XvZBpJHudMPE+XP9bZkPHjJ1gebV8Ia/Swb+cgFopMjGaEbKbDm8mTcBRvBYaDhhd HKWUzIl7eeUfa+wGP5h+q4/3pR2qQ1aeQKEoBAF/AEkqlFrbZiXquqJK5vberByqwNKV dJeeLQNyxhaTMSAithk/l/OyiPpVIL2tgSNm73AgqBCN31Z4RQdBT+Tusv84cQX4ZiAu 4lqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680835361; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=X8X/ofNJxOyXBKtu6E6tFhvwKT4AgBrWgfgReTBYBmo=; b=vgXSDBqwPW8nJFjiiB3PnivC09QQGAlDS3DOsPsUhI/JVDb1CTGQH7/+ktPjcLaHi5 aFwJGTjeioki/IW13kSKuAB5uTzqFFExpPhZ16cJb94tQ2Fx4nkIXgukw12Ndx+fIAIa CAsQtPwrDPFaEPgMH0HpphjyqGHkusM50ybjrZAS6DZpEzsT7l9tuY2NUC4cPBjqd/Qq Rvt7LmMxbosnob9WFt4gjkdAIBoiZhxfcG+/PMa1ZwGUmV6j7CDQSi5FIpePJp0Ac5HD lT/3E4K20M3dPEc6+17PJTl+wSDTPLgHQYax5sHP9dWlkJtjwQu0j836CmAlp4014SwT NW6g== X-Gm-Message-State: AAQBX9cvwCwwiTX/Gqq6syQJPDlKJlDzwC4iC5GvvoS3SytoraMdfjMC 8HLGmQ5l8hJ9InmSeXGw9ckIEw== X-Received: by 2002:aa7:8194:0:b0:627:e180:ac04 with SMTP id g20-20020aa78194000000b00627e180ac04mr1222717pfi.0.1680835360677; Thu, 06 Apr 2023 19:42:40 -0700 (PDT) Received: from [192.168.1.136] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id e20-20020aa78c54000000b0062607d604b2sm1986897pfd.53.2023.04.06.19.42.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Apr 2023 19:42:40 -0700 (PDT) Message-ID: <32e9b9e0-0748-4e03-624d-a31c1df6b045@kernel.dk> Date: Thu, 6 Apr 2023 20:42:38 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH] block: don't set GD_NEED_PART_SCAN if scan partition failed Content-Language: en-US To: Ming Lei Cc: Yu Kuai , jack@suse.cz, hch@infradead.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, yi.zhang@huawei.com, yangerkun@huawei.com, "yukuai (C)" References: <20230322035926.1791317-1-yukuai1@huaweicloud.com> <42cfedca-f233-4d7e-f43b-4b5dd0c97e9e@huaweicloud.com> From: Jens Axboe In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/6/23 8:01 PM, Ming Lei wrote: > On Thu, Apr 06, 2023 at 04:29:43PM -0600, Jens Axboe wrote: >> On 4/5/23 9:42 PM, Yu Kuai wrote: >>> Hi, Jens! >>> >>> 在 2023/03/22 11:59, Yu Kuai 写道: >>>> From: Yu Kuai >>>> >>>> Currently if disk_scan_partitions() failed, GD_NEED_PART_SCAN will still >>>> set, and partition scan will be proceed again when blkdev_get_by_dev() >>>> is called. However, this will cause a problem that re-assemble partitioned >>>> raid device will creat partition for underlying disk. >>>> >>>> Test procedure: >>>> >>>> mdadm -CR /dev/md0 -l 1 -n 2 /dev/sda /dev/sdb -e 1.0 >>>> sgdisk -n 0:0:+100MiB /dev/md0 >>>> blockdev --rereadpt /dev/sda >>>> blockdev --rereadpt /dev/sdb >>>> mdadm -S /dev/md0 >>>> mdadm -A /dev/md0 /dev/sda /dev/sdb >>>> >>>> Test result: underlying disk partition and raid partition can be >>>> observed at the same time >>>> >>>> Note that this can still happen in come corner cases that >>>> GD_NEED_PART_SCAN can be set for underlying disk while re-assemble raid >>>> device. >>>> >>> >>> Can you apply this patch? >> >> None of them apply to my for-6.4/block branch... > > This patch is bug fix, and probably should aim at 6.3. Yeah I see now, but it's a bit of a mashup of 2 patches, and then a separate one. I've applied the single fixup for 6.3. -- Jens Axboe