Received: by 2002:a05:6358:795:b0:dc:4c66:fc3e with SMTP id n21csp1514143rwj; Sun, 30 Oct 2022 01:55:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM66czWwMx5By1WggjZaP50YxHZZv8/jWQ8DQmIB2NalHObc9mYLUyxRFV+6AEhrN4FFuvX/ X-Received: by 2002:a63:d211:0:b0:46f:6229:c380 with SMTP id a17-20020a63d211000000b0046f6229c380mr7285846pgg.621.1667120107213; Sun, 30 Oct 2022 01:55:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667120107; cv=none; d=google.com; s=arc-20160816; b=kahShjsQwGPW/VdcvmAXTHTPcnEmMKhYaIAecgKNdGksqpCaHWF06u+nQGtsDP/l8I XBAylzqraiNMr+LdMm/YwprxyI5qxNm27PWxMnLpGMHUMaT9zlCuqIkgt4zPTTL0b9/3 K+dgN0A/zOUZcrFZ/KYwVhH3zTPP/Mn6msXdFBs7DH6GGtJY9ubaw/scv7639DiEyEmg qvrxnIJhyVFjl6mbfW7pyONVrnEvPRIfJZDEmNHW8ZwZXSEvbwnIy165qSvV2VgNti6d ztxmXCypg1ice8NkPZsD3jpOAFUQiBCYd5USIfysZ7JCJfgHGMNi+/x6C9dNtTlE61Z6 Q3ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=fNU25SGpinKDAL4XiccmbzYyUS+DvowzHBNnml9Vu1E=; b=nQ1u/9rf+MfoKkLAiwNg2f6D3CNvIs4OvrN4cfd2bMngSLIsD4eLHTyK4KA8VPHMcv i+ExSVZpDy4c7mGlQlIgAKYPSpaf5He5x9fBuoCsikQWO1BDAdbUde+Aaf1pzKN6GcaU O1rHszds+sVlG/ydIvlVED3vACS/9TDl23dWIFRAUJbRmaOB9AhO8fVzy65lJc4vX3DF UIXUhYlNmgHGpDEcfq6tj5YUifrVmzGKWCHWsHMbzgqEH5nVxJjzwSBJsM4SfIyxqDDT OzZQ2SXTHihJ/WTRwCehhLkqXORsgbO0O3+jGsVb1TPBnLsCiO7mA/T8jf/RBDwTE2Fb hRCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e10-20020a170902cf4a00b00179f1584540si4467013plg.564.2022.10.30.01.54.44; Sun, 30 Oct 2022 01:55:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229763AbiJ3I15 (ORCPT + 99 others); Sun, 30 Oct 2022 04:27:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbiJ3I1y (ORCPT ); Sun, 30 Oct 2022 04:27:54 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 619B5120; Sun, 30 Oct 2022 01:27:53 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 0EBC868AA6; Sun, 30 Oct 2022 09:27:50 +0100 (CET) Date: Sun, 30 Oct 2022 09:27:49 +0100 From: Christoph Hellwig To: Keith Busch Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, hch@lst.de, djwong@kernel.org, bvanassche@acm.org, Keith Busch Subject: Re: [PATCH] iomap: directly use logical block size Message-ID: <20221030082749.GA4949@lst.de> References: <20221026165133.2563946-1-kbusch@meta.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221026165133.2563946-1-kbusch@meta.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 26, 2022 at 09:51:33AM -0700, Keith Busch wrote: > From: Keith Busch > > Don't transform the logical block size to a bit shift only to shift it > back to the original block size. Just use the size. This looks reasonable. But given that the blksz variable is only used once, why not open code the bdev_logical_block_size in the conditional?