Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4182028pxb; Wed, 13 Oct 2021 23:29:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMIsDtk2b0ZOkI7k3h/n05tSTWI9lEvqVLAY4RLmVmHB0bY+Ll2MyyRE16OBrwJ8x+lOlW X-Received: by 2002:a63:770e:: with SMTP id s14mr2864936pgc.275.1634192956621; Wed, 13 Oct 2021 23:29:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634192956; cv=none; d=google.com; s=arc-20160816; b=cA6Dnm0rC0+iYMJG0axLGwMaUg22kdMx5Ss+i15IjJbap5I+9qeS9dyGAXf1ZPgGe0 vAu73zvSd+3CW8PAq7pQKxW0ZX0Pfpg0op5L4QZLBfPMsJTApY/KPw1LB6eAg+IKzXYU iQRnwROtGEIq4oC5CicdcV3Rk/DeeguBWsMAKlRvFiTDjqjtO/Hb2OAAPk350PsmEUVa XfXV00gUgv7HTMs0EHG5WfoOsO/BW2PratDx+2fLN5pFsPod3gVuTTsl7cHo0FIzevj8 c7jX4UcAnMbtytYbMe09x0/L6C/MOF6EYVDv/587wvxr1Wo5/Pyi16qGf3bsJ4lb+NzB vv+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=p00kZzsB2wbYSNebcxRpfdoWEJZwTR2iqIiLPvef07w=; b=sMxS3vrxqhdYplx1GLXs6cxzx31k5VHwshl2EqmB/rvUlhHro569kgxO3EqHHJUlyj zvODrEa97qAeH1AjdQcJBWtX+nRhcRNtCKPRm2ghJ7WskH0d3xbo+03kcKcdV3xwDWnV Ia0Cwo9wcl7BlhKWxMRPTurBoAJOpkMFeFnVo6tf7Du30APc87shjIwsw3XJziVU2IYF IpPJvO/sfrWuxZmC84E8tALdJQ/2jp0KEh7ioZAVgI7TAml1OMeTXll0Bj6sMi0grhJN sB9w9VZY1Nrsgewt8rfAUVCtWTHqhtRTizeO0pC33fQgLlCYcSsFfLX/NVt2busvRoOV dLag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t2si2595722pfj.196.2021.10.13.23.28.53; Wed, 13 Oct 2021 23:29:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229834AbhJNGay (ORCPT + 99 others); Thu, 14 Oct 2021 02:30:54 -0400 Received: from verein.lst.de ([213.95.11.211]:48781 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229530AbhJNGay (ORCPT ); Thu, 14 Oct 2021 02:30:54 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 5DA6768B05; Thu, 14 Oct 2021 08:28:44 +0200 (CEST) Date: Thu, 14 Oct 2021 08:28:44 +0200 From: Christoph Hellwig To: Jens Axboe Cc: Coly Li , Mike Snitzer , Song Liu , David Sterba , Josef Bacik , Theodore Ts'o , OGAWA Hirofumi , Dave Kleikamp , Ryusuke Konishi , Anton Altaparmakov , Konstantin Komarov , Kees Cook , Phillip Lougher , Jan Kara , linux-block@vger.kernel.org, dm-devel@redhat.com, drbd-dev@lists.linbit.com, linux-bcache@vger.kernel.org, linux-raid@vger.kernel.org, linux-mtd@lists.infradead.org, linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, jfs-discussion@lists.sourceforge.net, linux-nfs@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, ntfs3@lists.linux.dev, reiserfs-devel@vger.kernel.org Subject: Re: don't use ->bd_inode to access the block device size Message-ID: <20211014062844.GA25448@lst.de> References: <20211013051042.1065752-1-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211013051042.1065752-1-hch@lst.de> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Oct 13, 2021 at 07:10:13AM +0200, Christoph Hellwig wrote: > I wondered about adding a helper for looking at the size in byte units > to avoid the SECTOR_SHIFT shifts in various places. But given that > I could not come up with a good name and block devices fundamentally > work in sector size granularity I decided against that. So it seems like the biggest review feedback is that we should have such a helper. I think the bdev_size name is the worst as size does not imply a particular unit. bdev_nr_bytes is a little better but I'm not too happy. Any other suggestions or strong opinions?