From patchwork Thu Mar 9 12:40:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 66834 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp271092wrd; Thu, 9 Mar 2023 04:53:22 -0800 (PST) X-Google-Smtp-Source: AK7set84XZr/TFsftBXAJqCkpVRykVKgD2h7cbAERKD552JQGG25EpSFyzlaH9sbvZbFD0FWB9bu X-Received: by 2002:a17:90a:350:b0:23a:340d:fa49 with SMTP id 16-20020a17090a035000b0023a340dfa49mr6555552pjf.32.1678366402152; Thu, 09 Mar 2023 04:53:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678366402; cv=pass; d=google.com; s=arc-20160816; b=D7+LC83j/tARAbjk6Pwiby5qInwC46b9F0k9PMACNGSJPgPcaCjvMeszHzILH4a5q9 7ZTjD5IVN/A42Cbgx+QLSu6I/6Ogt3fvqxcHZoG9Aqdv7W2MHhCEaYNKfj5FSSNxM7M2 QsNyNedGe/Pm14apUubqi/OWtDFxrWg/fSyylo1QZ/BhQW5gZQhpVRHc6ALATbFTkKEz B1ou1/UU3LMoe0QbWU5/N4LXBfslJDvleVaYMlJHbcrDE5vthlgdS9rOy2oFRC+CdYeU UgGh4MAqB9I3B/6PT0i2dgauQT/NrKf6x+oIJsijzqU3jymWZf7uW/gRkJklJ5kJGQiZ 6bvg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0ZCLfrca9skSYdR8l+HEgclKLc+LoguwesGZMfxz/10=; b=ia3tFnPx+z/muXg0U0BA1t4K4b+FDFF1iUWugQS0wtviIhuqGbSI3xTzmSKkmyIKth N7JojLuQTUJXUlpong8DYAlBcl2OzjbJp8nAD6fpV6ZMsRJwLuH5Y5ZeVvrk7IAek3H4 uemsw/8YjPXnmrmxjDcJ7c8MZvd/FSCt0hnL5f0Ahc3MCtBUiCTGTHiiF0u5mWYh/c5j JCwtPG36a5nfPWj3ydFxTE5kY41DZnTWWQg7qBCzmuwzBUGHsBeWcu0FnYRKwkz8rhFZ E9AsyJeXwZKQ/arZ3Y2hhVfuzm/GRWrJ26ijdk4WV6NcXXv4ahQaVwycKuMdecxJr2Gs Igiw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=hyLKniLS; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x187-20020a6331c4000000b00502fe0f38f4si17958765pgx.676.2023.03.09.04.53.05; Thu, 09 Mar 2023 04:53:22 -0800 (PST) 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; dkim=pass header.i=@vivo.com header.s=selector2 header.b=hyLKniLS; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229798AbjCIMl3 (ORCPT + 99 others); Thu, 9 Mar 2023 07:41:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230243AbjCIMlV (ORCPT ); Thu, 9 Mar 2023 07:41:21 -0500 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2102.outbound.protection.outlook.com [40.107.117.102]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92882E34BA; Thu, 9 Mar 2023 04:41:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CfoCcPgNyexsoORjyg49muBAy11NYhdoggWYvimjNrDKW7OduxtOPXZ8rQtVdUFF7O0vAhTuc+7npsPk3OWRoMbWkz6r1hDyoU3En44+NPvWQKum8wxIYG9xUCRXgqZq/owlC+dtPqrSe8DJwCN2JbgTwL2AZozY80jHIS93Mhp5C4Hw/GYapP9ixJZQfUT8h5vgsdvpBBcfJe/DlqY0SSazEGBi4Wsf/nDpRq3L6wlHpYthPsv0MEFR1mKEQvv1Uki8x9K2OgvFgpvWLkeqjJNtIHAB7LWNS3QYsCVHaKVxumlj82BP3N4RYp2icnFbVFvBmrlxZpvMlygtB7VoZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0ZCLfrca9skSYdR8l+HEgclKLc+LoguwesGZMfxz/10=; b=ZRbtAUHM/qA8CT4u7AQ88bJr+zz5FiaTG0Ro2ZDzqDPk2n6mmIkeiJLmZZQ5sD+oaEMmuu6C5MBcK3HzD6ixz2UDfGPHJFXYl1/JbavBS0Uk5FKOtwYr3SGMJSkVbJVaCVPV7pPsL6iHdjAHZ5o8JFJFUtUGfDwcFeuY4pUL2RtOktdFwpQFJTYQqTt5qeMdHFeQEh8dPzyTKm4RTRcn6To99uvHGXBYKzEhfBCdniD5G6gHQbhod9D22BrUP8/yl00H1ZZdZm8ihcOSeXve2si+i2GyCmuU3E4PvANTtD4/1Xkk7zAuvLSmU5SIV/pVG74/TpZigO/DRtfyJttGKQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0ZCLfrca9skSYdR8l+HEgclKLc+LoguwesGZMfxz/10=; b=hyLKniLS6rTBrNhznzQIPbDC4q67MatosnOOGRKqM7BKkZfQ+OGSmdzG2bY4xdIZ9Pc1CxNOrOR0a0JAi9N0UaT0y61GmF+geV23Ymy8ig1XLAbpn8XTbmk4BBPbIJAC4qO5kFJPSr1mC5sw778+iDn1XfoKLKcOsByQ4aks/9xoZG89OwikGdQd91vISuzlHnsMzFaYvHy4kteW3Z5ocjsJoXE6582F3p2QeTSCmUdcXTubZgh7HKFJz1Xc7tYxGnpc/LL7HvBKNqn4/Ya1QnPjHTm9driimFcK6J7ylUmBbJvp1WD4K85pcxkia+LUkdyAcpnGJ5Gz2+RJaUt18Q== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by PUZPR06MB6054.apcprd06.prod.outlook.com (2603:1096:301:104::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.19; Thu, 9 Mar 2023 12:41:18 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::daf6:5ebb:a93f:1869]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::daf6:5ebb:a93f:1869%9]) with mapi id 15.20.6178.019; Thu, 9 Mar 2023 12:41:18 +0000 From: Yangtao Li To: xiang@kernel.org, chao@kernel.org, huyue2@coolpad.com, jefflexu@linux.alibaba.com, tytso@mit.edu, adilger.kernel@dilger.ca, rpeterso@redhat.com, agruenba@redhat.com, mark@fasheh.com, jlbec@evilplan.org, joseph.qi@linux.alibaba.com, viro@zeniv.linux.org.uk, brauner@kernel.org Cc: linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org, cluster-devel@redhat.com, ocfs2-devel@oss.oracle.com, linux-fsdevel@vger.kernel.org, Yangtao Li Subject: [PATCH v2 2/5] erofs: convert to use i_blockmask() Date: Thu, 9 Mar 2023 20:40:32 +0800 Message-Id: <20230309124035.15820-2-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230309124035.15820-1-frank.li@vivo.com> References: <20230309124035.15820-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR01CA0006.apcprd01.prod.exchangelabs.com (2603:1096:4:191::14) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|PUZPR06MB6054:EE_ X-MS-Office365-Filtering-Correlation-Id: a09f7129-6fd4-4738-6fa9-08db209b941a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uOqsWdLTmFre0ldLWcpc4R2o56DkeN59ug2DWaUD/Au9L37DSbR52beOhPm6Nw4Dxb4wPtI/ggiji/8/H+cG4GTWs56N9z3haesOT7gxru3gqn/zFIZ1hSKA9JHgAo2GAtCtBT8pozB6h5kg67BzezK4eobH+BYaIHLzOsFv/10VSLDBH+o3ERIclkfVdjIiO/dOldwPjITSpcKX5JhTjbhp6AX8xiQBelNGrT+IVeWfxNDAxQ/mfdgE1b3mKaltYuUjRlOOpYXgRoYEk1KrzFuUyEDd568XH/zbWMrcsGRF6RQn+k9+31/3ym8IkWZMbOTGlXDQVhHXn5Ac+AfiCAg3p1bduS/KUaUKOCiMihY1f+LhkCmjRVZ4rMIs1uVyx4DLayBg7F7yTiNvzhmBZ3GLwk0ZxFt+y8xd/5QP0T2znm92H6iyU+ZlmX/GM9gLIWxLPo0bd/Y2zNWa69e3nbAtIxVjsRL2hCKi5ZE2CJ7rFzmnZAkERqj/2E9g6MUUTYDDVFqOWwB3IQ2DC6IIogOlJSTudgIJh37SXEBtQcTaELtAEaZ4VuXnGwxfopFo641YrxQQbX0Bk0NUrPpjw4LiYIKf4CPUcFW37ztotNckt4fw05GMPN4tunPr0sBlt+diWbdjWyCi1TMF7WHy1UUYN1TO1d2oMDZiK/YfME/KJoUvb26E7Jicf/Uw107l6NQMP4Tgd1YBTlG3SkMPbqOVkfmBZkXsWJ7YbKRhuDk= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(39860400002)(376002)(136003)(346002)(396003)(366004)(451199018)(4744005)(36756003)(5660300002)(7416002)(83380400001)(107886003)(6666004)(26005)(1076003)(6486002)(2616005)(52116002)(6506007)(6512007)(186003)(66476007)(478600001)(921005)(4326008)(8676002)(66946007)(66556008)(8936002)(41300700001)(86362001)(316002)(38350700002)(38100700002)(2906002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: oqYbHCV5OUKh62SXwdkXr7Q3HdSwdiShQ7hp7AfNvqdsnmFdAjeCYm5aEzNjmaqiD1Ul6sQTc2TDZRVDyElYOsBikoYh0FTsJHIdxr9XmVWgIYcxGS/2ZxfihQd1waeQtLC0tQ2T0cBnzHEQUBsbF48qmgaNuvjTHqk9Xdu5uSR0ao+nLNRPOKD7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7lHd+L5s0r0C9/cfa2Sz7oHQZfXfwcwjYYktI/haja4lXzkTLHfZAA8Iu6QZ1rlRQeYhyOMTEM7YWgeRS5/3UitNKAFxTIDZVj9x3RIajpBMo81niS7bGivTkL9UAKaOO8qPKqwStVihQNZ0acfo9aTX8kQlCv19PgIaYINZCM+iMMrY00+mywMJeJwc8jW4j9eRPybb6pqvsQNOe4aG13wPAEkbky16unEKqoddxWA3RPdVBVls0M+ilReBBEh3/P4Bw7xWsp9S9TZ2fcJa3RBW4+J6DKSpKNm12QDaF48wSTYJMWfV6yYuoA6FMFuCBaZ7ruynVuGOE8YYgepa+J6RV3h X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a09f7129-6fd4-4738-6fa9-08db209b941a X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2023 12:41:18.1849 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BUURUGHeQDg11Thh+MoMMKA1ajppisEJBoN7569mUMWPFKwwQp198r0P000kDVVxGbsiosGku2qqbTBFYN1qbQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PUZPR06MB6054 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759894728632962213?= X-GMAIL-MSGID: =?utf-8?q?1759894728632962213?= Use i_blockmask() to simplify code. Signed-off-by: Yangtao Li --- v2: -convert to i_blockmask() fs/erofs/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/erofs/data.c b/fs/erofs/data.c index 7e8baf56faa5..e9d1869cd4b3 100644 --- a/fs/erofs/data.c +++ b/fs/erofs/data.c @@ -380,7 +380,7 @@ static ssize_t erofs_file_read_iter(struct kiocb *iocb, struct iov_iter *to) if (bdev) blksize_mask = bdev_logical_block_size(bdev) - 1; else - blksize_mask = i_blocksize(inode) - 1; + blksize_mask = i_blockmask(inode); if ((iocb->ki_pos | iov_iter_count(to) | iov_iter_alignment(to)) & blksize_mask)