From patchwork Fri Apr 21 19:58:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 13220632 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 1622DC77B76 for ; Fri, 21 Apr 2023 19:58:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A46596B0071; Fri, 21 Apr 2023 15:58:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9CEFB6B0074; Fri, 21 Apr 2023 15:58:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 84A7E6B0078; Fri, 21 Apr 2023 15:58:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 6E4996B0071 for ; Fri, 21 Apr 2023 15:58:21 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 4939316068F for ; Fri, 21 Apr 2023 19:58:21 +0000 (UTC) X-FDA: 80706460002.28.DFFFA40 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf28.hostedemail.com (Postfix) with ESMTP id 51814C0005 for ; Fri, 21 Apr 2023 19:58:18 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=v2Yysw6q; spf=none (imf28.hostedemail.com: domain of mcgrof@infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=mcgrof@infradead.org; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=kernel.org (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1682107098; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=u68XQLIrnZKRacEesRmgMeebDfY2xepEp8VfzdXWDIU=; b=3xBnjOWr1k/DwV1Z6P/0i+tTNPWFHv9HDC4m5GCGY86cfd+Ksry5AgOCnbS3pWri5K4iO9 j0auqQmaDJ85MyoDN4HFNCX2xn+3O0nZjEj/9S8S14f5wSg8RVsu+TZWC8FTxsttMg1yTb JzJhJR+1t4XIw7rNT2FdUYoHmfUApI8= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=v2Yysw6q; spf=none (imf28.hostedemail.com: domain of mcgrof@infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=mcgrof@infradead.org; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=kernel.org (policy=none) ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1682107098; a=rsa-sha256; cv=none; b=gN50XWieb1gApt0hzNtuQOIncE2O8K88Q0xg6KvOpBoaMUyqNghZoKEs+zP4zZ1ZFbLJ9W MhYuhWZTe1i+m950PwZwQPZBl+AuK9X+nZCNtWRxD0oo8HkHClYP1xBeq7GHVWI8yJPDaZ ybcD4xnWfchj+9lc9/PRhNhB0XijOa0= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=u68XQLIrnZKRacEesRmgMeebDfY2xepEp8VfzdXWDIU=; b=v2Yysw6qnZCKZGHYViYMSlL9PX OuzBIdMXAZi9a0Aylm9+m6X0SUR9QfSRQWt6BR+i2NRETsZ6Q+SXuK9lQy5WU4zsg8hL/d+3/HxHP 7u16cxddAAH0Levxw7QkEhPJYgLzQoxh9mTY0sW8D3nWNOMD2kKhBNI1vNdffgVDXr/2T8c82Y5qU E9eADBnb7SD7yl0vil3K123jE0aHFhVSxq7uYbW8KiUJfJMdOCsVvAmqdVYeer9l8ep8otFOWRNnY KtLnYHU/vkUk7ZqjMNP+nGPPo4GBK2IqyC7H5LPrFjy8QpCc92ciVZUd47CkvDBUuKvVuqlD5AieX QRQ0Q9rQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1ppwtU-00BlaV-1S; Fri, 21 Apr 2023 19:58:08 +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, kbusch@kernel.org, mcgrof@kernel.org Subject: [PATCH 0/5] block: simplify with PAGE_SECTORS_SHIFT Date: Fri, 21 Apr 2023 12:58:02 -0700 Message-Id: <20230421195807.2804512-1-mcgrof@kernel.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 51814C0005 X-Stat-Signature: 5f3rqwkw1m84a61wcxw9jpaz5epc8haw X-HE-Tag: 1682107098-642134 X-HE-Meta: U2FsdGVkX18lQn3A36642T5HFld+ZCrb7zdd4FR90gc9wiIwefce8t+Jyx8r4uEqE6bIUC3tC75hKHK/W7NPz7Iif6KGYeEfwCnKQmGKOHgIZLrpMTFSWF+5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/EY5Th/jy+Elud+ATis+nSxzsTtPMpl+k4umoOAYbtxKvk3zTco5QJCxq1/yF7i7ShBkFfG4VUbFqMNQsfYTn4CRqYqOe7QlZYVkehyrlWQQK3ERpz04evIau7paD6u86vD76qTHNVkzopHIEn/3aZE5zJFk9yk6/PhjqohKGHvs3qiouh9q X-Bogosity: Ham, tests=bogofilter, spamicity=0.014848, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: A bit of block drivers have their own incantations with PAGE_SHIFT - SECTOR_SHIFT. Just simplfy and use PAGE_SECTORS_SHIFT all over. Based on linux-next next-20230421. Luis Chamberlain (5): dm integrity: simplify by using PAGE_SECTORS_SHIFT 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 | 12 ++++++------ drivers/block/zram/zram_drv.h | 2 -- drivers/md/dm-bufio.c | 4 ++-- drivers/md/dm-integrity.c | 10 +++++----- fs/iomap/buffered-io.c | 2 +- 6 files changed, 16 insertions(+), 18 deletions(-)