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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A721EC38A02 for ; Sun, 30 Oct 2022 08:27:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229770AbiJ3I15 (ORCPT ); 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) 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?