From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 284432C80 for ; Fri, 15 Oct 2021 13:37:12 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 7D96568BEB; Fri, 15 Oct 2021 15:37:02 +0200 (CEST) Date: Fri, 15 Oct 2021 15:37:01 +0200 From: Christoph Hellwig To: Matthew Wilcox Cc: Christoph Hellwig , Jens Axboe , 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-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: [PATCH 02/30] block: add a bdev_nr_bytes helper Message-ID: <20211015133701.GA31240@lst.de> References: <20211015132643.1621913-1-hch@lst.de> <20211015132643.1621913-3-hch@lst.de> Precedence: bulk X-Mailing-List: ntfs3@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) On Fri, Oct 15, 2021 at 02:35:15PM +0100, Matthew Wilcox wrote: > On Fri, Oct 15, 2021 at 03:26:15PM +0200, Christoph Hellwig wrote: > > +static inline sector_t bdev_nr_bytes(struct block_device *bdev) > > +{ > > + return i_size_read(bdev->bd_inode); > > Uh. loff_t, surely? Yes, that wuld be the right type. Note that it makes a difference outside of documentation purposes.