From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19427C433E0 for ; Fri, 5 Feb 2021 07:15:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DAE1964FBE for ; Fri, 5 Feb 2021 07:15:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231466AbhBEHPV (ORCPT ); Fri, 5 Feb 2021 02:15:21 -0500 Received: from verein.lst.de ([213.95.11.211]:59197 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231220AbhBEHPP (ORCPT ); Fri, 5 Feb 2021 02:15:15 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id 282CA68B05; Fri, 5 Feb 2021 08:14:30 +0100 (CET) Date: Fri, 5 Feb 2021 08:14:29 +0100 From: Christoph Hellwig To: Ming Lei Cc: Jens Axboe , Christoph Hellwig , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, "Ewan D . Milne" Subject: Re: [PATCH 2/2] block: avoid to drop & re-add partitions if partitions aren't changed Message-ID: <20210205071429.GA28033@lst.de> References: <20210205021708.1498711-1-ming.lei@redhat.com> <20210205021708.1498711-3-ming.lei@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210205021708.1498711-3-ming.lei@redhat.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 05, 2021 at 10:17:08AM +0800, Ming Lei wrote: > block ioctl(BLKRRPART) always drops current partitions and adds > partitions again, even though there isn't any change in partitions table. > > ioctl(BLKRRPART) may be called by systemd-udevd and some disk utilities > frequently. Err, why? We should probably fix udev to not do stupid things first.