Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1533677pxb; Sat, 16 Oct 2021 12:25:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHlQupF9xkDIBR4YGyMf5Po6jPaKOxacHB3wbPOVJYaHLoXvkqyajclVevaCXFdRlcUrhM X-Received: by 2002:a17:90a:ba88:: with SMTP id t8mr36147461pjr.15.1634412350205; Sat, 16 Oct 2021 12:25:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634412350; cv=none; d=google.com; s=arc-20160816; b=qi9BYA52kytDW4mWl1Ltfb/Ib4dfAOcAD8gbYbhre2jJT0Izx/rGtGECHvNWY8dDwr 5Y07U1i8tbVx33NAbI4ToFihun5WxkM36ZQX3YMYP36AspSWcIzjgtMqBcBGxPkzNBNy G7cIGNLiBXbUIeLB5zMc1Kkg+ShiRUw0kbRFUmAXWPQuPq3YkPVp5L2pog+oU6Z5iAmg 7pTNymttY2EVRCXWlsU+Nw8zlkxyPnYW1bRTbvh0WdRv/GIccpycLZP+QyVxT8/QNlNM uFaTPBMVKGIfBM2NagKGeOS9WMFf0HdLFE82Ui5kpQIrG5xcm+78BMijO3HtvBfoBCMl QZwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Ph+oZ8UT4h1HTx6qQ3UwPOnmmXuejFlF+FpHdhVkhfw=; b=cSI3Q1PjMJD0QOaPZ11LVnHvgyo6dQydPrsnOvabZNw9T7y+g2pG9tFwrpgbWeOS6c DjbZmkwymIqSXnXQlUjrBLlOOiFpSg7w8qZ+Y62Uw7K93SBsqPbZaOsBDCbrMlIQ9QsV FCWl6XewXxHcCatySRUYZQ7nTimF0tS1oikx10t13gylm5P290MOz4WsiLvun3/xNtA8 MEEO5fRjzYk/ePfFlFolm9bl32eBWEKNJcFhXWiNlHEhlw19mjXYFxdxG49fYu+HkLAF LQMtUSdiRiVS9bHFPKCvEoF79iFsXNTFdonU+6JLeAdQag6BuSkETzTw6n9GcZot0X4r /I8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=iSbFTO7h; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lr11si1358536pjb.157.2021.10.16.12.25.36; Sat, 16 Oct 2021 12:25:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=iSbFTO7h; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241034AbhJOPvn (ORCPT + 99 others); Fri, 15 Oct 2021 11:51:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234829AbhJOPvn (ORCPT ); Fri, 15 Oct 2021 11:51:43 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFEBAC061570 for ; Fri, 15 Oct 2021 08:49:36 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id oa4so7485618pjb.2 for ; Fri, 15 Oct 2021 08:49:36 -0700 (PDT) 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=Ph+oZ8UT4h1HTx6qQ3UwPOnmmXuejFlF+FpHdhVkhfw=; b=iSbFTO7hl5wsHi/v9726DpD3kjwHBmUweM5nSVDlyWBslMc3wVKEMvQCq5pVO/6MpZ QpL/26LdJe7GrULqRDxfawSnvbruhiXNd7VKIbgGj0HAHUSD4T22YVTuGUCVLgeYQ9DD YRPQKjchN3EU8Gz5xfRwkBHxJQvIPm4lQcdPQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Ph+oZ8UT4h1HTx6qQ3UwPOnmmXuejFlF+FpHdhVkhfw=; b=3cjtD0aHJlc4UyHPLg8Zt1Sho2UAxDWFPJijx2ntEkX2wrDM/r6zFGIHFtAZ9G8gLC xIgmLpDeuR01m9WBZW4f75XHljVsWFTa+Q7lKt83mTnBPfd2ZismosdG+JBHkUOYO5N/ zmIGVt8T/lL2zEyr7yQ5FfvotOnb8JmiKCo1/bAKSEoy9sBaq/Qrl9A6YCHrC2ms5hoY X85/6YcP1IRfZNp9k+vWlC7I/GlDYTQEiBYjZjX2enpDWEmkXXuIkLOwEvFPCeoXjPYR 8blVKgDTwz7yPzH2TNdV3KKwZLy+BlvHTtU3zRIeDGtkupqz3jMttqcg/++4u8vQn6iE 0upA== X-Gm-Message-State: AOAM533wHuFdJ0e4116+QOXmiP9X9NbDc25e4KciaRdzBP+6qYjnryCl weLJ9gA5O7N7G9+gelbKPyi+nw== X-Received: by 2002:a17:903:234d:b0:13f:3180:626a with SMTP id c13-20020a170903234d00b0013f3180626amr11815749plh.49.1634312976314; Fri, 15 Oct 2021 08:49:36 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id v22sm5451930pff.93.2021.10.15.08.49.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Oct 2021 08:49:35 -0700 (PDT) Date: Fri, 15 Oct 2021 08:49:35 -0700 From: Kees Cook To: Anton Altaparmakov Cc: Christoph Hellwig , Jens Axboe , Coly Li , Mike Snitzer , Song Liu , David Sterba , Josef Bacik , Theodore Ts'o , OGAWA Hirofumi , Dave Kleikamp , Ryusuke Konishi , 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-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: <202110150848.375151B3@keescook> References: <20211015132643.1621913-1-hch@lst.de> <20211015132643.1621913-3-hch@lst.de> <7C4AC4BD-B62D-41B3-AAF7-46125D1A1146@tuxera.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7C4AC4BD-B62D-41B3-AAF7-46125D1A1146@tuxera.com> Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Fri, Oct 15, 2021 at 02:37:41PM +0000, Anton Altaparmakov wrote: > Hi Christoph, > > > On 15 Oct 2021, at 14:26, Christoph Hellwig wrote: > > > > Add a helpe to query the size of a block device in bytes. This > > will be used to remove open coded access to ->bd_inode. > > Matthew already pointed out the return type for bdev_nr_bytes() but also your commit message has a typo: "Add a helpe" -> "Add a helper". Right. With these fixed, I'm a fan. :) Reviewed-by: Kees Cook -Kees -- Kees Cook