From patchwork Fri Sep 15 22:43:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 13387794 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A846CD37AA for ; Fri, 15 Sep 2023 22:43:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 32DDC8D0038; Fri, 15 Sep 2023 18:43:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2DE108D0037; Fri, 15 Sep 2023 18:43:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 17EBF8D0038; Fri, 15 Sep 2023 18:43:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id EC34E8D0005 for ; Fri, 15 Sep 2023 18:43:54 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id C974C120C84 for ; Fri, 15 Sep 2023 22:43:54 +0000 (UTC) X-FDA: 81240310788.02.BFF8AE1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf09.hostedemail.com (Postfix) with ESMTP id 078A9140003 for ; Fri, 15 Sep 2023 22:43:52 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=i0rFTNFI; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=kernel.org (policy=none); spf=none (imf09.hostedemail.com: domain of mcgrof@infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=mcgrof@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694817833; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=7Au7GQlleAmj5M8e5CX+OM2MfEjyMcPNx8bLn2lT0zk=; b=Z7efFbwkrrz5Om+MmuOG3CbU5I/Ous5D/NL/WZ03xmmVFFLgIVF/Pl93c7liSewE/Miea8 N7sA/R0NDBuI6lpM+x5Do5rh4X3xLhs2Y9y4aluKjBcWPOW9o/wXzYxUkYLjVs9cWNqTXx iOUv5NYh4RhK4ib8pDMMDoFGppNgx64= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=i0rFTNFI; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=kernel.org (policy=none); spf=none (imf09.hostedemail.com: domain of mcgrof@infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=mcgrof@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1694817833; a=rsa-sha256; cv=none; b=Z/dfXJCHuj3obWi5bYe+UuO8qde+DjD7ile9gvgvuxmX5zFG3lqaKGZ7p0NynQx7MB3ZaX M9wNS/3Ya9+UYf7h/S0OUc9pPWSlbOkmaSr/KcBDSbKMaap0Qag2OwxM9HISOK/qXwSUYa rWPJ2mE2iosD89tv2wuRD0qyMMFi+uA= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To: Content-ID:Content-Description:In-Reply-To:References; bh=7Au7GQlleAmj5M8e5CX+OM2MfEjyMcPNx8bLn2lT0zk=; b=i0rFTNFIrhpMybyhkJGOmDs4xP oBHzLbvVUXzpm9ZTd/EcCT2Iw9SuWQ79s/UnmZ4WPBsOAOwEYHTSyLdvf6kcvui4XpKnR82hw/5XY t67KZYZUm1S0b104aYYCMFlC5dSPvzaBnDgKSKHBb9OmFUFlBRRTFM1OnoT+BjuYEqFWJzEYaGIKF XiejQ/wmAcDv5FV8u7wNAlc1idUDBYvGEDs4c+Y8af5dUGeSRk0jMFCkWjGP+dXMaBm4U9gV+y0W9 UFnqi+X2sRQRqRrJxB6k88JcyoS1qMrCd/M4F8O96+1kXBnPhSWFunceDmRB7FW4H/UWEZi7sFiCF XhmBZLQA==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1qhHXM-00BUtK-2O; Fri, 15 Sep 2023 22:43:44 +0000 From: Luis Chamberlain To: 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 Cc: 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, willy@infradead.org, hare@suse.de, p.raghav@samsung.com, da.gomez@samsung.com, rohan.puri@samsung.com, rpuri.linux@gmail.com, kbusch@kernel.org, mcgrof@kernel.org Subject: [PATCH v3 0/4] block: simplify with PAGE_SECTORS_SHIFT Date: Fri, 15 Sep 2023 15:43:39 -0700 Message-Id: <20230915224343.2740317-1-mcgrof@kernel.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Rspamd-Queue-Id: 078A9140003 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 9oehnecycsfytjno83quedofynjotwgi X-HE-Tag: 1694817832-136530 X-HE-Meta: U2FsdGVkX184cZq+KuhJnBttV00UyJxG2emggUkWP0kkMn+PAJ8y8cmScBFbldxvHiSA4/XtnuwBZuqEB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WelqUQSfN/dwJikBwZdlAspyBAVDIncV0LoPgb2cbqaMH+9sC84vIZMS12P4Y88xkhtVeoHKklsYtevvUNu4U0DUkIuLfcrsmL6TfTCC1icfn4jdKxlr2NYVagT3qcUx20G/ze81tSUcMCvJJaHmWnxMo9/ih/AOHvg9lc3Yll4Bf1+00q50izk8TseI2Fz20bkKZ1exBtQsl8TDqrBl8pQCVkK24kL/NPrAbRnQTKgJiLDuiecvkcg4MeTYrhuxh64FanzAiawzNHxC65zxy/dUjtUOEKzxEUvx6cnaA3Wh7HqMjbOGw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000148, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Just spinning these low hanging fruit patches I forgot about. Changes on v3: o Add tags for Reviews/acks o rebase onto next-20230914 o Fixes as suggested by Johannes Thumshirn: - drop not-needed parens on dm bufio - use SECTOR_MASK instead of PAGE_SECTORS - 1 for the zram driver o Drop shmem patches as they are already merged / modified Changes on v2: o keep iomap math visibly simple o Add tags for Reviews/acks o rebase onto next-20230525 Luis Chamberlain (4): drbd: use PAGE_SECTORS_SHIFT and PAGE_SECTORS iomap: simplify iomap_init() with PAGE_SECTORS dm bufio: simplify by using PAGE_SECTORS_SHIFT zram: use generic PAGE_SECTORS and PAGE_SECTORS_SHIFT drivers/block/drbd/drbd_bitmap.c | 4 ++-- drivers/block/zram/zram_drv.c | 15 ++++++--------- drivers/block/zram/zram_drv.h | 2 -- drivers/md/dm-bufio.c | 4 ++-- fs/iomap/buffered-io.c | 2 +- 5 files changed, 11 insertions(+), 16 deletions(-)