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 671BAC77B76 for ; Fri, 21 Apr 2023 20:14:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232607AbjDUUOO (ORCPT ); Fri, 21 Apr 2023 16:14:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229698AbjDUUON (ORCPT ); Fri, 21 Apr 2023 16:14:13 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 022092717; Fri, 21 Apr 2023 13:14:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=A2XozTJws4toh13zEJ4n565nKKguH3N7JeE3lhWnoDE=; b=KazI3OChQ8xi0cwyBWWi2wSA+d Dv6s5by1QWGWvpAlTZWGesKNdytZlLSAOalemBEZO5rELZUMfVeAY1yZ3qclyF0geINsWblz8o9JL KrCp/O0cKi2DLEYQQN08eZ21fTIZ0L+F8tqLSxzO0hmvR/ttXJr3rOL0pEgRfoaFXGQvs5IVHOHZZ zxTc3G+5goFSv5y1kllt2rSeIkt+cwOtNK+S+HhWtGPacqN3frlkpTebwCYWwbszRhF/mRefjwcIe CuzZGi/qjzq6oLG6SAyyoiOIgXbRDVTOGZtPQOQ5R3M4zoPS5TI38FfuJsg7RWNB05tynED3yvDp7 IUu5SVig==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1ppx8q-00FZlw-Dy; Fri, 21 Apr 2023 20:14:00 +0000 Date: Fri, 21 Apr 2023 21:14:00 +0100 From: Matthew Wilcox To: Luis Chamberlain Cc: axboe@kernel.dk, agk@redhat.com, snitzer@kernel.org, philipp.reisner@linbit.com, lars.ellenberg@linbit.com, christoph.boehmwalder@linbit.com, hch@infradead.org, djwong@kernel.org, minchan@kernel.org, senozhatsky@chromium.org, patches@lists.linux.dev, linux-block@vger.kernel.org, linux-mm@kvack.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, dm-devel@redhat.com, drbd-dev@lists.linbit.com, linux-kernel@vger.kernel.org, hare@suse.de, p.raghav@samsung.com, da.gomez@samsung.com, kbusch@kernel.org Subject: Re: [PATCH 3/5] iomap: simplify iomap_init() with PAGE_SECTORS Message-ID: References: <20230421195807.2804512-1-mcgrof@kernel.org> <20230421195807.2804512-4-mcgrof@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230421195807.2804512-4-mcgrof@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Fri, Apr 21, 2023 at 12:58:05PM -0700, Luis Chamberlain wrote: > Just use the PAGE_SECTORS generic define. This produces no functional > changes. While at it use left shift to simplify this even further. How is FOO << 2 simpler than FOO * 4? > - return bioset_init(&iomap_ioend_bioset, 4 * (PAGE_SIZE / SECTOR_SIZE), > + return bioset_init(&iomap_ioend_bioset, PAGE_SECTORS << 2,