From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kees Cook Subject: Re: [PATCH 04/29] md: use bdev_nr_sectors instead of open coding it Date: Tue, 12 Oct 2021 23:12:52 -0700 Message-ID: <202110122311.B43459E21@keescook> References: <20211013051042.1065752-1-hch@lst.de> <20211013051042.1065752-5-hch@lst.de> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=1H1JJFKjz05y5oj0p755Wd9Nps08CHOHEplJ5Y1g+2w=; b=FnlM9CdvccmU4HmqmwsZQ6mwcBwOhpuSMmvAcPJz12hGrzMLx0wE72HESKXT/FSdf4 7+542Lua7V4TbazDGNap5DO9Pfw7c/uG+qyBy3qJkapOn+6ER85tMNMzt8DzCatnHQL8 8qEBnbzhJGY53T8EWVA6JlX/GqGluU0pFlO7o= Content-Disposition: inline In-Reply-To: <20211013051042.1065752-5-hch@lst.de> List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Christoph Hellwig Cc: 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 , 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 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