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 9E9DAC433FE for ; Fri, 15 Oct 2021 15:49:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 84D1C61184 for ; Fri, 15 Oct 2021 15:49:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237202AbhJOPvo (ORCPT ); Fri, 15 Oct 2021 11:51:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240983AbhJOPvn (ORCPT ); Fri, 15 Oct 2021 11:51:43 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0791FC061768 for ; Fri, 15 Oct 2021 08:49:36 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id oa4so7485619pjb.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=Tb5vPOsaA+H1CQt3sdEJXD1c+ydjU2lAn12C9VEj78cGaDvSoT0jhmvC1ftN2OYbfa 82o7pVYkIbzkEbwPQMqQvSiTQYXc9Jj3uB2tL+TW6DC9z+TlMsjgvH/Xw169B0xXWAKf vwt9RdSc5K0fVJDllw9n/hdzi+0sDr0+qdN71rwITloRFH68PPE75RmEBsxT/rw9xzrj Zce90wGoYuBTTBL85oeg7Wi4rePqZurMe4hfdk1HFkZLVGe52HEvuKnmKmrOvE1ogFdc 0h5sNY6vjwS7J+KbV5Rqy//rcyzl+xq2jSG3S+KbQcVZ/fetXlrIA+WPlgUq6GKYmwxR v+jg== X-Gm-Message-State: AOAM531MkbavmOHfmt/I/T9LEEBZu4nJKNuO7WbC8g2q34ydzPaWwq72 L+6RAljfW2DBe6jjnPPnnUggKQ== X-Google-Smtp-Source: ABdhPJz6i9tGVLgkq0eULPGyuk5x/dLn8xi+sif8q9XJ9Fat4Z2U3sGqOIlP99kszRnqXPDgBVaPnw== 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-bcache@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