Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp280988rwl; Thu, 6 Apr 2023 19:12:09 -0700 (PDT) X-Google-Smtp-Source: AKy350ZA82L4ZoHYyQ82IOIxRvPEZow9tqJg37hkDGqOC9P92V7jS/T7YzlLlSKawZe9CH9LwFiY X-Received: by 2002:a17:902:e892:b0:1a5:16fb:628b with SMTP id w18-20020a170902e89200b001a516fb628bmr54719plg.24.1680833529473; Thu, 06 Apr 2023 19:12:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680833529; cv=none; d=google.com; s=arc-20160816; b=n9Xb+Sc4ffiAl6Twqryey7fxZ7ppcZ8xYsEorGQw0DN6KucHunFJlSIM6RimEjd4mW MSqfxNw1GPxUDUHo3Qa8lIPe2Tgu7AgLoH26lDll5ZjashXcXFVULY3r09Q8Z1iFH5nC qn6NNNT31Ou1KA5arlJS0u0f4yhJM3pvhwO7A2OM5h0BIO3fkVBf0qBUZT8ulmeZYz+X IA3dQqbKgIvuPbSzG2jJGRlhgQbSKWnvykT5GDOpPUT8D5CDzXmdzfhDFCEPh9TULmHd JENVnwXMYexCRPsHy4za734rxRy5AIrB9f9lkUAIALG6TmVYaTbiIAYk7o4xUk2PDwel Exww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Q9mDbmCDWIZufpdSQOQtCy1IYkjHuQ55FDYgdUqKYCs=; b=CWa2QCB3/hp2LPo1gsrW79QeoQ6kIvi6n0ftQ6laE9dYrMft7KtZRUP5yNWjid33e1 2iVhthxIvQBkRd34U97fzwnK2izUKNkYCh3bwVQc835MbFSM/aMnvtwDGsKTnTOZ6Go+ yQ2P7ig++JzT0JnqFXA1mQBWYh90ZLL7DBvsuoG8mMHK9dIdLXIbp133k6Sq4fdMFRfo SkRrEl2qQlvbxScpPE4PPH7ffXtLpyZjsuoXuTppGDNkY6El6o9HclV5Y8J/Y2gmzb5x 0o8XqW9vrugs87xUs9F7fTHQQGs75o6RxRqsrccGT2CTbmqxWniQAuKON/ECUiamCQnH VrNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZbZSzu4M; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s17-20020a170902c65100b001a1c5d7f9a5si2802747pls.14.2023.04.06.19.11.57; Thu, 06 Apr 2023 19:12:09 -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=@redhat.com header.s=mimecast20190719 header.b=ZbZSzu4M; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240510AbjDGCLh (ORCPT + 99 others); Thu, 6 Apr 2023 22:11:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239785AbjDGCLR (ORCPT ); Thu, 6 Apr 2023 22:11:17 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9506BDC9 for ; Thu, 6 Apr 2023 19:09:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680833310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Q9mDbmCDWIZufpdSQOQtCy1IYkjHuQ55FDYgdUqKYCs=; b=ZbZSzu4M7ut8LMmFc1nht6a5VOkS/ZojNFvWgH7LOKgYFK8ENpVILvlQMul0dBjkc/6Byi 9FB1ytd+eziW+X7M+eSgIBc6dhtYodzmJyPHLy/pzHTMOMISvs2pYn8XUpiVIlKZLQhUqN APdoF2cjoH1Q/EurRO8VD9Su7Eq0f28= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-195-MnPaK8BFPJW-M_AVEpvykg-1; Thu, 06 Apr 2023 22:02:09 -0400 X-MC-Unique: MnPaK8BFPJW-M_AVEpvykg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DD8973C20EEC; Fri, 7 Apr 2023 02:02:08 +0000 (UTC) Received: from ovpn-8-24.pek2.redhat.com (ovpn-8-24.pek2.redhat.com [10.72.8.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BF41640C6EC4; Fri, 7 Apr 2023 02:02:01 +0000 (UTC) Date: Fri, 7 Apr 2023 10:01:55 +0800 From: Ming Lei To: Jens Axboe 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)" , ming.lei@redhat.com Subject: Re: [PATCH] block: don't set GD_NEED_PART_SCAN if scan partition failed Message-ID: References: <20230322035926.1791317-1-yukuai1@huaweicloud.com> <42cfedca-f233-4d7e-f43b-4b5dd0c97e9e@huaweicloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 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. Thanks, Ming