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.3 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 0D0FEC2D0E4 for ; Fri, 20 Nov 2020 15:33:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BE7A8238E6 for ; Fri, 20 Nov 2020 15:33:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729828AbgKTPc7 (ORCPT ); Fri, 20 Nov 2020 10:32:59 -0500 Received: from verein.lst.de ([213.95.11.211]:43415 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728264AbgKTPc6 (ORCPT ); Fri, 20 Nov 2020 10:32:58 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id ED47B67373; Fri, 20 Nov 2020 16:32:53 +0100 (CET) Date: Fri, 20 Nov 2020 16:32:53 +0100 From: Christoph Hellwig To: Jan Kara Cc: Christoph Hellwig , Jens Axboe , Tejun Heo , Josef Bacik , Konrad Rzeszutek Wilk , Coly Li , Mike Snitzer , dm-devel@redhat.com, Richard Weinberger , Jan Kara , linux-block@vger.kernel.org, xen-devel@lists.xenproject.org, linux-bcache@vger.kernel.org, linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 14/20] block: remove the nr_sects field in struct hd_struct Message-ID: <20201120153253.GA18990@lst.de> References: <20201118084800.2339180-1-hch@lst.de> <20201118084800.2339180-15-hch@lst.de> <20201119120525.GW1981@quack2.suse.cz> <20201120090820.GD21715@lst.de> <20201120112121.GB15537@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201120112121.GB15537@quack2.suse.cz> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Fri, Nov 20, 2020 at 12:21:21PM +0100, Jan Kara wrote: > > > AFAICT bd_size_lock is pointless after these changes so we can just remove > > > it? > > > > I don't think it is, as reuqiring bd_mutex for size updates leads to > > rather awkward lock ordering problems. > > OK, let me ask differently: What is bd_size_lock protecting now? Ah, I see, > on 32-bit it is needed to prevent torn writes to i_size, right? Exactly. In theory we could skip it for 64-bit, but as updating the size isn't a fast path, and struct block_device isn't super size critical I'd rather keep the same code for 32 vs 64-bit builds.