From patchwork Thu Mar 9 15:21:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13184371 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 aib29ajc249.phx1.oracleemaildelivery.com (aib29ajc249.phx1.oracleemaildelivery.com [192.29.103.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4C374C77B76 for ; Wed, 22 Mar 2023 17:03:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=oss-phx-1109; d=oss.oracle.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=tEFfM9uLdAzKvmk+02jLPzzr9iZW9qMJhtHPHjTbic0=; b=fkrW1B9rH5x4+ZeOEA4FQhiazD7wzz5A1IkTXYi5q11con/XsUKmzbRqcFU4rBFxirTsWHKmnrJI u7S5unnorKyBKUE88Yx/fseqwAcfNuYdDs5yAWMR6cmoBzK6ID4sxqhn7Q38LTjADpB6/HAsGUuP 3NdLZ1Kq5fUZf5cLYD1NsfiyiasjJqDW+lA3nwTCg9vHDeLLytIaWN2DO3d2EapGrOWb5So8t86v mWyoYqTt2Pzgt0+8EPkupm2esPP2k2+OP0rZBPx4MSpOL1itEzot5vAoOR41T8ptl7bI/9kbz6eR dzlRvOJeACR6XbnfvYnWwI+CSSIrklQhFOElLA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=prod-phx-20191217; d=phx1.rp.oracleemaildelivery.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=tEFfM9uLdAzKvmk+02jLPzzr9iZW9qMJhtHPHjTbic0=; b=AQevDFIHdiB1rAD5CW1rf8riN5sUwp7MXMHEpIXwPuNMeP40Dhjp9rj/hlBG2k6W8LQ08ebr0qlG 7FzsCxrbiTmk6a+iysqg2xiL9P3h7LJjpinujHGoFYNb6leKL25d4qyE237K7zs7d9S/N2T8/jzo f038lnNegWTs5+Ufm30rmg+dYgIghNKgASqn5vMDhkkdyBbcOMMPWZJGWyBfS4r1gPzzmRRqd0A8 PlRaPk6CprWyj1KOx6Itygs6vwY1Ibx5B/WubjARMz9LzcROdX9xJGHw7LrinkxwZYx3pE1MmXEG c0ZB0nEHu+xxMK6cuNIPog+rFKhaeRZGC0ydYQ== Received: by omta-ad2-fd1-202-us-phoenix-1.omtaad2.vcndpphx.oraclevcn.com (Oracle Communications Messaging Server 8.1.0.1.20230214 64bit (built Feb 14 2023)) with ESMTPS id <0RRX00LCYM17G570@omta-ad2-fd1-202-us-phoenix-1.omtaad2.vcndpphx.oraclevcn.com> for ocfs2-devel@archiver.kernel.org; Wed, 22 Mar 2023 17:03:07 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TBZp69LbLGq3HLC+g9DslItHy6JmL9+w/Iz7oDJpbe2+mKPFnZYdfHF8QcJf6Vrw2CCfuJj2GFbQs4Ero19J+ZFaYrrnqGsjYRqppe8pdSQgkj0GShsPeElQSpoCt49/eLAGcC+6O5UM79RxTdE9YHFmRdO5C84svfEO+ckjJy+Mqjcxtxq30c2AofDp4FzlSo5oO6f4UxDMJwK7nHPloCD3KRGIRdsRMK1Q84Kj3t/CZ9yquApnEM0vWcMFydtqnlETYrPel6mpsFr5ytVm3Mhye0iXj0E9Di//1gKZ6EGHW9eSTnhw7fZWkVSQGD6XDSbmiqEcNQH4e3QNfFTbzg== 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=KwynQujYWLmomSTW+O+riD1QybTK4tF8eo7csGlUAVc=; b=SGGQlROZYZqBYiwqCGj+Z7e+5t+DutwVuif+oHYLgwW1XDtkL2C9iK4Ne1cGffwnHfT6n0JHP4L+n/WZFJ/YnTr//YiWQutG4fSIQXcXcqpuwa2JaF1cq0UUfwADogIiEUcrEFrWoRSo2uqBWMJAfgUlsWZ9T4J1syP2Ji/l9Gif0OEshzknXKN+y3Sd7PgTb3Z94MOPifeIIqKfhkyZH98ph0zGK+2jhAAgSpUBlN380miPOT+Ul1t4emJeTKOiBXlCz0LaLBYYNMDpkK0G2jFeBKGSv0XF8yqxXkFlnw9Hph+gQ1vVNlIBsSQgI7HN5Nmjd0xoLHoMCGLtTZFi9g== 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=KwynQujYWLmomSTW+O+riD1QybTK4tF8eo7csGlUAVc=; b=QNoW48eaQIMcvUo6+PcGITmRqc/cC+5Fq8oNP2n9WRcm1gqpEYHISyyp7bfGIw02SbhFOSqWXEzI+X0xQtoprUIzDyuYHfXuXqvd2zFKK9BkvrtFO0LFkGTHGq/hLt3pQ6+VaxjEf6SC3Sa3AaXWG1wCSgVS9gQJXi0vvC+OW+lPfnk09ufw+4YW6HlIaA3zG1QZfq3dOlFXr+I1P/XOwcG1xNAtp7n44cy9u7AfJmGomVeZZFsedUJ6GzRCXdMJheBUHOYA+sa2v9C9mEGLo20y25LWWWe2tO4Fu0ZLdhio9BNR/jRryM2vD6MJ7OiV+s7KkZZI7udVgJeybcefFg== 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 Date: Thu, 9 Mar 2023 23:21:22 +0800 Message-id: <20230309152127.41427-1-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 MIME-version: 1.0 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)(366004)(136003)(396003)(376002)(346002)(39860400002)(451199018)(316002)(36756003)(921005)(86362001)(38350700002)(38100700002)(1076003)(6506007)(26005)(107886003)(6512007)(83380400001)(6666004)(186003)(2616005)(8936002)(5660300002)(6486002)(478600001)(7416002)(52116002)(41300700001)(4744005)(66946007)(2906002)(66556008)(8676002)(4326008)(66476007); DIR:OUT; SFP:1102; X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2023 15:21:59.0430 (UTC) X-Source-IP: 40.107.255.128 X-Proofpoint-Virus-Version: vendor=nai engine=6500 definitions=10643 signatures=596816 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 bulkscore=0 mlxscore=0 clxscore=71 mlxlogscore=768 suspectscore=0 spamscore=0 malwarescore=0 adultscore=0 impostorscore=0 phishscore=0 lowpriorityscore=0 priorityscore=104 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303090121 domainage_hfrom=9102 Cc: Yangtao Li , linux-kernel@vger.kernel.org, cluster-devel@redhat.com, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-erofs@lists.ozlabs.org, ocfs2-devel@oss.oracle.com Subject: [Ocfs2-devel] [PATCH v3 1/6] fs: add i_blockmask() X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Yangtao Li via Ocfs2-devel Reply-to: Yangtao Li Content-type: text/plain; charset="us-ascii" Content-transfer-encoding: 7bit Errors-to: ocfs2-devel-bounces@oss.oracle.com X-ClientProxiedBy: SG2PR04CA0168.apcprd04.prod.outlook.com (2603:1096:4::30) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB4073:EE_ X-MS-Office365-Filtering-Correlation-Id: aacda692-1cf9-40a2-33fb-08db20b20679 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: G4Pjw5dPbaeSobXs+hHJALkpNaxqVrInZ3P/dUvslGuaxS5icrGf96zouh8jplvNB9vxQpnsRa4gaNPe9gzbGAgkRQuqoMpWK2YtRZrYOxi/fHbUg0iZZk8HjtMdiLqjf/ov0dojwJNNBbB/ygRySIB4bIdMEODvYaTpf3G0gVGsT0D7Jun1L25zdyUQ7QsQW1yWhfSr0+MOlLlMfqv+5xgdiGTE0/9yV5erJa68ZZueXzRTWL6oKJ9OuU8nXswEKxPdf6Sf5hNnaShnX4myd1MlY0lTD2ARtH5B90utrosTWZMq4TDVQ7rw6xlI6tyqtdGvGSVcLF3zxvUFn0vh1NBpjmbexF3RsSAnIj0JzZIh/N2GsbArXeBQUa+8qcXm3W0QJEmgOYGEtW1SNhwc7PT5S85ZuHMsis3CphPJz7RbmM200a7tUwDGJVpAcs2MkWYQi2cRBgudTs6l9WsnCyFwsL92Oc6AR6/FreBUQfHdmWY+LqBgWE9Slrq4X3+PdpDRUWf2u7sbODRjuh4UIcCi1fScvBGSQsiFA2hJ46TQ6HjXkwogwGmwjhaadTdg4JkwBll4ZuUrp2ySrxyu7VmevNbfjyYLp6VKPcMX2hJdzIL12yyxeh0lT9FPrjtv2D10vqjZ2dBlaq/Y79ryV3Uyg6BoTbLONg9I29x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7Qm+3mU6kpt5nLZUt6mtWMTBVLx0AyboOaRr47q7TmT2Qo2HnJvJq4XYi/efWXkTwFJqimyD2z6DVuVmB3oATIbFca6/vcI2oUELNeyxOevQ3WEcjeZLgDD3qfMk+vagfHq9C7IgQWbVflP8/m3opCF6XYQPhef+qBLYhsGh1pt8tKhOFQ5phA8V1KbdcYeqkuOQBa0LLLP3RDkP/b/I+RSYNadSLCUk8nykWiG2d1yjySC6koy9py/eXuCn19A5ACEBPiuO1J5+iM6HQjiTlLEwo6F3+nYRGHYY0REkw3lfHwapMsZJM6Eho4mtDo/NFIq9EEQ0l1fZLO/KBXQyzYZBAE2uSMsAb65B3OXg3SJoESDA2Ff12zySm2MQhiF4Jk4Nb19tenHd0CnhzP3FFJR7mV18bLy+byQatBjnhMQb6syxZcTX8Rbik+sQrcd32mOHluSAB25n0Jvyx+c0h8LnWnpD1K0eHwAi7lhyJwnDpXWLTdx4Md19zaKfKYbVwhSLY8VoKto/mpq7hLWp1kkwRQZbxsQTK9OAvELAISiCqqOBniy+WF5ditT2ovAS02OEPJdCpoXN3fheGiSJWGCw6PGoShpK+wMU5NrhcQVagMdHPE9VDkQ+Z7PmcMs3dUY+Re+9mJcAZWp0 X-MS-Exchange-CrossTenant-Network-Message-Id: aacda692-1cf9-40a2-33fb-08db20b20679 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal 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: otqDAUOTrXaBBUEezH21yUh1L+jDlF9Dyb8Bvsa2Kw1WC6aF8euhBTSXugH8TLCPAudua1xbzopsJ55utVQnWA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4073 X-ServerName: mail-psaapc01on2128.outbound.protection.outlook.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 include:spf.protection.outlook.com -all X-Spam: Clean X-Proofpoint-GUID: C3ILx4ZEzN7eqG1R34SflJHdl4jTSU7z X-Proofpoint-ORIG-GUID: C3ILx4ZEzN7eqG1R34SflJHdl4jTSU7z X-Mailman-Approved-At: Wed, 22 Mar 2023 17:03:04 +0000 Reporting-Meta: AAEXNeKJajLa7khJMl8igq/khFLdXJ5KuCz5YDxID9gkSu5weHAQJDTMKYifxv4B 6ZgP38ZPe/cES2RfEOyr1ujfLwvQLCoB9qLWvKaiQfu3miZ/PtWTUVKg/vzZuVSr Z3jbwOCEXKLtnwA8hP38UmgO9lkyO+8CL8tzn/8wV91f53h1ped0vZZBwoDdqvnh M5uzGvfALHHXIcwCt8xiVZxV3uhpPglL7Ah628zR9gvu9nerOiqTZEOHlTEHEZH5 yI0x8yCY7qYJJakYj/ggKot2L3fR9iuwdgRZgjzG6KARUFonTSRhO4j1Z+WK3Ofu XsYdNfU8pOd4wAI3PPLqLW+GMyhhXrKfR64Uyy7zPND+rxOX1AKSE/18a+tmujdV /a+uzGakGukTUI5qra1EuT38cqG7Hql6TFUsgJCm7zFfboy2aK/t/1b+sb5Nwp9+ bPG18xZAjRivBj3RESrh4j77o00NIc/JoXwUk2mmZfdNQpHFwyX67dNR34bqNvAX dQiUB8jHQSSOyKxqOjPz8vBAAWgYLBRCC5fsLhCQkCMJ Introduce i_blockmask() to simplify code, which replace (i_blocksize(node) - 1). Like done in commit 93407472a21b("fs: add i_blocksize()"). Signed-off-by: Yangtao Li --- v3: -none v2: -convert to i_blockmask() include/linux/fs.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/fs.h b/include/linux/fs.h index c85916e9f7db..17387d465b8b 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -711,6 +711,11 @@ static inline unsigned int i_blocksize(const struct inode *node) return (1 << node->i_blkbits); } +static inline unsigned int i_blockmask(const struct inode *node) +{ + return i_blocksize(node) - 1; +} + static inline int inode_unhashed(struct inode *inode) { return hlist_unhashed(&inode->i_hash); From patchwork Thu Mar 9 15:21:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13184365 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 aib29ajc255.phx1.oracleemaildelivery.com (aib29ajc255.phx1.oracleemaildelivery.com [192.29.103.255]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0E65AC77B72 for ; Wed, 22 Mar 2023 17:03:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=oss-phx-1109; d=oss.oracle.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=w1eljlU5RfUTHsE080aKU5GKCpFr9tkqDkKgXiTdjTc=; b=HSIogPy6DIp4PKU8ePUNkMNC4weKWAeVlYc3TFUzkEuaNUjhdhKJR9GWIcuHt13FoIHvYjVmETky UOk19A8UR43ul43oos+0Lcvb0QIpuaRrYURd4YpmPKiUgAju5jWuPY6YoF08RkWSRtKvB3VuT/Om t+ZQ4hbhKpSn5kML/z2xZ9Zh1hB8DgcuZq0LjYkZecQm/yBYxxzpYEBrmYfVoxZHFwDnfRQTlK+o LZF4yWYiNoTo15jOcK6pSGuuHpQ4Rmo8PblV+6miXb3Quw4FdK82KSwqsd6x7oUXy1TK7OKW3k5x ciHvo/43zhpzPoGAVNUE3itCg5LtfhmkSHwb5A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=prod-phx-20191217; d=phx1.rp.oracleemaildelivery.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=w1eljlU5RfUTHsE080aKU5GKCpFr9tkqDkKgXiTdjTc=; b=p9Ibj/M2bHrbmSqyTuR/jxebqJ1on2X3ai0XpoYmbRvMebhP+Xdhvsd+b9+ZL6vHe6vQSQvaUCpK dOUAP49LvYCV7HsKyrWt2jbOXWLWaAtzq+zInOIClqJtrb2Z3gzhMTqUkO2I6RgxTTPrTNfHz52c n8u0bLMQSXljiDDshOYBOcqFgaleaORYpSILj7tM2WdxXocNwFKTANY27Fyp8ZavZq0GjwkXqz5C yOc4MtEK90dwbiet9xU3MjNdaxJW/0sobYhC+CtzhI6nauPBNa0akvnN27aQVWnpzdRq69ymk/Mz mYgJK9hxlDSwjy7X+QjABN4g+kfReSoUo0kUmg== Received: by omta-ad3-fd3-302-us-phoenix-1.omtaad3.vcndpphx.oraclevcn.com (Oracle Communications Messaging Server 8.1.0.1.20230214 64bit (built Feb 14 2023)) with ESMTPS id <0RRX00KA3M171T20@omta-ad3-fd3-302-us-phoenix-1.omtaad3.vcndpphx.oraclevcn.com> for ocfs2-devel@archiver.kernel.org; Wed, 22 Mar 2023 17:03:07 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IGMR7RLSdhpm01jsTykg8Q2EMWFnkZfTYGLqO9nWRf5MLDLr3WwGdVkxUnUMJ25oT7CBxrYSUM4vNxtPnr6QIzbO7gRHI51vaEY6FYsrxduJv3usxPIV5YREYUU8NIrFTPxm0mGZdn2Xc3nxrZygtspIZYB/BcVHuA6spmoaMJxngeZI2hWJXnna8ETNYkpPRPYoOdr5zqQuwwoYSFAB+0T0urKdVoZ7Cn8BxeKZI+eLlT7HkeUHjt0hlRUq/BiZk2jjysSZJDt4+UbS4TSfhRxJoGhfus5kEzJffFmbGTi47i4zwmbqszfVjzy7p6lne74b9lRfclZ9rhm7IVdcyQ== 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=5WZ/gZ8tExJodLukafBwYfS2IWoyWL8CyYD/KVgopyM=; b=RH0idH2FO9oM6mybVQjw3U7J0b3d1+sCwe8+n4jzkhnxFT3oqa1LgckNpq23NPc4wdQEHOnlUY6cU5TgS8yPD2HzXU6j2650Wp0biwuBaorYYm1r8pibVrOCYp/uoDo9hUZvPDOzzSSwdDHSO3p1gcMgiJOMNas+7YEYpOkI/D7gQdM4fHLIh+6tqXnzHOas2FGZPXVVnS4U+CR0QasWK50SKNmrsMhic2pWLcYpTO7b3qPpNK1Of2Sx3DmeKunjeJlTMS+thUozSBQpcfBsCAwJedTTInYGSbbo8xjWvBjzlBJTYayLgZinhfsKim7h6nV9gmmHrpOiXDzbeMm+0g== 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=5WZ/gZ8tExJodLukafBwYfS2IWoyWL8CyYD/KVgopyM=; b=dt9SLlnM6Vpy5N5sVaKbrOVTgHD+ceAEgRbGod+sxc2ygO0DxlvPNG2BsuVMqo3XaskcyYFnkj2W8y0Hjen7OkojyGIg8QajWSdKRgX9tfFA1u0UK9RZaKO56HJisR5g7b1nCayLvLvNxZ5D/C570lPmAzozXCVuTHCCGK3IYf/540E/jErQp7FIkzjb2HgGnVzMRSnX0RQklMCaQzJDhvpIQlXbVya/K/Oowa1yfxGrQ+tc4F7wdiVDZS/hQOmVJ9NDwNLSDSFLrK02ZgLv3VnLFDFeIc2vNyvHAYUBlMzm+h2dEdqNygW9HoOYHDQgbztSC7aGl2Jd9zzfPjVN2g== 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 Date: Thu, 9 Mar 2023 23:21:23 +0800 Message-id: <20230309152127.41427-2-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-reply-to: <20230309152127.41427-1-frank.li@vivo.com> References: <20230309152127.41427-1-frank.li@vivo.com> MIME-version: 1.0 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)(366004)(136003)(396003)(376002)(346002)(39860400002)(451199018)(316002)(36756003)(921005)(86362001)(38350700002)(38100700002)(1076003)(6506007)(26005)(107886003)(6512007)(83380400001)(6666004)(186003)(2616005)(8936002)(5660300002)(6486002)(478600001)(7416002)(52116002)(41300700001)(4744005)(66946007)(2906002)(66556008)(8676002)(4326008)(66476007); DIR:OUT; SFP:1102; X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2023 15:22:08.7178 (UTC) X-Source-IP: 40.107.255.91 X-Proofpoint-Virus-Version: vendor=nai engine=6500 definitions=10643 signatures=596816 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 bulkscore=0 clxscore=85 phishscore=0 suspectscore=0 adultscore=0 malwarescore=0 impostorscore=0 priorityscore=120 spamscore=0 mlxlogscore=828 mlxscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303090121 domainage_hfrom=9102 Cc: Yangtao Li , linux-kernel@vger.kernel.org, cluster-devel@redhat.com, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-erofs@lists.ozlabs.org, ocfs2-devel@oss.oracle.com Subject: [Ocfs2-devel] [PATCH v3 2/6] erofs: convert to use i_blockmask() X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Yangtao Li via Ocfs2-devel Reply-to: Yangtao Li Content-type: text/plain; charset="us-ascii" Content-transfer-encoding: 7bit Errors-to: ocfs2-devel-bounces@oss.oracle.com X-ClientProxiedBy: SG2PR04CA0168.apcprd04.prod.outlook.com (2603:1096:4::30) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB4073:EE_ X-MS-Office365-Filtering-Correlation-Id: d461e413-0f51-4f1d-d76d-08db20b20c3f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: E0GSNzAaXPcAcRhkThhiuonbAkvDbLW6KQzMnphafn2WlZNyifcGrYNJ5CLxRycHYcGCAitOJdWkvBu5RpNcp/hxdd8+7rOkPk5TOH84OFo90L4u+fFoz2uNrI6G/nXvHeAsONCYWfXzRDdiRHWWnlfmSFPOPqr8M9OA/Ifp+AYEX6QNxbfXSSUwqN7oBufMCCXhFFnzSxNt/dk6E6MxktDNNae7lQBbsBvMxhYCSafvoui5v3Cy2ykWR9RnuQHiZUIHo+/+hA6R/3Wi50PJZWDaKEeidMzfimsvGg0cihtete2tQGtMSfo3zm6tUXW/5WZUeBSMvxKeUdcluoXNqh1fY2dRn3bi7zr6crBtgVd+GKJV5AaWBMN8UHPJ4MIFzjRFhDez0333sUMioK+J7WEvO9zgjkd7cKA6wzB5+0gDmnmp5DGgH5eInrptD/QfgmWO6By/dhHsPsWAc51hs7p1zv0L4HiruGPMpsmgCLTOL1KCUOLk7hOJFH6YfA5uExgeI7f72KI/KwjoIrZ04zpm+DCzUJasrdn+SbGes/Z5FDjgPscLGOtQub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qx3nyJHa668fTf2PUUEPlLUTH3/JPdHowBV50DotF2tMxFZBpmigM76a0ANxnB9zelg9i/HMbIwClbA7TAX8WyMI2G8S2PEUHbOPLjzWEWvJIkMxkN7ISy/XMCFnnvnFEPWG2nkYp5jo8NY0Jn/4Lii6U1ouWrINX98qVKPqahibKPUA36uG8Sda8zI8YyqPCKuk4YUmRj2fJolaONMdX7bOin5PCzJgpWKNO85zH7MqFKVuxno8E/N/UQGhRdQ0qum/jvhi8SzV0p8rTEkUWr08FCwP4tVnmjyb/Hu6u+emQ54JOILNvOTQKvV3piWUKMPYhbHfWuryMKmMx/wpHtXzM/U0L7fQCaZP40/x5E8fAEcniu1nNd657MU9r/MS1xPdZr5pNTgfYY4t4NhI1y3o/6Sah34rSQE0TknMgm01Bk14JFtsaE0KdAAwsVOruQRigq8wL3XR/XgRqrJHUwfKCkqDpoodFeZKzyQ8YDtrkEMOOOhBMtVgp7qg+OXAnsItqgrCiv6kcGa+K0kgwxreAjL24CzNh4ssiYLUfvVQSj9tKE6dgbTV45eXpGZfSOSeAruMrO09UNkpClNfJ++bEbmCMnrKeHvBiM1mtJlSCSp/7jw2nHQZxJgcrxMDvPdf4bSk57PtMQDaXEYWrH86/9tp3mfPx8Kpt4bHpgZI8DhiZH69AJwE2c+9QCGDHBnSoyWvhF7ktVMD8JPEHC8+DDMN/D4YiE8vStb7r+h X-MS-Exchange-CrossTenant-Network-Message-Id: d461e413-0f51-4f1d-d76d-08db20b20c3f X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal 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: MQpvvq5B7tilzUfzChSBYPrsS+VXR56S8jADb84bY9ha6sfWsC99ngdEXpgUYI0kUG3WSnesGUAPO0kYQ1244g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4073 X-ServerName: mail-psaapc01on2091.outbound.protection.outlook.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 include:spf.protection.outlook.com -all X-Spam: Clean X-Proofpoint-GUID: rifOd3gtEjvDOxdjGtyf7O2BZMR0EJCN X-Proofpoint-ORIG-GUID: rifOd3gtEjvDOxdjGtyf7O2BZMR0EJCN X-Mailman-Approved-At: Wed, 22 Mar 2023 17:03:04 +0000 Reporting-Meta: AAFNBPXoE8YIAzg2eQk3O0rp2iK3R2lR/ETVY/JCKAjoMB5VEHLrZ/p6JSN8hwIW HjEint5XnalB5vfDIgC8qAGrfqor/Vn4jhM+M1YYha7V+GT2Xbev0y04C9Xz7xT1 Av/TGvxTZ9LTaKCnomkHVxiAPuLzomP8q8OHmUAJz6BNnccCqBRhMd5ENqu081q3 RdtRIng/Aw9aCQfHScAsXVs4EZI4lWi1IzOF2ioFkLugrKxNj8YxqeVVsLavsWpJ OWBrMqO87z2LQtGNtkzQ402bENxoBmGisJBqaJQzHN9mWUmhxSFWn/I8eiF7AahQ 3zofuUjNpPo8t10eyiFFTWpmdrsNCd1z9raADWDGF1c1NcSEJjw7MDCNuufph0hN UuPrOefprT30Kq3wH2O5ksSyppy23LcP84ek9IMXi6x/kiMtknc4OFPd7NkOhXyX +gZp0Wz+QqEj8ETdgTSQNV1C/B5AbZXwgqPg+i+yoITJAW49I8hlcwGn09igp38w b/3VkvdAp6CfcUKrcSxWWIGFAGrTtPYQiZxv8v33cYg+ Use i_blockmask() to simplify code. Signed-off-by: Yangtao Li --- v3: -none 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) From patchwork Thu Mar 9 15:21:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13184367 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 aib29ajc250.phx1.oracleemaildelivery.com (aib29ajc250.phx1.oracleemaildelivery.com [192.29.103.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 486DBC77B74 for ; Wed, 22 Mar 2023 17:03:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=oss-phx-1109; d=oss.oracle.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=vWcwwyvAGun45lMY0osv7gfxrWcEjS4Ks0X7h2xC4Jg=; b=pbc/FLA0pl+qwHpgg78GJUbnzNcwyM8g4cADQiqNa04CEiwU0sudxQ97dJasALduAdpf91dvLtfN E0B4QZ2TF/9DbQtFOpJyebkereqrgLL6ETPEEJ/xmbIqJjC+psy2iHWnxR2vwgq8Dl0c9gb0mdAh zKy6GNf/azz1gV3D2bU4IWn0B4gKEf5/Zfil+6RdwftFsJOHnEiNvDpOeXOCPNOaItQAyA7K+pD6 RKxpNxkWa9IutHLUelaBcCrZDv6nB7g5hMwMIYvJOlayvQ5F3RETRYBdidYEKb2UBAnY37IaY63f IYBHCvm4JSAYb5IjT+wj8bQk/zjkUBYI8DNBQg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=prod-phx-20191217; d=phx1.rp.oracleemaildelivery.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=vWcwwyvAGun45lMY0osv7gfxrWcEjS4Ks0X7h2xC4Jg=; b=mTXVwmFpYa7GzoZoLkKJm+2t3gO1quktHfK29uFebND+nyjvvXS0+bHN/PjxmCmihKngErGzdzp9 AZFesHfyfeBx1igHy+fYpCocBhGWV5fpKqg5wjuksqW9ZWuI6czq5CwFKJ8aU8K3fXW3JgUfUCuk X8CNQ8cUK/NkAov1fOCSskfbk9yFqJ7KFiCiQ5OcLnVUN9Z0YH/wKVs55OCvPFB5cXE7DkB/+KtR OWgksvAMWmULgRfty4Nvrjq0aaKKcnzY8wEsugmWiJ9MerbRimsctjoCoCwThla2Pj1QCppYnHuL 9TVG2YlCPq8tky3iCCunGFsiGSjaKWNYM7AYUA== Received: by omta-ad2-fd3-201-us-phoenix-1.omtaad2.vcndpphx.oraclevcn.com (Oracle Communications Messaging Server 8.1.0.1.20230214 64bit (built Feb 14 2023)) with ESMTPS id <0RRX00G54M178MB0@omta-ad2-fd3-201-us-phoenix-1.omtaad2.vcndpphx.oraclevcn.com> for ocfs2-devel@archiver.kernel.org; Wed, 22 Mar 2023 17:03:07 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WBAJWSn5iYdhpB+5xdqRyRLOd9k9qit8bZNsJiO34oQzQKdqH6Sr/AK34teHp29ItFqfxQpz632Kas3bQ0Z+oypeGanG5TUJYjxHCKrUqMbPTMFqPhgrOGlrB0g1946RYaDCOAn1pWav7/hOLP28XpEBoOBwmxH7AHKilIQj8XuiP+QrYOhwYczO4UkP8dELyA2FwC+PZXZAIHdIsMHfiUc44yUePcmvPdmBvmHL7cv7VCVWKNVob3FyHGqF4N98fwLDO4mywbYu/D+ymiNLNu5TZVwE8/qFT1OjUFteNKnYpHLhyEHzKhRVV7wmoS+tZKXJf588Irtiy8tnnoeauw== 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=EN5Y7OXDT4V2bpXioGREHUJ3PuMN8TbPuqNvpGP3jcc=; b=XPIwo5mwdrs4NQ6yL9qYHMXUnuP8ONYTt96v62AP1lJUkaZfmQ+zObVYlskFxWc50iSLLMQh7qoT2ZfIFvGwdojaREdXVB4JL3GNO0Tu07+gSF4mT+/SUcPGlk37o1uh1nuFkphO0tmVohaeuzIQDI0oTmaJuvyBPMrJrYJZVUWmBDDZEGChmNFnE9BguhP48lj2IrCKYEpZVaCgpBpvF0R8Ze+upryUND7hXlJkLv6sNUKQeDBgi+BkoLsPUOuC9U+8ZYQchgT+s16x9w9m8AgYtOExobvPAYEpJiQae5E2c10aOhNcPoU06uSB3svs6vbFy+Dwi2RPaIsGq0mcoQ== 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=EN5Y7OXDT4V2bpXioGREHUJ3PuMN8TbPuqNvpGP3jcc=; b=WLWfPvQU2bhObgm6GxjC+aS9Q596I2BOM2k9fq6Uv86oCb3vOWSmp7XDdyV6fWh5v2LFcEkw3ji4sdyirJA1LbYeruxuYvPZSLR9TL3SNKOmzMkI+tlVO5UtraaJzIvkNi4jzzuRRa5Dq44JGll2I6f2oj8lKC/qU7ODpnI9WI8KZBI/wUVQMG2fleksKeuXo8hu5WgSETOgEi+NJjYTVKWJEfyLVWJnG1xIMoYks6ae1zcc+rCVnsqqjRLzN/Xs83TPsjJkrCwaVtTXbdO+IPb1fNXEyIqe4mDvqTtYaWx/o+1E7RMlEFVrV+c3HxWvt7mPSVTzwV4e53q7ouDgPg== 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 Date: Thu, 9 Mar 2023 23:21:24 +0800 Message-id: <20230309152127.41427-3-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-reply-to: <20230309152127.41427-1-frank.li@vivo.com> References: <20230309152127.41427-1-frank.li@vivo.com> MIME-version: 1.0 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)(366004)(136003)(396003)(376002)(346002)(39860400002)(451199018)(316002)(36756003)(921005)(86362001)(38350700002)(38100700002)(1076003)(6506007)(26005)(107886003)(6512007)(83380400001)(6666004)(186003)(2616005)(8936002)(5660300002)(6486002)(478600001)(7416002)(52116002)(41300700001)(4744005)(66946007)(2906002)(66556008)(8676002)(4326008)(66476007); DIR:OUT; SFP:1102; X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2023 15:22:13.1549 (UTC) X-Source-IP: 40.107.255.118 X-Proofpoint-Virus-Version: vendor=nai engine=6500 definitions=10643 signatures=596816 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 impostorscore=0 mlxscore=0 suspectscore=0 bulkscore=0 priorityscore=148 malwarescore=0 mlxlogscore=821 adultscore=0 clxscore=104 phishscore=0 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303090121 domainage_hfrom=9102 Cc: Yangtao Li , linux-kernel@vger.kernel.org, cluster-devel@redhat.com, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-erofs@lists.ozlabs.org, ocfs2-devel@oss.oracle.com Subject: [Ocfs2-devel] [PATCH v3 3/6] gfs2: convert to use i_blockmask() X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Yangtao Li via Ocfs2-devel Reply-to: Yangtao Li Content-type: text/plain; charset="us-ascii" Content-transfer-encoding: 7bit Errors-to: ocfs2-devel-bounces@oss.oracle.com X-ClientProxiedBy: SG2PR04CA0168.apcprd04.prod.outlook.com (2603:1096:4::30) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB4073:EE_ X-MS-Office365-Filtering-Correlation-Id: 8a9c6312-19bb-4ca1-342f-08db20b20ee5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9zw4iYeFkgTHMTIZeNkJQD6Ts/vtKZyF060qehqrCBZt1Gok3wu/rHoVurBt9d3xFwtq6mygGzq0NZN8BemSVoOgfcujo+OY07p+6TXy0W+DdnrM6Vnym2YcXhYv51U2/9IXugNs/hZCV7piJbF02H6POkCBsVokTW4Js473fKVpNlZH5hhLIDPZ7wAHoNWRGrg95yTu61qbzMlKA6JPXzpOP/zp136bq4M/LpUhMqDMUauavqgS+rmAVxGSUUmr77X3q0JvSOsbUU0Luba74tDMa+O115DjgP2QRXo+2mrQP8Jqq5LDJ6unI/ZIfnOO+QeI2uxIm6uob9icCqtn6A1J1cXsZyzFvHTkowEne1JPTCTUpWx3iJ7duBkS2Tr7bUl0z87E8+khMM7O+vZdVUulh1W2zLoBi7m47ZH4sUBOiVGiR2+2z6AO4afxqhJtbsNht6Td/WtKUjhJZAnP0UAWvzvTxGn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P7TRf7W9zNMAQAYc78xwr7a8ITFEZSvHbcua1x2fvXZejUNEVgNYSwfGNMBcJ9MDsJ9SUWKrgJx6lB+Jw6muJMmFWZWksNgd38F4uVWdsZAlOgksyHRiGwNjQy5fwxJpI45oFqpA5wwrNGobYcO6m4Rif6o4n4VwWoXbi93Nd5cO1HOjb4bP318SuM00PVObrK3Gon2nbw5umMy3NSfvtXgVU2SZnuBNebVZfk4oVJS2cYCVPP8wL/MTlBJROunMtShYqAUpcjam+D3X7gtVJOHI5OpsSmasXt+yGWdkqVCoCE9GvyiUWILJESOCgbrErRvTTn50ri5M9pTawGKJ+QoeyaVdFQ8VGy+H+OJr64A2CuBdG+VmqfsX21XUdXByzSWQRU7HWYUg9T0lOZF8mOhTNM0aZQKS5aMCL3nnVcaocxBRoNTuQglgC/yqp+LDzVQHqWUTr0XysE0AbPcu8z7Ym32Bq4FvMqHgADf4bW/58Vg+51HVd5C/er3wEtzfs/Tui9xghtAT06GmTp7ovMGqOhh53lhm/hq80AxBkcbe4UkovLmsNCi8g9JR29vi9he1cu3Cx42TZBqrnNLBabxl21uxaxhmHiVyiGaAkD8lGwZi5/r5n+4HvtTieX+jQeBHNcySZuap9NNtG7pqgzGUmXvFSD895rwmJJcGVxVAoyXIKwKWugUUsRQdE4MaZTofEnPr06YthGoexPatzVeo4o8V5yxPvtjqaF2vHqe4bjbYfzH38nTFjG6mSu5HF5nWEXFVNHt1wzyzufr4cIbQ0HjMgvIv4iPCcL2VJp5IxZJmET3KuHwCwxloliUT3wMXoaRsj1xo/8j4i/sN/+iJrDzoX011Odm X-MS-Exchange-CrossTenant-Network-Message-Id: 8a9c6312-19bb-4ca1-342f-08db20b20ee5 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal 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: wGe9vUdPVyn6A7qlLYid3EacqnHwDSvXb5oWXoeWdaBo/XkJYg4ytVLp5Zq8VCxfh7SMnYzeeqxVDXMo06KMRg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4073 X-ServerName: mail-psaapc01on2118.outbound.protection.outlook.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 include:spf.protection.outlook.com -all X-Spam: Clean X-Proofpoint-GUID: __9VAVQL-ad8sP3snQgJSoVm0Uwwxudf X-Proofpoint-ORIG-GUID: __9VAVQL-ad8sP3snQgJSoVm0Uwwxudf X-Mailman-Approved-At: Wed, 22 Mar 2023 17:03:04 +0000 Reporting-Meta: AAG3wcyqsF4lCeJdoz6b3Xr4ab9afnh5FvFBqIm2FcJJnNLCLkswR9vlVcHpf6aO Ma1mv5KA7PLzLx01gCOjaVIPsHdkUMzNlAGGqOJdEXvZTlAod0wuLR4IFxwNPgZ1 9VkCfjTgsjA5sX9PXNGUIGRq8eeZy8AmxzlGngA3qVmYbOs9kYQnLGGBObsEu5CQ s5fIhTMQxbIZmVFsQ5qrefdStX/jA0mwsmssf/IiJXrkTm+2YowWADSz93rexrON 8ByU9iaeRmA9L4XeIAIPO0zxwqLzm31sW7hAqSjzOcX9s4ZnYya9+itn/8/cyzjl 4rhJK32VJyIb4bf82CsASS3YUfvpC01cGfnCLX5fUYydoT78EoVasOWi4PgHF103 R/mAEtdaoTAUaIjaK1oZVyAaE0X7QHegyrG64vNA8P/9dwWfRw/lNC2eJV6lIBPY JdIWfOkdGWUhYGHzWbVQyOEhBawO6ZINjwf3cyuZhGJaNaSNjlu4LQZt57cXFj8H L0zw53nkNi2AZ5IZvBbxkxaLW0rH5JEw0b9Tl0AzADrd Use i_blockmask() to simplify code. Signed-off-by: Yangtao Li --- v3: -none v2: -convert to i_blockmask() fs/gfs2/bmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index eedf6926c652..1c6874b3851a 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -960,7 +960,7 @@ static struct folio * gfs2_iomap_get_folio(struct iomap_iter *iter, loff_t pos, unsigned len) { struct inode *inode = iter->inode; - unsigned int blockmask = i_blocksize(inode) - 1; + unsigned int blockmask = i_blockmask(inode); struct gfs2_sbd *sdp = GFS2_SB(inode); unsigned int blocks; struct folio *folio; From patchwork Thu Mar 9 15:21:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13184370 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 aib29ajc253.phx1.oracleemaildelivery.com (aib29ajc253.phx1.oracleemaildelivery.com [192.29.103.253]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3CEF7C77B70 for ; Wed, 22 Mar 2023 17:03:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=oss-phx-1109; d=oss.oracle.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=VV5ycL/rrzfz40VhLSzUmLD9xTPEt4U/sG+Hr4/L+XM=; b=QOqen7LAtcVsWgF2SFLnVyfbwDgL5VpsbQoBcyFTnes2/Mn4TadxQvJwlV6zgnOzGd5l0RfczXid pFmZHTWVGwr1dtnnjz1gGhVesYpW+zbZh0YjpF8IgYU2nPyD6i5K5j9vfeyWU4wdAzfdgmbJBTpH 0KFd7nuzafdTXlwFtxOVf+oGXdCY+a0ZvbFu1+iTIXvV7TYwiaFmYtSyUlMdJm1A+9iZtoqWlX5u lkITXwEohfYf9ZqH5HH7U/J/gzCaJEz9aRMlz/uJVHZodKhPBtWyrfHreexRoy9RxMENutHECSyt YjNsbgNcjF0oEmPf5Da275Wa1EI+9GGSiGmTAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=prod-phx-20191217; d=phx1.rp.oracleemaildelivery.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=VV5ycL/rrzfz40VhLSzUmLD9xTPEt4U/sG+Hr4/L+XM=; b=BiNfn3tyyGG0Ha9SDrvsID9u2aO/RUdmrRcLtoH/qKhC/GqIkalU9zG4f5+DpOKX3pTTrC70gjFA zEa3wr2cRNwxhECzlXnm4OE9e6UsgVJPlVhBd9MCMj05Q+dxQ8I/0hy+zKSKeUJqtJKjzaXANTQ0 l4Y4/VfFYIcE7+24Oh8t10K7EtzFxWzvLOVTkMbf6tj521QE8GT5+36NsPGFe7Lg8AZzqQiwhewM 1YN/kQ6GROHAZVyapYNFL+04XCD576hPUF8w7DVSX6aREMUASOBEELB1NeaGQ7/XyRIVda4Wehi1 XzWy+Ib3sGwZNZRhTMTNMJ4IR7VSIVpB5l0axA== Received: by omta-ad3-fd1-302-us-phoenix-1.omtaad3.vcndpphx.oraclevcn.com (Oracle Communications Messaging Server 8.1.0.1.20230214 64bit (built Feb 14 2023)) with ESMTPS id <0RRX00C12M17MR20@omta-ad3-fd1-302-us-phoenix-1.omtaad3.vcndpphx.oraclevcn.com> for ocfs2-devel@archiver.kernel.org; Wed, 22 Mar 2023 17:03:07 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fcE/kJOhXB5/1pcmhSTwMa833IWizB4BGSF1LfwQVo70NFrxvYYBuSEt4pyfvYG0TUtIz0sfJLaIjz6JsuI3fDM0AlX56wDcFqhPYKeR65U0ubfrhXfzKAyG7acBsnicfMjpAgu+ZrdQND+lHVaX0ygig8u1/RwAO1rJAwxkcXg70twWebrAhOc6NFzpQr+u4pzzygukujc5zHRLZ47PZUAOr5lFLUrJC2POc6Sf1iqd4d+9nrnOMxBs3naGiTCp2ufhi+xVX1cWnb1p1ZXtyx9iMTQUuNSXa8MgWGVLpryCaKTDp6ppq5/mpSZQj1s5E410JOdxZ/p6Pk8vTV++6Q== 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=G74P5nAgOBnT3973GEAuaWOahRROTtd9l+A09L6rMFE=; b=P1X1yguHqbUjxZC3QWtYQ4aYSQCQieiQ4MH9oYVuT1iRnTsxUt3klB68e9qW7bSLx6sLHC8Kr5GlOUukPUMDKrXyuC6R5Q4m4I/H5+G7+p51nSBCSR58Sp2r6My0/ElIZC1e5/S1+fr5zQnTJEoBFiNlTOK0InHlpQAcq6UJjB2mUb+9ulAiZqQKf9ZA0gczBa03OZ17H0CpDH5nRa9CKEYe65ChhaZJCRKcQuiHUFKVw00RJeRKCVsampITeR8IZMg97MqXQSg7eJ2ZBTySKFIa2Azft9UNsxBgUU8VLvkn11s5OuvoHIEJgFSvdi7th67ozCMasEV81twc7a2Lkw== 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=G74P5nAgOBnT3973GEAuaWOahRROTtd9l+A09L6rMFE=; b=rAZE++Nip+T3xmn38Yj02pSeIhjtUtUNKbbaQq3fNVaeb7acz9fUbmqAtdWuGHhSCPNfciVwlP72UGZdUFIdEXPJydraUIgtjfVGeZTNEHs8Rk/y1atVqN+wC99w2am0WVnXyitLEQzQqR+XIO6E373/CUhKmkC2lTzquA66QtiMayyNRv8T+hrtjzG0j5eaFAtkyCa/SBmD1SVvtGZmYMI9M6IxjX+JHLToZM2XCLOGeG/WqPngz+hfKEDl1B3iE9/KZ41JaGqDwcre5R9BT4uru1YZRZC99h0LfunHdhFzfnYzK9WBeVv+XuwSLmROAUn1sKlJ+rKm6XuQIZkwwA== 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 Date: Thu, 9 Mar 2023 23:21:25 +0800 Message-id: <20230309152127.41427-4-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-reply-to: <20230309152127.41427-1-frank.li@vivo.com> References: <20230309152127.41427-1-frank.li@vivo.com> MIME-version: 1.0 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)(366004)(136003)(396003)(376002)(346002)(39860400002)(451199018)(316002)(36756003)(921005)(86362001)(38350700002)(38100700002)(1076003)(6506007)(26005)(107886003)(6512007)(83380400001)(6666004)(186003)(2616005)(8936002)(5660300002)(6486002)(478600001)(7416002)(52116002)(41300700001)(4744005)(66946007)(2906002)(66556008)(8676002)(4326008)(66476007); DIR:OUT; SFP:1102; X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2023 15:22:16.7352 (UTC) X-Source-IP: 40.107.255.118 X-Proofpoint-Virus-Version: vendor=nai engine=6500 definitions=10643 signatures=596816 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 impostorscore=0 mlxscore=0 suspectscore=0 bulkscore=0 priorityscore=120 malwarescore=0 mlxlogscore=714 adultscore=0 clxscore=85 phishscore=0 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303090121 domainage_hfrom=9102 Cc: Yangtao Li , linux-kernel@vger.kernel.org, cluster-devel@redhat.com, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-erofs@lists.ozlabs.org, ocfs2-devel@oss.oracle.com Subject: [Ocfs2-devel] [PATCH v3 4/6] ext4: convert to use i_blockmask() X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Yangtao Li via Ocfs2-devel Reply-to: Yangtao Li Content-type: text/plain; charset="us-ascii" Content-transfer-encoding: 7bit Errors-to: ocfs2-devel-bounces@oss.oracle.com X-ClientProxiedBy: SG2PR04CA0168.apcprd04.prod.outlook.com (2603:1096:4::30) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB4073:EE_ X-MS-Office365-Filtering-Correlation-Id: 56a97193-f5e8-4681-cf1e-08db20b21104 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: au3ShEGDkB+EJng6ExCV4irih+z00QukWDh7Spxuy8qWzB/QKoK+CueEysS5/nkcABEu97dp/Qs1ayTZzhXvAsz9S9kDnJ9o4/dHCcLL6dw9SPf5Hh4swt8uLkao+3K7S5wwcpy1DLk4a8xtZArks1bPI5ZMPJeW0haZ57YnTWB0rRqryMEVq6DbIVnurNfBzQ5icFtLdtShWGbEMV43vrusCNvgtnRmBgKF6hE3XyLcbLfKIsz37ZcF+EChLDwf4/OCehLxwb21SCfphgueLuG74tRWKFUvywa+oU7Eb2NTNexAR+jwYzyX6c2TgKlLPmcYXDhfrCPNyGCrLOKYBNV8vBQvl89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yu6z0ICD6EldkLMCYdO4vAraojnLG49+FLyfnDY/MevPee1VucvV8IyflvFHGBdzNExocAcVb8zsKQzmDSd6GECRF+l7RwdXSKiJS3XBNs+5JpPU4Q6tQSboOCFBtrDsQs1YxmzNyh2lbHkmINO8qzLygGxfx9I6LoOdHuSZS8zP15AiGVP+WAR+XunpUFlIGjOtR7O+9zXE8G/vCGA/6/VN3h06M/c3SAbViv49673AZkrR+lz8s13DFp2wNNb1xKH2IFYdvoZsY1aK8DODNZgrcyZ3OlQ8Ds6hL43wzmloQ8POFYZORU76s8qjE/BJxMXzU0FmAipxJ5xdsvp0BL5j5idevrrzlB8x6ECMKVY//n+MaxbJbsFm3b4bBYqYS570X7nkjw6UB5+mwdst05L4wRyJb3NZdfLETRhPX+AeNQB6VtC12p9L/tbcFW3e96ZLl4BZUf5G5wtjAzEfcGXs8kof5NnwBllBj0eXjPZXYUk1RV56BD9RzUC+5PBkY0fi6uZ7Iiis3nwEfZEfG1BynaQ58PRRALgKZZmaQ+IwMSO7ZRM8aBhR/PVm3f11wFnYJXlkcP+SLUIMEZddiGZtu1R4noim9VD0i1NORnPcq40+XOzKIDox9R3kiUx1O/r49xPnUCBcnGjxlChXnd/NJLAxIizoHT+bFdVp+ZKBfc8KsXg65Zui7vsYSmzn1rbWmPUgD21S1ab33ztL3fOsc88aUqYm/Z4V+A/DIjSyy7fWgSrwQVmsVwItUsU6v5AOMTSHiiZPME3doyCBxlVFwF3/m8L905Shz1ViGPUB9P6k7J85M6sYM++MuTYjzZd1nB2kfmRN+dL3OAwlAHyfPv3eSHnYzq+IUKxfuPhjA0JMFnciEOGmmBvrX7K9AAf+3b12H6LUMdpFjVEiMj2gVyrZtvXG7c0xlQiWx1yN5eil2jKEmXjrQY2L8XQIegV7cGVmF X-MS-Exchange-CrossTenant-Network-Message-Id: 56a97193-f5e8-4681-cf1e-08db20b21104 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal 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: faSx+15nOOVnxKx09cjuIr/fJZJg5x4PEYIAtclVHogsw9WqPzeR+hciF7EE/sTXuOlHCF7Jw70/lfFxIfKYDg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4073 X-ServerName: mail-psaapc01on2118.outbound.protection.outlook.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 include:spf.protection.outlook.com -all X-Spam: Clean X-Proofpoint-GUID: eXqYtKh7AEgxGTmWqhnolBQ1LZIm0nzy X-Proofpoint-ORIG-GUID: eXqYtKh7AEgxGTmWqhnolBQ1LZIm0nzy X-Mailman-Approved-At: Wed, 22 Mar 2023 17:03:04 +0000 Reporting-Meta: AAFlzmelxJYUdzSHAgGvziIcTlKXWfVv6VJzwfs81Z/WOU2w9Zp5jRQAyHpQ8EHf e3nAvPsXt2282S03ZKlutNmSV/lARUO4WGgSpXUoWsnsT5zcfyHAqQThJq8U6CHY gmH/yZG9j8J7kEDreRUS66fUpA58PnyTowLaBEh0s/l/eQ22/OKbfb8qoDEniPUI D49H8VmYiZ2/na6213TioXjXOuZXWDpMwV7eEt+cghPD2ILHjd/FZP7V0+xlApjq va9hvTzHod1T/wJKQAS66A0vxLrIx+fINfoS4I4cQaLpuC4IPLVU9Zv/GO2vsJbJ QFyZKGFkPjYWtUSMgnY3zm/iycNuD+t3We81AhTWU8kksP6l4T3szYYBGLvnG2Jc f2HqrQtfWqVR0ygvcACbgaVn+sU2OsQSLLlE+H0/4cMU6LsxjYaYSPkCUEYRXyHu ss/0l/H9WqWU2CPmbMmF4vQgiueGlvADZPZp0fK16xbkOuAGecXvdXt1MH6ATWAv 0LaK9qqpyTqI2QtXbKIG5AhgkXM4fFL4I2J7r3Zd3Jt6 Use i_blockmask() to simplify code. Signed-off-by: Yangtao Li --- v3: -none v2: -convert to i_blockmask() fs/ext4/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index d251d705c276..eec36520e5e9 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -2218,7 +2218,7 @@ static int mpage_process_page_bufs(struct mpage_da_data *mpd, { struct inode *inode = mpd->inode; int err; - ext4_lblk_t blocks = (i_size_read(inode) + i_blocksize(inode) - 1) + ext4_lblk_t blocks = (i_size_read(inode) + i_blockmask(inode)) >> inode->i_blkbits; if (ext4_verity_in_progress(inode)) From patchwork Thu Mar 9 15:21:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13184368 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 aib29ajc251.phx1.oracleemaildelivery.com (aib29ajc251.phx1.oracleemaildelivery.com [192.29.103.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 74CA9C77B77 for ; Wed, 22 Mar 2023 17:03:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=oss-phx-1109; d=oss.oracle.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=0UqBlUdkZ4IvlaDX6Is2GTZxkpci9m2xfr1EuYXa3C4=; b=iyWoQZyS85okgvek1R+kmh9r6uPIi8OKL5mS+6aXEQy/IH5bQyL6Tj2BqmkC8JxIpZ43DzYQ6M/C Il0L0MYJespJMvI3xf3OX7tlnq+0wbnfavi6BSC+LoVdkqLIZCP+K1mZeGw7Ahgn+eHxudGqjjKt xJlwFZCH0IkC+2gIBI/V+XGRQ/zBvk9n7skvpgT1USkkmoqSoTwKt74zSDbRxiy4nqnBJ6ERqEDg JYTTLATDE8qio4PxOy8J9Wq9mH9MThdUfUUALuXRnGieu7eZw24VgptdB7jAPmVt0korCvlL6Kk1 6WS93XqzDLefqB7FiQoMvIgua+XL9o/6KF6cVw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=prod-phx-20191217; d=phx1.rp.oracleemaildelivery.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=0UqBlUdkZ4IvlaDX6Is2GTZxkpci9m2xfr1EuYXa3C4=; b=Iw78HKbYssJiekCt4Xyd3e2m3P0cZuJrgj/rysrE1nGr0vTDRRf0E6AMblRDIk1JjIp4rqMcITWA NFxlwbYrVA2YydUV8/h7QF4UEOiRyZI4OMnnfL+J09OzB5yg6JjgH62Vov/AoiFo5AgE1dx3gH6W og/+gfGblyKEDEfgLC7eRIUu+a3+oMtcBsjpnFNp9SoIC38s5CgOShihmEUOKVJeBhRsSuE1KgEq kEsR5BD3RpfG7+Ph12PPhSwcC79gWXuvePnKcEBRSFO1hBX1se7jLdCZsxbOsajFYBWVkYsQDbdf igCXxE2h/oK+zcJEMXI7tMtQFrvnGDfjgCDLag== Received: by omta-ad2-fd3-202-us-phoenix-1.omtaad2.vcndpphx.oraclevcn.com (Oracle Communications Messaging Server 8.1.0.1.20230214 64bit (built Feb 14 2023)) with ESMTPS id <0RRX001WLM17CC60@omta-ad2-fd3-202-us-phoenix-1.omtaad2.vcndpphx.oraclevcn.com> for ocfs2-devel@archiver.kernel.org; Wed, 22 Mar 2023 17:03:07 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U7pZHpOASzuOzmN510M7cBLn5DREd2+EAVY7KSRPJqXWaVQSt6XApt4R0DyPer1CmdfWPIFdAJpqIbZ9tlv0/OGeF3sujj6UC/vBeABo36CmcuzvLBnIyD9yEPhNH4R6X1owRvACDT8p2QqZGl2cYRRbDEuV416vZdAoszMk4DYsQJSztk2FLriId/0+QShVpp7wmzYF54oOFx1cOHMHZZZNBwWcyLwzkJS8vd7fPI6rdlUwJJUURRWr5WOmUe3I/ehjhyg3ICuBSxWS+NFuvtiUSLji24P7plUsIuWGwiajBJoIe1seNpwfqQyiYO9Px51Er2DLjufmA1HZlg5qQQ== 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=LvVQHptGy31XI17r+72sjhblJuxhfdQF7kdWesGYqM4=; b=da645OWWbUeNb5LMqpvAILCRX7m7PNr74yt3GmFuGZuC9DgcaA9MU27l0nVnz381OEGulcQvkwJwNbH+g85M8GaB+D4+FcnrG+GX9hRNUV08L2uu3Bm/wDxWjqTbw7h0gonHrgYk0gKSdKRkR2MmZ0+Baz62tyrtRbKqVvls5U5x7LjqPDCxYgfpPok1GKjlgKyRoWWmTRnLtSnI3+cDfP8ffjglnTnEKCAfhJOqGPyuvNpH5drNaz7LtA0+viMz1Qbtj2PWxCqdjSBFEdP6o1L0+xFl1Fe5FwVxH0nVPTpBKkZ1t5ut5mYIc+A98Hs/iEx1dJBrrFgfKS7miQXc3Q== 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=LvVQHptGy31XI17r+72sjhblJuxhfdQF7kdWesGYqM4=; b=YWKK7h6xs4nMPveucItlGK8+U6IcHvpat+StKXJfKwtZOICYUycff/Dzc8AkEazv6dBr719eIMnTvdFxz71xDAm0eqGpnSRrU1y8ILp1Qh7gN7Qe33qLqutwKfCKrDy7ISvnKHym7tWA/n5WZccYNWL+RMP7XwagNtaNBQjQmN5SertXj+aa9/lwiFiPMBHicSJRUljlOUqaoBeUyHdIkJ1/IxdtZhVmfkN52ruYX6TTdbj//oaRVEIAz6cubsAnzAxMGZg4hcCQU5iEDY1FubXTwNmaaRdwOvUxcj/IRFLjFJfRn7TGZqP0d4k76n7jhMMTLYSFNxZvOIp8o7Po7Q== 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 Date: Thu, 9 Mar 2023 23:21:26 +0800 Message-id: <20230309152127.41427-5-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-reply-to: <20230309152127.41427-1-frank.li@vivo.com> References: <20230309152127.41427-1-frank.li@vivo.com> MIME-version: 1.0 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)(366004)(136003)(396003)(376002)(346002)(39860400002)(451199018)(316002)(36756003)(921005)(86362001)(38350700002)(38100700002)(1076003)(6506007)(26005)(107886003)(6512007)(83380400001)(186003)(2616005)(8936002)(5660300002)(6486002)(478600001)(7416002)(52116002)(41300700001)(4744005)(66946007)(2906002)(66556008)(8676002)(4326008)(66476007); DIR:OUT; SFP:1102; X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2023 15:22:20.0920 (UTC) X-Source-IP: 40.107.255.90 X-Proofpoint-Virus-Version: vendor=nai engine=6500 definitions=10643 signatures=596816 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 impostorscore=0 mlxscore=0 suspectscore=0 bulkscore=0 priorityscore=148 malwarescore=0 mlxlogscore=903 adultscore=0 clxscore=104 phishscore=0 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303090121 domainage_hfrom=9102 Cc: Yangtao Li , linux-kernel@vger.kernel.org, cluster-devel@redhat.com, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-erofs@lists.ozlabs.org, ocfs2-devel@oss.oracle.com Subject: [Ocfs2-devel] [PATCH v3 5/6] ocfs2: convert to use i_blockmask() X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Yangtao Li via Ocfs2-devel Reply-to: Yangtao Li Content-type: text/plain; charset="us-ascii" Content-transfer-encoding: 7bit Errors-to: ocfs2-devel-bounces@oss.oracle.com X-ClientProxiedBy: SG2PR04CA0168.apcprd04.prod.outlook.com (2603:1096:4::30) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB4073:EE_ X-MS-Office365-Filtering-Correlation-Id: 043794d5-fc6b-4b0d-6678-08db20b21307 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zB6/i5Ksh0zI4+rKooh0sNe8ZJMxEIXigfwrfaHKXGYw3SMk4fYCEsAZL2Bp12KI+OGb0Nsdj8NoG/yMPwQNKFRcH61xAs1uzNXblxvrITFrXsawQ0KCdWJ+8Zgk029xSWpJHxZX0BYMHPWmYAL4cjvXtTqby4Z+klBDWi46zIsBPu496JZ1YAv8OCdpj9MG6Wb3fValyFPKszrvAzLQ/hpJ9RZ2SKmAdcUui4mo3J/oU+QlZZxlGfMZodV23sHvbVLSo7DY4G9GS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: 043794d5-fc6b-4b0d-6678-08db20b21307 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal 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: sthvx/GZxh7zB21B6xH2rrvnX4bQ2COITDPfDBEiKOHe2U5sxTv4WudiIMztiuh8W/BSZFLKqj3eikuhQTlw8g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4073 X-ServerName: mail-psaapc01on2090.outbound.protection.outlook.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 include:spf.protection.outlook.com -all X-Spam: Clean X-Proofpoint-GUID: qrKuZCnFf1E6J5iNgkv-W2IFVnZW0Hhn X-Proofpoint-ORIG-GUID: qrKuZCnFf1E6J5iNgkv-W2IFVnZW0Hhn X-Mailman-Approved-At: Wed, 22 Mar 2023 17:03:04 +0000 Reporting-Meta: AAEjyIuM3P9ITye4kkUPtf5wNbwXGYRAWGIwGs97GuqHNK7Dm0p9J953nv46W1Cm vt+fgQO2kgqXatRd8zNBGLOSZicjPy9B5Ce8uGwHxnYP2Oq0JAveIfHdceEq/SCM er48qizKFPBfjBOPQ+iKGpb6CBhkH5N7tUKjT+6QVeQtzVIEA8SqFvl5bqd60+A+ QvSjUp4ZPHaJ5vcNPimqUzG8YQbDypLcTcd3aPOW8XtS9+FCu0rBbtRqUlsTZc2g hk5av/ztQhw3uELHpgz2BqF64XMC3rbXbcTHnfJ2mF6J4zR+6q9KuqNFbujFRZ1u mdsAJGYLeg0NuSllUPNKIy/RupSNJi9x9wOktNVOBSg5iwWHO5Zao2Jm+JarRUNT xybDvbXmevuwW5Hug6B+H1u85jeeDHRCJ7+tmogBVVisRZY0MIw5L9cO6xseTsJu t+1WFI/dqIaiGBPPfNrrPyI/PNzPPbtMq+CzjeXHN2FAXglV4Q268TeT12ca/GKw rDg0JgvntkeUQRAg5k3r+5dLFywUYfLD7zJ2pwMhjiA/ Use i_blockmask() to simplify code. BTW convert ocfs2_is_io_unaligned to return bool type. Signed-off-by: Yangtao Li --- v3: -none fs/ocfs2/file.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index efb09de4343d..baefab3b12c9 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -2159,14 +2159,14 @@ int ocfs2_check_range_for_refcount(struct inode *inode, loff_t pos, return ret; } -static int ocfs2_is_io_unaligned(struct inode *inode, size_t count, loff_t pos) +static bool ocfs2_is_io_unaligned(struct inode *inode, size_t count, loff_t pos) { - int blockmask = inode->i_sb->s_blocksize - 1; + int blockmask = i_blockmask(inode); loff_t final_size = pos + count; if ((pos & blockmask) || (final_size & blockmask)) - return 1; - return 0; + return true; + return false; } static int ocfs2_inode_lock_for_extent_tree(struct inode *inode, From patchwork Thu Mar 9 15:21:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13184366 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 aib29ajc255.phx1.oracleemaildelivery.com (aib29ajc255.phx1.oracleemaildelivery.com [192.29.103.255]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5EB25C77B75 for ; Wed, 22 Mar 2023 17:03:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=oss-phx-1109; d=oss.oracle.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=67G2oOTv2Ybfl3E3vIT49jrEFsAgJBrTEyWfzVGmbCY=; b=fKgdjfq5wEbXv5JSWeVt533QZWuGUVw49I6UoUbOX8/xz7XCR2yPztOTZJYUQI4SBzs0p9GqH/Wh YZx098Iv6tcXZUXLU6QPjmwuq0erVbr+G3Y29hWnyWIVmDlD4SdrYAeFvYGKz3lSNCQ6xANSFZo4 lhlGuuvdE3b5swnlPN1m9x1p/IN/KHTllaB9z6HVQ9Ud0L8QsoLqRYQYkP0RbeQLJjhEKq3gh5dV 9PArZ/imBY7OBTCmUHkXWOqOTxcCAw65jQ+/8gag4ZABNWUdxsw4hYbuTnjIj0ogAvXjGZ+xtnVk GrDFEJWxyMmc4xghcpUAoPKchwI+QOeQZT1T4A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=prod-phx-20191217; d=phx1.rp.oracleemaildelivery.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=67G2oOTv2Ybfl3E3vIT49jrEFsAgJBrTEyWfzVGmbCY=; b=ABEuEBg6fbKJSXzFZVutHhbMhLsNMa4F0To2iKHi5cVu5NTdGt+b4y6XQX14NxMNhZ8n+a4YD+KI ylepsL//x6/PyyfJcsLDtglPFuTiJ105Ewu9Eb+0LYMlK906weQkQ1gWM8c/xxGNDTaLdjtkqTI4 MtLCzDSc9/QPut+absUrvxT+JMAA6+gUczvZhJ6AObOF9lBnVTuH+A7x6os3ySn+VuPSDpS55kyT PzC5AJojWp5BOYWVTXt4Ls5Li15aesS200vNeTXUqjzfbiv0QYPrYSFMre/qj52selY3CTm8TYvx 0nGq9In5MbhYBwJ2d4x6zleIlaozahENNuekuA== Received: by omta-ad3-fd3-302-us-phoenix-1.omtaad3.vcndpphx.oraclevcn.com (Oracle Communications Messaging Server 8.1.0.1.20230214 64bit (built Feb 14 2023)) with ESMTPS id <0RRX00KC7M171T20@omta-ad3-fd3-302-us-phoenix-1.omtaad3.vcndpphx.oraclevcn.com> for ocfs2-devel@archiver.kernel.org; Wed, 22 Mar 2023 17:03:07 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YhPrJ2u7MfwiDhatX2Gt+Hjw2dVwWlqbbSjceE5z+NvV/ugRufrhTqGx3L0aHZ/MOB8fjs1Uqr162mUwNaG8H+LH3u27yL5R8Kt/mR+o17u88cZ+/Y2hS4j6s7D777B73IeGGn6jtSfIV4d3eNL7SPQiby7H7rypxfv+Z62V7mdIWkWzWHsrukyViP5MTHnkSIngFbN8f6F2SbQL9uRj9w66FqAExV9FowPNqIh9PFStioAYRCs4IvoH6CXNGIgS3iAA9aMefxDVW6qeFDCb5BoZkG/Nfec2mEI4T9RWGgV0lU709CqYu5LVdS4yZutMGLyqRKwt3CnnGDBtDbs5xA== 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=jGyFWvLSoU+2mZB6+yv46/cKOs/G2aGN6o/I+8yE17w=; b=oMH8TD1bangGMdN1R/mOeBSkFZrGddk+b47R44yo7kSaSqJS0W9xs0lfUsgAquOXqJBt8DPs3qKW3K6cBMoCb1LgKOldon9sfPf9waY1kL0W4sm5vvtPUg5tGxCzbl5vIz75ccvyhSz8e2M12twg/o+I7Ic78G86MYN7rHefKiv9YhOeJOgg8Z5LBqkjvhk6FeD9oUnjQFNtTOaizPP3u7I26F6+TZKWfqgY4nMdO3fjrddFwZ6diEAoR85sANsZTaMxne1uv6tyql1Mq/uc68+P/eNkzpjQQbWAFT7SBuYD3AveU4pZNkdYkd4QugJtfPxG1YjqrjnuagebzTMTyA== 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=jGyFWvLSoU+2mZB6+yv46/cKOs/G2aGN6o/I+8yE17w=; b=gbsRCcHS67RA3jsVpo98DqoQo+E1rTaJiWplWrETQ9aI3zbSB0Bgb0jZ5sngjknsZCCR8dYmtWuvUv9jdcijDHQzNxdSYl2Uh70O25U5cD0EvPKwO3RdaygU5WmoEcqVaygXmqULDL+W6JQIwRPy6X0n9o5bPQZ+bG1S3tzNrsrXNaSoe5fxmWlvlZIeOEfMnTEt5jqLQVM9/WsLExc4/Qbi2gkR5t+446MZ5F6A1erzJnZC9torbra/6uEZjYJ9MfeS9CVniBWNftTIUO9Bs902yt4eQdSZrtJ6KyK5joATbc8QSeGa0nPpe6+CTXwWO3nd1MYd/4vACJ8B79SqVg== 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 Date: Thu, 9 Mar 2023 23:21:27 +0800 Message-id: <20230309152127.41427-6-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-reply-to: <20230309152127.41427-1-frank.li@vivo.com> References: <20230309152127.41427-1-frank.li@vivo.com> MIME-version: 1.0 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)(366004)(136003)(396003)(376002)(346002)(39860400002)(451199018)(316002)(36756003)(921005)(86362001)(38350700002)(38100700002)(1076003)(6506007)(26005)(107886003)(6512007)(83380400001)(186003)(2616005)(8936002)(5660300002)(6486002)(478600001)(7416002)(52116002)(41300700001)(4744005)(66946007)(2906002)(66556008)(8676002)(4326008)(66476007); DIR:OUT; SFP:1102; X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2023 15:22:23.4185 (UTC) X-Source-IP: 40.107.255.90 X-Proofpoint-Virus-Version: vendor=nai engine=6500 definitions=10643 signatures=596816 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 impostorscore=0 mlxscore=0 suspectscore=0 bulkscore=0 priorityscore=148 malwarescore=0 mlxlogscore=729 adultscore=0 clxscore=104 phishscore=0 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303090121 domainage_hfrom=9102 Cc: Yangtao Li , linux-kernel@vger.kernel.org, cluster-devel@redhat.com, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-erofs@lists.ozlabs.org, ocfs2-devel@oss.oracle.com Subject: [Ocfs2-devel] [PATCH v3 6/6] fs/remap_range: convert to use i_blockmask() X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Yangtao Li via Ocfs2-devel Reply-to: Yangtao Li Content-type: text/plain; charset="us-ascii" Content-transfer-encoding: 7bit Errors-to: ocfs2-devel-bounces@oss.oracle.com X-ClientProxiedBy: SG2PR04CA0168.apcprd04.prod.outlook.com (2603:1096:4::30) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB4073:EE_ X-MS-Office365-Filtering-Correlation-Id: c0c74165-0494-4652-fce9-08db20b21502 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MRTfHU0Gm1HEODi3Ljfa6O9bH5g3gFJJw2IY9HPW3uhYS8xluR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PqHc9sN48rVME6aTQvbNcC2QmCDm20j7ZOjDrjzaFcTrFLBuHuuWwShq4s7bmbGn7NbsqO/RRwAKr/FBBXojj4BuYH7HRtcfobHkefrf0T4NODyzQVxlDJtiqS84ymvXKHVag4LBTuZukjiCevVx/NkjP1xoHu5Ng2KP/purCpeuOBSDqha2Vohb96UInTivnktiMxiGg4kdvj9zWJC49ddJeXAquSur X-MS-Exchange-CrossTenant-Network-Message-Id: c0c74165-0494-4652-fce9-08db20b21502 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal 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: nwLsINpxtBm3ouemSErTJcMc5WkWVEC2EPQ7vFF10iaOcViQfcsG/LK6F48BJHDGgzO1bs6r1O7WX1uk5r9g4Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4073 X-ServerName: mail-psaapc01on2090.outbound.protection.outlook.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 include:spf.protection.outlook.com -all X-Spam: Clean X-Proofpoint-GUID: AQO-EoX_T7n86YcEO-8XQRbeo3wn4iN_ X-Proofpoint-ORIG-GUID: AQO-EoX_T7n86YcEO-8XQRbeo3wn4iN_ X-Mailman-Approved-At: Wed, 22 Mar 2023 17:03:04 +0000 Reporting-Meta: AAGIXGW8tpGQvTDhWFyEz5/PE0jOWupXW3pbo285PXFPHDoF7LgnBMQq11spRstu 2CBQpByeF0XCtrgxMmZQuPBumToE12CzI/TBZjyjDyjQe84VZGmrNsWk4cn3C4+T v9W/++sYtIOsvAoJsg9Er7t/WOrfqByuENzutP1vZ+F1CjEgoLRNWenrmG56T6ID rCFNJARG/qXhEdS01KZ8TQ+wHx36E533fAw8mP5vEynvw+gOJz2G+rDYQHH3jf1S mnZv6FF5TRD8jETPTTqkE3X0iawDVrhDF/KVWqkf7lpE5BwfVxVq6ZCXkPJWtPog 81KAT1tkBIvXPaVWSWZ7mkr87G49Ur3SllZ3lOV0OZhNXu9sRurNrWSmvEZhN4PC RZT25NAJASKvaVkgXDvizJALdWM8oCDHZmefS7oslRV4BGFpyxN+JHVQbI/KWd/W pHPKNvLJRIzhiHmnS+LrGamoHoDgPPvcEk9hWuFManryaYxFaFl83HpafsMIEq6+ rQl4N8J6QI3YVCrcsRCmB6FUEEHFPMde3Ja8656AHlKK Use i_blockmask() to simplify code. Signed-off-by: Yangtao Li --- fs/remap_range.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/remap_range.c b/fs/remap_range.c index 1331a890f2f2..7a524b620e7d 100644 --- a/fs/remap_range.c +++ b/fs/remap_range.c @@ -127,7 +127,7 @@ static int generic_remap_check_len(struct inode *inode_in, loff_t *len, unsigned int remap_flags) { - u64 blkmask = i_blocksize(inode_in) - 1; + u64 blkmask = i_blockmask(inode_in); loff_t new_len = *len; if ((*len & blkmask) == 0)