From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mail19.linbit.com (LINBIT Mail Daemon) with ESMTP id AE225420FD9 for ; Wed, 13 Oct 2021 08:12:54 +0200 (CEST) Received: by mail-pf1-f178.google.com with SMTP id w6so1496229pfd.11 for ; Tue, 12 Oct 2021 23:12:54 -0700 (PDT) Date: Tue, 12 Oct 2021 23:12:52 -0700 From: Kees Cook To: Christoph Hellwig Message-ID: <202110122311.B43459E21@keescook> References: <20211013051042.1065752-1-hch@lst.de> <20211013051042.1065752-5-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211013051042.1065752-5-hch@lst.de> Cc: Dave Kleikamp , jfs-discussion@lists.sourceforge.net, Mike Snitzer , linux-nvme@lists.infradead.org, Konstantin Komarov , Song Liu , dm-devel@redhat.com, target-devel@vger.kernel.org, linux-mtd@lists.infradead.org, reiserfs-devel@vger.kernel.org, drbd-dev@lists.linbit.com, linux-nilfs@vger.kernel.org, linux-scsi@vger.kernel.org, OGAWA Hirofumi , linux-ext4@vger.kernel.org, Josef Bacik , Coly Li , linux-raid@vger.kernel.org, linux-bcache@vger.kernel.org, David Sterba , Ryusuke Konishi , Anton Altaparmakov , Jens Axboe , linux-block@vger.kernel.org, linux-nfs@vger.kernel.org, Theodore Ts'o , linux-ntfs-dev@lists.sourceforge.net, Jan Kara , linux-fsdevel@vger.kernel.org, Phillip Lougher , ntfs3@lists.linux.dev, linux-btrfs@vger.kernel.org Subject: Re: [Drbd-dev] [PATCH 04/29] md: use bdev_nr_sectors instead of open coding it List-Id: "*Coordination* of development, patches, contributions -- *Questions* \(even to developers\) go to drbd-user, please." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, Oct 13, 2021 at 07:10:17AM +0200, Christoph Hellwig wrote: > Use the proper helper to read the block device size. > > Signed-off-by: Christoph Hellwig I think it might make sense, as you suggest earlier, to add a "bytes" helper. This is the first user in the series needing: bdev_nr_sectors(...bdev) << SECTOR_SHIFT Reviewed-by: Kees Cook -- Kees Cook