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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 959B4C433EF for ; Fri, 15 Oct 2021 13:37:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7B31460EE5 for ; Fri, 15 Oct 2021 13:37:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239900AbhJONjU (ORCPT ); Fri, 15 Oct 2021 09:39:20 -0400 Received: from verein.lst.de ([213.95.11.211]:54603 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239512AbhJONjP (ORCPT ); Fri, 15 Oct 2021 09:39:15 -0400 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> 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) Precedence: bulk List-ID: X-Mailing-List: linux-bcache@vger.kernel.org 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.