From patchwork Fri Mar 10 05:48: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: 13184374 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 aib29ajc252.phx1.oracleemaildelivery.com (aib29ajc252.phx1.oracleemaildelivery.com [192.29.103.252]) (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 0DCCCC77B7B for ; Wed, 22 Mar 2023 17:03:09 +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=LhR8lCA+lady2of9+WSHc55CYTm9qTX4bzoV0KL70JU=; b=C5n0nL3FU05pXUyrm78vR4qTCaESXrvYpRKOuqsRBhlF8fb3+iYhAW8a93yqUco+RxxgwNNeWDt8 FQh1yDfnPLz0aBjG6YEHevoFYUWiyCGuZfuWjA/s/ASvChNFkOVxdLg9unEVeRMNrnbqBnYdFn8a KKXhunHWqB5TN5gOHuykMBmki+aHt9FVnvO1ONPSji2TSV99iAeHFf52IBW2ilygfVl2ELGOXaOA abZrEZW3NsiQ2Q4gppEcFdu2P0i5w685brnNfbexRuKYo3Vd45sWV9rQdAGLOtLGMW1PBLsl9NI2 kJS+zuwOM55T2jdnc2iy9KDDc7AzbGFNPAEdtA== 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=LhR8lCA+lady2of9+WSHc55CYTm9qTX4bzoV0KL70JU=; b=fr1DfDpsyXicFd4PJTTW1SBK8Y15maGyWnenx3ccTQNdRXYM475c7VoAmPUmuEcZaKiRI/oO2PwD 2h/LY+6x45q+jS0CrwX/0q5QD8v/v9j/iQZK5Y8A5XqshAlMUouha6XiBFeroZnnIE3ISErZcN1i Zrd/Ga4VAUliIDhfX6qjvmCCMXMsSkZ4TsshV4wxncAftW6PiWq7XJGb9pPiHBIfyWFBZ1OiK4hh z46RWPLGwdeHolJtdhFTBL1N9mKu7b/7RSic9GQQP7gSw369XrItV/zxbiTM5TEXOsuhVn+Ry7rX OF9prWSmh8g4qm+0hQUuYoJyot9zkOkymwxq2Q== Received: by omta-ad3-fd1-301-us-phoenix-1.omtaad3.vcndpphx.oraclevcn.com (Oracle Communications Messaging Server 8.1.0.1.20230214 64bit (built Feb 14 2023)) with ESMTPS id <0RRX00NB2M185CC0@omta-ad3-fd1-301-us-phoenix-1.omtaad3.vcndpphx.oraclevcn.com> for ocfs2-devel@archiver.kernel.org; Wed, 22 Mar 2023 17:03:08 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RwkRTiksMlNNeCiakrmb83uKXGeusGyimWPUXjJ3mO+HGrSuOJTs/ZY0dHCxieMNEUJ/7byyMduQneVy8ErbqnfjF78/AWF8LzRgy5DWyVOV9jx7nZT1ZxwktNJZ1sa0eQtVO7SUyvLuhTtxAVGcV+APm1ZMci/Mo6ir43Z4qh16e3q0pwP43zt36qnKIzdftSl9WhOuVaqBuwgZhHc5MXQHUNGEhLKWmPVtOuFycTmId18Y5kG9l/vpLil76rhrX14AXy8475uoHiuI0OK2bGTerrc4HkogaHy5TwKyBBzfCe94rVL/vcEeo2sZKNPjf3m8+YF6tlin1CWq8a1MEg== 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=3TAffNeOIPDXwmJpJmg+oAqVVOrB+2BtWDSDZs2nixE=; b=hi1wUju2c9ZwhegyrxrDv+F3AlPk2VxMa2fDoHB1ZMgRkezMKQ7a1LDcNtMTw90Klqvm5s714/R4EOi3VdjVnnoffQcnA8S4X44/3QXXn4PllcckrJYqNuKhyRDyVZLeP+Ea4RgmTvNdbcLKu+Ji/lMekPngutZisZMrva/apLWXo23jzvWQ5INVU1x9VTpU6pMSpB4SqR26+P48SBNf+enqlXWT+d6eAW1yfUDywlZ29x6MRrE6GgvP55cGTgQAlSVL+xorJpLhFiYrWIXoaRFWgHZVto+acxfOr51f8MVk0hPNd6q+yzXkgrrPQlSsUACt4bgQqNaXjnt48V/4XA== 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=3TAffNeOIPDXwmJpJmg+oAqVVOrB+2BtWDSDZs2nixE=; b=PnMuaBEzswFltY0fcHXCO7pPnp2DZKrwcx9UR8s3y/hHG+l3R3mR87q7uY/aq/beKl+R8Ukf9KNVZUecw3zbIzerPjQNAdnnIUOmgyFqf92h4k2J/dm2Ov+dNPYt5KMHYiShkTjQCodOHTR4eKQIQqUfjAG0mw9spF8vz5Nm1naJOFmE0h4oUP+7kNNCHCceFlfmabY9bwW42v+TSa44BL+J10FEa1av0VDl+u9R8TWv+MNBfDd3/sahso0m1U/yhQ15bK9fnwJsUxx9pgoeIH3PkUVHP6TuT5ptWUg047+YC5dGWQ5A67HUYCoOSIXTN1YwGV6SqZwBEYsnmU20Yw== 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: Fri, 10 Mar 2023 13:48:25 +0800 Message-id: <20230310054829.4241-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)(346002)(376002)(39850400004)(136003)(396003)(366004)(451199018)(52116002)(6486002)(1076003)(26005)(6506007)(6666004)(6512007)(107886003)(186003)(4744005)(41300700001)(66946007)(66476007)(66556008)(4326008)(8676002)(7416002)(8936002)(5660300002)(86362001)(2906002)(36756003)(316002)(478600001)(921005)(83380400001)(38100700002)(38350700002)(2616005); DIR:OUT; SFP:1102; X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2023 05:49:05.6408 (UTC) X-Source-IP: 40.107.117.108 X-Proofpoint-Virus-Version: vendor=nai engine=6500 definitions=10644 signatures=596816 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 phishscore=0 bulkscore=0 malwarescore=0 clxscore=110 mlxlogscore=711 impostorscore=0 spamscore=0 mlxscore=0 priorityscore=130 suspectscore=0 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303100045 domainage_hfrom=9103 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 v4 1/5] 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: SI2PR04CA0006.apcprd04.prod.outlook.com (2603:1096:4:197::13) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB6023:EE_ X-MS-Office365-Filtering-Correlation-Id: f656adcf-6898-4ad5-6580-08db212b28c0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: q5loVG/P0L8dPSpzK4iqHvOo3G3acBqRX7+o4Q0X6w8SrT+S8DT8na1IHtp+t0Nd0a+KxLiV/YGfQBZBFl8JeQ4YeCp13xBXGrq8xjrREtuRmG6rp9IcAcRjWVWeNrH27dHIsEsz4Qbcvi2thbipeWR2MlZKEhkGXhl4YUcwZQCrD4OCg78xMofqdo9dQhIRc2HFF27RX/xkaKZGE0RBIU4sH9au2kaUEHGnioNyJS2VFnH//IGT82dUP1IkqBEWuar/Tzudp8lWOz+0xQaem2kEdOI2Gu7TQ3EGcYoK+TjxZnfQ45sJ4FU5V0LLhBsDslIOLUrb2KCFiuh3WEn174RJR90kXavhQ11Q4qztfm0d69QVt3ZvGL8KcEGEts1La2sr5kx9xzaHrHU0w+xrD0TwcRVCwe3IXp7oUSmBWAVJtU/rVM2kWkYrWDEc+j27xm5/YfVse8HC/2oTTPag+dlg+CqigwQTHaGZ/FgpCRSUUlhkh2lVBDlZDH54lSiiE/BPFd4VWyU8vgcNlC5+psPv+yVDf5rO4RtMFZMEazHxiKPZJmVRO5dtFsX4erUOkmTvpZtWwMa6SLc46Yi61wu1vIDrzVDxQfrNYBeGxPKUtKJaY3q2TYO7mWcK+/EU6vWHS+YAjowY5R/3CAxJ29tpTidrDY1hE/2qGcMA/i9fhsTXAb5CQws5POwxWlcKN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260X+8UyVLTcsATP6y9MrhbP6xY/m4SNERB8R1fGVt3J59j/nGGuyRwRgCKUaY0i3QAkVPXCfP7rrvAuNPiUN8NgbOyb4v2G45Ow08ZBtMUOQpugU7fg7FEFEQE6AYap2TlKeF0GGC7eUIuNwnuhNerWUdOrXCOEcJ1DHTkzkDceh/gcHn2bEYGxeppiX3jToHz8T6BfCh/+iqmiQwaiQGLyhMy0PRRo45RPFtFyJ8Rwjks5xRrAWRHj6nJpAeDpt+i462y80yje9Cd5WRn1dZi9vUnFBys9tA5/rWziHAe2+3Ppc421RraD1Borf7GHDUSb5PDYuaVNhN1VGcF11AijhZ+Y0rNgUD7FZnZcOVXHwd6Af/086bTtdDaUh8D6fIwoBQePvhW7XntN3BaQeD8lFToPFFI+A2Vj6WSJ8b8Eilh5aIYUPHMsKHfdpMl/zARi/k2FezH8OJgdhcRAFPb0heyF/EOeX2TLusKQHWcWK17l/0E0/pkiX8xi8akjCf7vUXM8xz4oJNpsB4osfWJS/7uBgRB8z9ZvxD3bpjQ2Pce49vpeyJoIF4nUIf4rNXW0250b2EBkBmkDPuA20By6EezsCBfMTa2Cgee4Np7PS X-MS-Exchange-CrossTenant-Network-Message-Id: f656adcf-6898-4ad5-6580-08db212b28c0 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: 8GGE7Fo335S2snThWbu0+AtI41kdP2hhJuIk+9ccCwlb+qS60p9Ofe5+dBMtZRWhKpBx6n8xGTGX62ets8gdCw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB6023 X-ServerName: mail-tyzapc01on2108.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: ocSPzKVQyRTO1zmiRmCFxJUHrpc1OEK7 X-Proofpoint-ORIG-GUID: ocSPzKVQyRTO1zmiRmCFxJUHrpc1OEK7 X-Mailman-Approved-At: Wed, 22 Mar 2023 17:03:04 +0000 Reporting-Meta: AAGJeDVO72egaV676fWS7bh/Pn5ujwDHo5TjvGDjt4pKpTVTbbblFY3MGumG7+Iv z7Yfrsx+6X++ClHEb5dXHy3OhAgkNX6o752hcyRhjOtC00e+z1jfFo/48SJwajqX MJffuBCtH952My5W+iVC/WFiw9K1PijrcuyxhZII/8ZiVJSMvqllMqTLKGaFBSEQ VQmYhQFl+5LQyqOsRsCjrpnJ0jlErfmi/y7PxNrUpwog2lytOCEDxYxzL7iHOR/T lslU8ku4UYk4OnNkS0JUyi/ZNz+eR5Ta6jN+qdGYsiL8DPX8Wa4hhdmcQSQYcdtA RAxOaAl5hWK5oxEmanm13JRfpnZq3wRiyxiI9GcoHK+UguSUF6MlvO4ZnxMApkag o7r7dwW72EikUGAbkpX9rPk1HU19kO6aZwUno0xF+DJwfKME2eVC7yxgIU1fzLaq FWUKSweCZ+c4aEKyMdJg3DRv1lNVyclSIRwu7PRQ+AQ4gvbdi5B2b7GDbXlNnFcq lprBrQkRks3+36Tpd0KWkstK2SoSP9aPlu4D3vrX81d9Xg== 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 --- v4: -drop ext4 patch -erofs patch based on mainline -a bit change in ocfs2 patch 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 Fri Mar 10 05:48: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: 13184372 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 aib29ajc244.phx1.oracleemaildelivery.com (aib29ajc244.phx1.oracleemaildelivery.com [192.29.103.244]) (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 692A9C77B7A for ; Wed, 22 Mar 2023 17:03:09 +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=bSKS3FiVUvVktu4dI+cQwNOovKRUknQRLKgcGYt4xOg=; b=vgtXmdwMHUUnWmUG7APtO24ii5SR6XFF701CTQWS0iXG3TWAl1UBrNxxVvJFsPJ1PQFFbeB9RpAv D0SyKL2KTxxQoS3YhgTXI6g2RgwwZWLNSrfglg3GNOCiYos7YnBSufiB+V+5EGCfdIbx7fgQ0BQj naKMtZETxUGRcDrZFQLT9jJNgWoY0Xa4jRnrq3VwVriUf+6IjAkKtYMwqi2cyQcWKih9cu6vkUbQ kiPrMrXDLbUSdRAeeX7zdJY4MfhiBjz6CeEBqBvfpqYbElZfjyQrzHdj7V0wQhLQmzJvDRIx08rW GWWrBo2v817JMOf9QN0WB0gudrq/l62K0Ztydg== 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=bSKS3FiVUvVktu4dI+cQwNOovKRUknQRLKgcGYt4xOg=; b=T3ZYFJ+cWdVgjyqf/LN1M/A31Cet5Y8YSdga4zPWFfRXM2hc4IQY+ibczoMR7vvPiw98mzSlUSzF 6Wp3tX/ffW/0F+p/Cgk+/9/04xa2ZKOH92W+RM+QuPmoq9hKOJWiWDg82viOMn4ToumwcTwg0iMT 0zT42da5ga1RipP4avgZe0zZhRN2QhWlEk6BrSSA8PMd16EvBJ5hKM+ifgEpMfdDmO90BzyRwhUH YCWsdUNvl6VF33zy/kX//Bg13RGS+b6wNolyGdKQJqr90XewnbBaL1dLr23Q0d8/nd2SZbVfASlF t713GIRLFHM/EXCOqEFNn5ZmV9Hd+C9Pb1TviA== Received: by omta-ad1-fd1-101-us-phoenix-1.omtaad1.vcndpphx.oraclevcn.com (Oracle Communications Messaging Server 8.1.0.1.20230214 64bit (built Feb 14 2023)) with ESMTPS id <0RRX00FLIM18UM20@omta-ad1-fd1-101-us-phoenix-1.omtaad1.vcndpphx.oraclevcn.com> for ocfs2-devel@archiver.kernel.org; Wed, 22 Mar 2023 17:03:08 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BZBQI09aBrcFQwbdE1dSoCPoz9mf7sDp1znqN6bjvF4gIOUEkK1hP0rr8sZuVx0MGghZiOSDRMF8mnjlpXj/DyAqn8tZX6UbKIgMRznOD13r5NzOCF5usARHWIfsmMnbjQpXQWmCKjKM+G+NOtpNW0pAOLN6/040s4aJ/CDyidUm5m5NM74ghvqp4asPRoEoo1osoeGfPcaE2+XHw1wtDcPQ+lo3qMClFp728wJDwmFbVIv9onOeXZVe7FiAgQ0jlei0Qu074CGcVvdK5dX1ZcCndjWj93aNregJjEo8xJGc938AZA0SSGqkcemgQsRE0aaM1yVe+PQ0oAoT0bkaOw== 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=hc8PCYn/F+bBJwiE/Ok+CXT7KaO9/KsZNoz5vBuhjVo=; b=Sr1KduMnkzv3qTpFNVxEV4A7gYVokFxEFGme1LWwz0IxPqaDNMszYrmI3uyW6l4bYri//ZF8cfJaq65Sg/UONAmrxB1956pWUN1B0mx+DUhExDSVwqa52gfPK9eSyPS8B/LcJ2QaVJ+r8u7n8MOiV2367Kn8FwUiF3K4RlhFjhrPNnLNDwEcNs0zL81zS+y07VqLE7/Yo6IjivR9Y6TMt+d1M9mWd2+9DxjivIobTyVsO9vEeHIgv+SCaXPK5f354XZ2KLFnr+LXHDNO1WiZ0mg2wjcIsheFKkuvYVV6kbDrBwu1xG1xDJ8Z93etpCqBaBRWcp4wrnBf6lQjg5ypBA== 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=hc8PCYn/F+bBJwiE/Ok+CXT7KaO9/KsZNoz5vBuhjVo=; b=DhrtnIpEiA6bd5jbrLeAW7wLptcnM90lamm/lfkmQlL5gmtKmHyzzlPprgbOJAZlfC8jONDztrACNjyHM+SN25JDzQcTHEvkB9s9myCU67QlLDukXzL2yHYTpHQRKAkQmrGZZmSIkKreW/Z8q3Kr11uix1lE3a/oXYIf2xv2my49NbOGTW/UKhC43WHW4NBeKSirBsioRSVBq13+AF7qtN35ibKM3G1Nf88ECAfyrGKQz3aCwdiKtwgpDS0KTpNcLHyWodnb9HjrgbbvxP05G40cywOqQQ7Vtcsnx25kiXNRGYYOWMYU0XutBRUOVjYo75bIfGodpcTOCLgVltiC1w== 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: Fri, 10 Mar 2023 13:48:26 +0800 Message-id: <20230310054829.4241-2-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-reply-to: <20230310054829.4241-1-frank.li@vivo.com> References: <20230310054829.4241-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)(346002)(376002)(39850400004)(136003)(396003)(366004)(451199018)(52116002)(6486002)(1076003)(26005)(6506007)(6666004)(6512007)(107886003)(186003)(4744005)(41300700001)(66946007)(66476007)(66556008)(4326008)(8676002)(7416002)(8936002)(5660300002)(86362001)(2906002)(36756003)(316002)(478600001)(921005)(83380400001)(38100700002)(38350700002)(2616005); DIR:OUT; SFP:1102; X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2023 05:49:10.0015 (UTC) X-Source-IP: 40.107.117.99 X-Proofpoint-Virus-Version: vendor=nai engine=6500 definitions=10644 signatures=596816 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 impostorscore=0 malwarescore=0 phishscore=0 adultscore=0 priorityscore=130 mlxlogscore=824 mlxscore=0 spamscore=0 lowpriorityscore=0 suspectscore=0 bulkscore=0 clxscore=110 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303100045 domainage_hfrom=9103 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 v4 2/5] 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: SI2PR04CA0006.apcprd04.prod.outlook.com (2603:1096:4:197::13) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB6023:EE_ X-MS-Office365-Filtering-Correlation-Id: bcffa574-3eae-42e4-c992-08db212b2b59 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F09TohasIhTyNhQn1Q15MARbJIWHM7mi6dgLhf9/hSMOnolpvihaJxOWdp3xoMg1USFa+Ekf5868XXq2Cme489uZw0gqais4IgETkt2naElfGnKzMZzuDH/590c+oYQMBVfNkSX3r2aYX7p2p7iBEP4zJypqhMR/KpQwKD7yaIZ1XJVcUCLeTqZVCSr1+ItA7P1zD2iJGsh1INiyKWBqReeBoRX1yUUpST5LxqXgDhSUFLb+4d3K7IEkOy1X8v97NYtSf1iypG2DKeHx8+lr76x7xQr8qyVWl/fm6GwzLCSWR8wWHPSjQmZd1MMdOhbFOufxCxwhbLUWxSPhJzQk8Im1nM8cciSF7ap10AxlSlwguNKHHWaBNq2vhchbCkXIBHlXioDOeLLDK33B89Gq24Iwj/lKo8cqClk6ULcN30+Q3q9ifGQjruNPNQ4S/y30jzUFMAfM2J9KCrxalgsc4d7c98qU9JId7+70InSMScDlI/1h4nqQSsCYCLPIAQS7Eyt2atI0B++TaQwAjPIo/fBFMiUzWt9tSTlzgSfwlITtDasTnBqMZv4pJtGJaAWfLpOMqFQgPb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Si3yCl72/VczEdpnNf4LAHQBoycpFE5P739REe6g16cIVf0g4oHWwJIFLxg91tyDUtoVXdvIBPULYfzCywQ+op1jd6onHzH+4udXKaoUG5tLihJCuOUe6wM3XUkBNuuZhde6Wgr/unyaz3RWge/isXAeQ5dB2C0GTMK0RbZ6PgEN1X3dV3RT/jlhGqTGPRvtvYNVQESuIR1uis4I95fJ8YiRDd7YZF9X2hpsQooQbT8JlnjVP2mrIDGomuLS0lcvjd1IKx7IUGG+ARShd/qIG0TjwClN5Z+Y/Wx1s4wRFUkgIcAEn/2D0gF/+fJimffq1rfGgJRTH5AuDP9YaRQ3cpBYU7SoEsLFATBzTuvyCdWWw20pLUwgyP8TbxXUGqzPiVYj+SU6O3JdGNifVtovKVWvBTvClhPQ4jjAUEj3YGZvjjSFf79lcjG4WW33GOXBriBCUO4+dIL63u2qG3+bXsvewZH2k6eulck6G3w4/9XoVtZRHlUnmz7f+YBHSq8M2BuJQEUOuzu4UC23xTaERcA4jPPjWDb5DR2AvsO518GvmpBzg+nxd6TGZ6kEGrUsA1PWvQ3RMq0g4tQAmEDJhXYyinpzz8pbdlkXRDc5y3MpImr3kr53Q8UzN1lbec3pwLzfofz6SvqTQvB8aBTniycCkipR88m5Wl6ibkSnEcjsFvf/GXlsLfH3///T0GevMkkLyoVwwCdzNkTlidXUjPLrL+udnTbHOVTiAQEKiifqBKCN/rDOE X-MS-Exchange-CrossTenant-Network-Message-Id: bcffa574-3eae-42e4-c992-08db212b2b59 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: JMtR/Nv+Q3wGPOGsV84uFg0xXL7DCwcUMQwQtzGtUnB2SDvburE9KXj7IS/Yf/16VeWDex7mrHo+JAyGMNTiMg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB6023 X-ServerName: mail-tyzapc01on2099.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: 5ZLeGXUBq4Dk51CZ7nvQyrYYOn-1sk7t X-Proofpoint-ORIG-GUID: 5ZLeGXUBq4Dk51CZ7nvQyrYYOn-1sk7t X-Mailman-Approved-At: Wed, 22 Mar 2023 17:03:04 +0000 Reporting-Meta: AAHbNiVlChj0eP6H8muTnMrV0bcQiT57E1/IotkXOmcRfj4BpCEH35zqCrIckFc3 kCTNhY2mSVSKkFVy8w8hxM7y++DuInAXcxZs0MlbrhToAk+UvflIA8F4li0vBpj9 SxuyPX95MerOOpBlGkfaqPSF3SPj5Z1Uql9/EDp5NbbBt59+InH74qiYi3s8MP6m JkckrhghFN8xq5Xi8rSGAauchNAa/YEY8NVNVoWouVFc/kHAGk+a5NXUq12nnVQb rib11czRV6AncP8MN8VOYQ2BRDaf6PK38A3JVCg1KNzdmJZm+2IJWhmkWfrSeJoB R150DdWOp9KT+yIopi0g3+gWxTFrInXXxs4HvVaTwljTy7I73Zuo47tnHr36/Q8d 63rBPn4YlzIFnx5MDP3U7PzAw9GnIPK324tHeKy0bO1nLyvxL1ugWHj1j/QY6EfU 2N5eeLzfnaGw7ivioJGFINuy7GUcRFpuFIiQ803JU/b62cyZHFgAXE84T/GX5/HG z7GsWASQjhB6XdAruTADRrpuO+2pQ0m6yN5JDYJ1ZHXZ Use i_blockmask() to simplify code. Signed-off-by: Yangtao Li --- 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 e16545849ea7..d394102ef9de 100644 --- a/fs/erofs/data.c +++ b/fs/erofs/data.c @@ -376,7 +376,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 = (1 << inode->i_blkbits) - 1; + blksize_mask = i_blockmask(inode); if ((iocb->ki_pos | iov_iter_count(to) | iov_iter_alignment(to)) & blksize_mask) From patchwork Fri Mar 10 05:48: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: 13184380 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 aib29ajc246.phx1.oracleemaildelivery.com (aib29ajc246.phx1.oracleemaildelivery.com [192.29.103.246]) (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 BBB65C7EE29 for ; Wed, 22 Mar 2023 17:03:11 +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=zb11eLCS7GJl9nKC0ivBrXmP/rVC7wxUnueEJzg6x+M=; b=rNUOL98aVYRDYQXgeQUi0e55rUVISjoY3rtbfsuYWTogZZ6lQnD+D/P0OMyOr+aRXAerXruL04pr dbut4QHIoeabIdrQHzZOf2/D0L1gj3BkIxM95+glN47GVk3Qy2MTcQBrq43zwVxSF4d/M6ZTEon8 iNhhf6IcxHtTGtIjAC7T+QSaZck+UH4/JcK3DuP2Ppg3mm/bM8J0OCTGxhtqWQKmiK7m1w3MbNZi oUJqe2q9qsdSmKgaHolDRq1Upvc8SJGoRyOsr6UeaEOreJLiPprJCxa90kla3qXQUCFx7g7xVHAF wC+xp900ngj6Hl7R4nR1CXqu4ohcmaJ/N1QczA== 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=zb11eLCS7GJl9nKC0ivBrXmP/rVC7wxUnueEJzg6x+M=; b=dC3MCdoAtvYxtDnJqnHSEH5ljmW1+7YAZdikIDaBdouiA1H4UhHPedFIssrovRbKKgZ+UEi6LIuU yqW9HLbBdvHCADeYzGwkPhyggoF273sPCSVG0u97DNobVQTu7lYbXlIVIg9REeUWuLkEyAhL1hGV 2NfQr1t+mfdQJMpri7HU/IL/eJC15+XXIsGIO27iNNE4aWOLy7Q640UNtKy0GsqrmixIaPDZLSbH FZcAJ/eInTTOPfqcLSbmfbkZuBQo4FbnGk0XQHkzZepAyI57rXyX/vt+44POQJCz3Q7qy1YhmkTG ItroeZG84L9GKCFAuHPvJvrildmOuEYyDSLrnA== Received: by omta-ad1-fd3-101-us-phoenix-1.omtaad1.vcndpphx.oraclevcn.com (Oracle Communications Messaging Server 8.1.0.1.20230214 64bit (built Feb 14 2023)) with ESMTPS id <0RRX0070DM186C50@omta-ad1-fd3-101-us-phoenix-1.omtaad1.vcndpphx.oraclevcn.com> for ocfs2-devel@archiver.kernel.org; Wed, 22 Mar 2023 17:03:08 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=llbxFj5A8Pbl87w/YTIVEIrd+dLjORS5zqa4RUc90eLMOGYyueJy9tcOtRk9vbjaJZ8jBG5cK2vCFkPU/CxmbYnJ59VvLL0LKf2VT8LgjyGvWKJLQrJzqjXINcFfZ4qsBtffC9DczNIXvLa5YYaV53T2/ehEMWMRwDNVNW7PXbAfqVCpAe+3KZZzIGzzeX/+GmD+meH4R7xo+Nvdo2mMIC+59vae9qn/toqE/1HdeLgLorSCbpOG3LS70uKzfzHqzPOIJ6AnS7nHPZ4lJ9RYg4j7iY8er6ZYsfDCSKiUiup4v09uwx1k6tkHTnpH1Zpx9taGFHb3ajL2gdxIE5sebQ== 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=UmlasZs7L9i59O960XBl4d3nj4wDOMVdMNim3PUurcc=; b=VFm+ELPcTfQrL67yRFEjGfVw63ChzoYW+cofV/6UwRZdhbV9A2Imi2eA/guhgIJUs0qeShuXUZiPvWZeuHFOA7G3S/p4IAA4vhorb9oBSLe9GZQak986VkENlezLmFXiyF3o9hrteWi2VQcEW4fsnJz7Auoohz/dqA8D94LdsabxTjmd+bgRN9e8uHLShKZoM1PP+reOS4Gf+1uWELpUUS4Ic2Dq7vXLL6KE1dmZLLVs6q2K6t1fURnhPw2Kyto1ooLrMjc+lVUcaU9JHGreujZVFdl3hrWkxUzc/Z3TxAiI02R3wjTSZ17/ZxW7qpNszXouorw0lTsz3YgpkMO0kA== 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=UmlasZs7L9i59O960XBl4d3nj4wDOMVdMNim3PUurcc=; b=qqcZTbIkOD5oSFSGF9jmYNAyyzk9qIvGt3UaUx9dSIfZcW1tvbVCTFDCGEqdPC28mP+UUXsz2K08YW8SsRW7ERdVfAiPaMo5vfDenRFMTbcczR00jtUmjjJXcY5vJuTz003xaHZi+j/C23CU+rlYVcIj8iUWBsDrArUC+k7xhmu4RkvKTxNMDlgIG9S4Y3D5XoVrnOXH6uhiX3ErrFj2MxTZbsCNyaUq3WNhVz4DY/8hu9Im7lENLh1dR58mVM3b0dG4r0sYKZRkjsVNIWVOSr+eTCAmbKSX3FX7G54zSZ2oSIORw5YB0M9CboDmtCxLBBZ/s3TC23CucbXV/K8S8g== 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: Fri, 10 Mar 2023 13:48:27 +0800 Message-id: <20230310054829.4241-3-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-reply-to: <20230310054829.4241-1-frank.li@vivo.com> References: <20230310054829.4241-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)(346002)(376002)(39850400004)(136003)(396003)(366004)(451199018)(52116002)(6486002)(1076003)(26005)(6506007)(6666004)(6512007)(107886003)(186003)(4744005)(41300700001)(66946007)(66476007)(66556008)(4326008)(8676002)(7416002)(8936002)(5660300002)(86362001)(2906002)(36756003)(316002)(478600001)(921005)(83380400001)(38100700002)(38350700002)(2616005); DIR:OUT; SFP:1102; X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2023 05:49:13.5817 (UTC) X-Source-IP: 40.107.117.106 X-Proofpoint-Virus-Version: vendor=nai engine=6500 definitions=10644 signatures=596816 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 priorityscore=90 spamscore=0 malwarescore=0 adultscore=0 mlxscore=0 impostorscore=0 phishscore=0 mlxlogscore=817 lowpriorityscore=0 clxscore=96 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303100045 domainage_hfrom=9103 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 v4 3/5] 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: SI2PR04CA0006.apcprd04.prod.outlook.com (2603:1096:4:197::13) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB6023:EE_ X-MS-Office365-Filtering-Correlation-Id: 47e9e2ca-c6bf-4ac8-d9e4-08db212b2d80 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jqOXpbKKBVqWpr0dTOVpkjybpTY4ounv9sUogJZZ+14GmnUxIJP3zAmXaF2q5jNmCgcVri2kQICUNGngkbcZxAQ7Z+/Yc3jMCy+Jbv6h4FByrtNlkrjEkirZ80P7SjsgDFmy1/sWGYvMGaYx4Wna3Fup/i97OQal/uyWBENzCaZlKjWPBsPxIQxuu5fyUkvqtUjyN3CHVCZ3xEQ6PWSqu5RmcqCyQ0fSlLAZ721hSEyFvUluxBxp7s+TrrNKu8GRfjIF07fJnC1GiTq1w02QEZ7dsvYDgNvXsGynb9o3D+Q8/g1acv3PVbKSMt+HvZjeT+hn6Wuvw9YWgLTXZb0LvoWVy4HOXVZrQkhuiR0Ljcl8hvZJF26EP8nw7hG2WnRzS0VWDFZe2NhB3R7NMmdWFKgiekq1Ozq7ksitzlajfKhpJ8QdquNxo2lEQ4thaD2cLHx4gl8edCG4Brt4JjLG3U67L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+UDhVHV2jy5Ns0dwTo5P/CPagrGD6hr6u/q5b5blPPgBvSvhN0fnenmhfz0UuezU7caHCkYPSxUsJAkNMqt7BCV5JymTSHeqiv7VJ21qOC2rUmQ5MbKE1/EBgcQ0Wbwra5Gne22OsVh92FNH3TP59U9d5G7nZP6+C9BQYcgRNT1akHpNKnhe86X3o0akq0xHXrpECfwU6I9Lp9m6msVXmMafscERDv7r8QjWyNYDXGDzn2S6qSP6WEdQK0fDz28EWR5lbrZVvW8Snf6N7QInlCdH5Ov/HUoRTzPCw8Ca0AudjdRbxR5AkMLz5Tg4QqiCCilY+q7wYksKKW6r6dS2sgjK9wXvebL7TBWijzI0LbZjixIXGndY8S1r6cnNGZPVCBddHYg84v8E6Pgj8G8lAAbEIUkmg24SpbiHnKjrstqoSIVIefVFAaAx0CjS6gD2lr+mpQ15n+MTA1MGywnqjb2AbFV84ErLL1Celyrxt05R8gQlSZsnrnAqXfX/UTaL3hYAiHTHCe57W2mDDARZO8dRSCEY7sLK9D+3qJmzUv0KS+zUYV4lXvkZwI29Gjj0WlISAMFBPoz7dld6xXU6hSxiec7aLITC3ZgKkOJSltb6A3PmBoyt/Tsm6Zk/XJTs+y70upzL8vSmC9QFsYEDNe/hp2BJFdsoTz1BTws4c5V5r2EgZt/bhwWb9H7e002cXIwEToeYG73IalZ10jeYTHWLLEolZiHAHddcD1YPfmQoDuYX7PMN8aZJVOOFBHUhw2kXl4rG4HbLXflN3p1rzndEyrb8om+i7tEJthp6mkgf7yhUII5bKH5X6HaRU8o4F3OtahxX57cKp1il X-MS-Exchange-CrossTenant-Network-Message-Id: 47e9e2ca-c6bf-4ac8-d9e4-08db212b2d80 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: kkZaT5SAT+VtFLn5GdMdMhP+iOBx7jEePtaccpqasgv/WkwLUSErXAHUKqvpIVncr5ZnpLJApNGFlGDdVflQRA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB6023 X-ServerName: mail-tyzapc01on2106.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: LsJ3YDKqHywzhHdO40Ige4Q7dwXplBh1 X-Proofpoint-ORIG-GUID: LsJ3YDKqHywzhHdO40Ige4Q7dwXplBh1 X-Mailman-Approved-At: Wed, 22 Mar 2023 17:03:04 +0000 Reporting-Meta: AAFlzmelxJYUdzSHAgGvziIcTlKXWfVv6VJzwfs81Z/WOU2w9Zp5jRQAyHpQ8EHf e3nAvPsXt2282S03ZKmEtNmSV/lARUO4WGi+wM+lc3Ir3x6Wzjk+bE3bPSSHKLlS twL/D9YOn+2/k5Tg3zerNLvbXZkaJ5L0luK3dtHsdmhtQ/2bsBTAvb5xJ1Qr1WxR hyEIm7u0n/7YLLEYDenCMCukEPoa4Xw0AYZoX9+K6/zWs/orAK2af3b93me/O+Nj l6Rhnm2jj5QnYvYFGdvmHR3u23LxSe7qYKOAm0SETeDw/IuRgADgBHt0bKN0WVGO tMnj2ymPbUq+AScQrMh7AmX/9LdNpr14/H61VRyxbZL1byjIVWMUb+RA3QmvL7rT tmgx/dpXxOxo/N3vB34+jO7BdJoowH2v5Bh6vCKaMBPomK03qBU+E/nefjrhvcWo ae5sD9GvpyN8EAgOwuBPAaQz3H1BOb1fSkyj8kGHImSIBdPFFUoI0gfoTWp0nvXW 1Z0wNwdCkibRHJsfCqcGc8fgMAAiWE3rg2COOrYegDht3g== Use i_blockmask() to simplify code. Signed-off-by: Yangtao Li --- 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 Fri Mar 10 05:48:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13184377 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 4806DC76195 for ; Wed, 22 Mar 2023 17:03:15 +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=l0kr8EYvtyH8jmZRKtW3fObNFgPQLBKdceya98vSAFU=; b=EbCMIh5uB5Vqcs+vo4dRVUFfGBf40gccynr+J+m8fO7r2Z3KifQVZYxA2EDAHajL2d9EODwT4jeI WS4ZId3vzxwXDMHJKya4fi4tfYB91vyuJyc9eJtOjdC4QY728jiZ4DctX4cmPoCzVSm1+rF3knOO dI/WQdm77igemtKvrMAki0B8FVlBACA9G1k6sQ/hC4Ju5R0A/FxqItg1yFRifl/EeKYaUdLu9To8 a2C6orZPDET4Rfhrg1DYXwhwcrKbXQxbxo19QXHE9s3NTAAylalRQhS9IfHzx2rbccHObFTUdkVw f4qwAuezf+E56uLKtVVE/vHM5bYco36KhnBq+Q== 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=l0kr8EYvtyH8jmZRKtW3fObNFgPQLBKdceya98vSAFU=; b=nAU59EhoO7kupSwm+O5H+fWmn8BVyyxc49yWri/DkN6SfGT6T43NnuwMwEAYUJEnqPrp4dfU9ek8 YUEZi+eSX497BlzIPg7/hC4lpsMlthZ7IDPCJzZ+/zELOVdGKQRmLraDcqAFXC3dT4rQMHlA2pNf sMaBYDrULZXV9oD3kAQOqdbINwrCnNvMU+MQTKA0aRnov85fUySuM2NREI1N1kssJ4VjRLA1mqMe 5NI3GlLKCXNrbloGVj690NtuRlLFQRCygqrxGdGdG5iuurkpnq8K8NK8MISyrgr4BL5O48xcrlYy hYXddKC2kgqOrHfA7L6oL7KceDPPXi6qu6/Ydg== 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 <0RRX00GGJM1E8MB0@omta-ad2-fd3-201-us-phoenix-1.omtaad2.vcndpphx.oraclevcn.com> for ocfs2-devel@archiver.kernel.org; Wed, 22 Mar 2023 17:03:14 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AavFzUp+nIqkZvNuKbj2r6MjLa46RzHA2TsqnR+1XqyUABHqMmaZjcTM1Sveo50e3DkeZHmNcoRYA1M8dY0/fJH+1TNfbw3drh0rIAs1Z3LB3HGSrX6rlRELuqY2xqgx2HBLOwKa7eDLssxAkq4sxw2tMMeDW1YGEbZ6DBPFsjgZTLFaOw6OPevIkFVbjg0xONkpFPyvxR7CJhF0qs8Gri9BhvpcUUCOpXm8KNn6qVeWGB28RarBW8wzGwM07TCcgIrCaEjVigAQRhqyep3MqYo03PwH5WX32Li/zciwN24ac2jHSK4g54Y8vyqvVWtZRR35dKoJFTpUo6SB0JKu4Q== 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=Jf0NXmPR/A6QkRkcChnZxvlRXMYJdAJ8WDWuNw+JSCc=; b=ASp3j4xCnVKn6rlJmeIHszVQ0MN43voN58DsaVhNNn+lHCG96xdvXnMjIwsSxEGAGiihWkCilBZZNcODkG6hBNg3cONeuHWpaDOgTwYE2HY8s8A9QsU2OQFdYVa/kJEakRZn/Yx0QSyEb5kufk6Tkf5nuMSUwv/3YUrYc7CIf7Ynyv86mmxRXcgvTBRBbHc2lHCqxDj8cIRTYhRhrpLHk+2Ykjs1pyvJuJzhAGbG9RmWLe4YJTbw7yaLK3sKmp7V0Ls2aTn9rwqoU6EqFsFhMF4ZcWAyP+2orLvqInQou1Hep5z6A+DD0LWby6+zhaZGWVM6i/qAZacTZvxzgjbD6g== 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=Jf0NXmPR/A6QkRkcChnZxvlRXMYJdAJ8WDWuNw+JSCc=; b=Ui1Fd0lIj8aTyHTIyyEEwsj/07yvxB5AZTwpOcNERLpqaaV4vCga/k+KdNoko+HW5/KhrD0lC0gz63DySKzKLVJqH8hosqN6G25PNhYDbpWNLuadpdOMbEVNsiiAmc5XHs88+53iGeUmfXx3AGPiJjnWSSD+SRjlAy7T6l6v+zT4+eZu8l5bmstmg1jStHwm3hXVditPeQJDHYhxNY+1f3vm8JTo1RXeY2Fp20AyYJtlpHTVYeMgnFAvU2AJq1D/VbqLYPS+AvgXC4h3iL6US6nGzZV/rHR0UKLuZf0pow58Prkx9U1cC4x40WXb1fsMAlOicBQ9lHgXMwq91sbRrQ== 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: Fri, 10 Mar 2023 13:48:28 +0800 Message-id: <20230310054829.4241-4-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-reply-to: <20230310054829.4241-1-frank.li@vivo.com> References: <20230310054829.4241-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)(346002)(376002)(39850400004)(136003)(396003)(366004)(451199018)(52116002)(6486002)(1076003)(26005)(6506007)(6666004)(6512007)(107886003)(186003)(41300700001)(66946007)(66476007)(66556008)(4326008)(8676002)(7416002)(8936002)(5660300002)(86362001)(2906002)(36756003)(316002)(478600001)(921005)(83380400001)(38100700002)(38350700002)(2616005); DIR:OUT; SFP:1102; X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2023 05:49:17.1994 (UTC) X-Source-IP: 40.107.117.106 X-Proofpoint-Virus-Version: vendor=nai engine=6500 definitions=10644 signatures=596816 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 priorityscore=90 spamscore=0 malwarescore=0 adultscore=0 mlxscore=0 impostorscore=0 phishscore=0 mlxlogscore=804 lowpriorityscore=0 clxscore=96 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303100045 domainage_hfrom=9103 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 v4 4/5] 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: SI2PR04CA0006.apcprd04.prod.outlook.com (2603:1096:4:197::13) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB6023:EE_ X-MS-Office365-Filtering-Correlation-Id: 711f6969-e97f-406d-ad7b-08db212b2fa8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xqbFJAQdmbHdWPhF3vfFZyWdBFBAKXTfjT6gH4vIZr6t5PQH0TpVRMOSbJcEbHGABSmslD5ZBlO2LAhbBLVhuCAoW6fLBWNpL6oaaPd3bN4bbS8RsEsKyMgfIv3M9ZcNKQsOSEfUoLNoumwXpjatuT8Lrs50Sv0fEEkV1yQdMKTWiHc/bLTlmIbPMxVKa59ujtN85GutND5MWCQEOT4SsFvvFfei2eKkY6nwpwMMIx1LtlXRAu1yDLGcqouDO6MRZmRtJysVbP1dEzmjUED61nSnbs8bWK0zgMMm8Cmk78T6UMq/G0ckBsZpUVZKwUir2oLRSfDGIF732g8ad0SmocNJ1Tv8MOHuc1zxq2WtN/zv68wLF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Egw5fg8pTxw0vMrNNAZn5QeD0r66rK784Djne3tyeZ45IwhWPsnXnpB8a/pBje7Yd7xq84t6mDfy8Bfeu14FY4OyB4MvSMW26wttS5EEdS10i4zPcv4Vl3wJ1x0v4mRpdObvaoWRtCGD/EL+m0vOZFtBHS3AQTE8CwNy9bxSvBTgO26hs0a+otIR577lxMl4IfGW8K79FC67UliUF/nKi20mvR6RVXbfSYz5Ctd36h12hUidyH/Lvlx/vyoNymKvs+HypmPPQN5g3qnPHc/uDBWg69XcXfWBULY7YVXVulRddT1Lwm+SxL2VHKpFea7/YG3wcgb1aw+JfuiW0o8Qv1+J45JF0sJxc++X0x28VBgu0PiN5/C4oKP/CUgzKUTEZVF7i6/6IoAxpMpnoCIOxMYUrbwtf2bmtMe462YFe2HC/4x1xvMbSx2ka4xPeVFpbxV8wGJIYX65A2VVPVtATxnAacHPpsU93FvzS91qx/3axkecvmSLZiY4xFbNFDcy1u5Ww2jeWnIUH21CG8m7FN8sb4MgX7y/wMpQjfkmcgtvQPxpZ79bufpzPMR0ib/1k2ec7vxXAzr8C3siPtRrUFwIu+UN+de9xAwnPIMTAHrxwKSw3Xknnyr2v8SSZKUz/5hRGN3xuFkjXm1uAn+qxoOQ4LBoz2a6KjUIoXjEBTvlQhQuhhn8f3/V7GoP4XNz3YWZHc2dsSVoc6SF+vVoODEZFpCFtQWwkR3yW4VWPN2DXkcTXZv2tuxdPbXlpbRmAlmUjf9eAnGNlTNmcFBtKvYyduMFMwMjkHTMcAfbY54mngO0kecn3Gr7HaJhM6AJ25T/zg6hmYz48MMyIKe/meEfm313Wu7pG33krISktsQ4QLN3379CbeJb+NLzyiHrdjgWTwGZ3eNaRThDPdmcne1rQIPxKz2AOkdbmIMUdv8FnXPziIIdAMyr8/oS1+YwOh X-MS-Exchange-CrossTenant-Network-Message-Id: 711f6969-e97f-406d-ad7b-08db212b2fa8 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: 2MhJP/TVakp22HmT7xiQqB8u3NGWSEmzp61q3tg3wd+upwIzOd45eoqYpNGisZd1RLmmBp1M6djG3cH5tmUCyw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB6023 X-ServerName: mail-tyzapc01on2106.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-ORIG-GUID: smA_VbTfN_eYxCDua-IpuB5o49HRZCVs X-Proofpoint-GUID: smA_VbTfN_eYxCDua-IpuB5o49HRZCVs X-Mailman-Approved-At: Wed, 22 Mar 2023 17:03:04 +0000 Reporting-Meta: AAEg8qBlNj+L5mMy/qwJPphGyOQZS3Rt9hEQkQ017GVmYvJLlozei99BpNbU6GjQ wLMcYOviJz4OEJCQ0sjG9HxigdlcBvjlxQfJAvC6S3XXzX7IfXDnLZOl1dWfPSTT MwQw23bVHoSjPq/RbDgaLZodOmi+HdwhiLKXOLzQuJ1SpVvTra7vIz+swp8CFHi2 I2sC0vo6SZVNsB3DUsqo6kuG3AVTy+XwuUu50bDpE+/Cq0zaKbUZhh94d0h7EhFM IdADG7SKgXweigpzS7LWwzrCcS50H+ficnj1ivYbgOAjRDFtjqdfNKijsCUHHiQp fd414XIljAw9zZk8LeER/uLyvKhDLWEZwwsSu9q1pFkoxtBzjcqb4CmTtWHWRBEz D7r1IrJxbRJJ7t+huXIXwfQbjXvocmI3F+tzpoC83G8EFZqJKdgHdAoDkenZoJX4 NJ8Zx8tE1bIGpSVh9L3tmMrNg1IeFYqMdAl+inLEp5eEeeIzok41ipi+4gELVTkQ FlQmgBLx60wCsAexDz6A0ps30qSNeIoUEfWxABtLNQg8 Use i_blockmask() to simplify code. BTW convert ocfs2_is_io_unaligned to return bool type and the fact that the value will be the same (i.e. that ->i_blkbits is never changed by ocfs2). Signed-off-by: Yangtao Li --- fs/ocfs2/file.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index efb09de4343d..7fd06a4d27d4 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -2159,14 +2159,9 @@ 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; - loff_t final_size = pos + count; - - if ((pos & blockmask) || (final_size & blockmask)) - return 1; - return 0; + return ((pos | count) & i_blockmask(inode)) != 0; } static int ocfs2_inode_lock_for_extent_tree(struct inode *inode, From patchwork Fri Mar 10 05:48:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13184373 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 aib29ajc244.phx1.oracleemaildelivery.com (aib29ajc244.phx1.oracleemaildelivery.com [192.29.103.244]) (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 974EEC77B7D for ; Wed, 22 Mar 2023 17:03:09 +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=ATajY4QDoDqIikP1o1gp+a9EQEf0TVJC+SY71Lj99h36xbY1l1VWcXM17KJbeNrj7Q6x5CIesXGa B22wqCtf4a1Ke/E9DJFxVjRMocNob3g+h7OHNc3cntOFdl195LuvaadNsp6sKo21lcLeeGDzNgjs QBm0BZa4xmjU7KNpsVXu1tWTiXUNzww9oL3aWiowIjmuvix+1EKfdi3Vn4eeWPmdI9fo8o+Z1JFS UwvdttqRzYOyomj1zmt5Qq27ai1rvUqC2Sts1YEnDDwgp8Fs3xQmUg1+HF+O+EzCkBCecEmwCskB j9QDh/6/W6t0RxSkA33gQVeoFU2D12D/O+a68g== 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=FFHeGXT/CcPiXOpzScUGLspFpnudzsVrHH2pOaT3dQqKeRvyApob9UVF02CPsYU64n2R1eQd31P3 o/aDptmB7NJaT0elbp6FumHn/IGNrF5YfBekulsC0/sVuPU1/F3PD51a5lWWAB/ZCDSZNd0jGi1k vfwDE+p2iYOHynVzwPEU95uhCCAQpBIX07vTsDlEbQoNN23z8x5j18kmZopJSvYdMPc9rU9WDV2C iSox3MaZCYliWYQV5U97s2FKC3jkSxrzh01D7Ic2gRr8e2Uib2tUofXzipp6Xups6MTUPOXltjOB ZFzHcagvQ9K7OhWpPniSHSbitRIH+JqSlUJCkw== Received: by omta-ad1-fd1-101-us-phoenix-1.omtaad1.vcndpphx.oraclevcn.com (Oracle Communications Messaging Server 8.1.0.1.20230214 64bit (built Feb 14 2023)) with ESMTPS id <0RRX00FM0M18UM20@omta-ad1-fd1-101-us-phoenix-1.omtaad1.vcndpphx.oraclevcn.com> for ocfs2-devel@archiver.kernel.org; Wed, 22 Mar 2023 17:03:09 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FdkFNY/XYJcKghRY2azMNhTzYFWzHSnzaFIsNdTFBLQQhzJN9tjuc+F/fWDe+wh48KlSh8Uls++QqToEf50fqKjb4pSg/Ul23a5beNxD1WCifaf6MiFZ5j9dNeS7AzjESg0EquEBCranCbxArNWoD789hD+Z5zznHsNhub4PfNvRiqDhrSzvvsD/A9OKumgOi4356HsojUyx3cenhDu4uDXj/+YBI3dmtss2C5I8YOr5U4l9fNgPaQqM2Q8Mhb2HsQIPH/4LZFa837lY0Oo4s3kyhRSn7nCQx74wKK97mYKis+l69gdCCdOOB0e8QFp75gMG8NL0g7B6PNij9fumFA== 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=iGtqgDrMzl7O5m0Xexe/kTTUISrfCitBINU1t6ojl1pVsA9m19HVFofo19+kmTzo0ZRgN/bSNGTbNOPRhORddOFHiQgMUERJtkOrVJ62Klahy/8g3RAu9+manGj3cZfW0ZvhKpiVELA0Emlma+H1993AZbPFbPKiLIDr0+IUbcsxRs7fvswp3fp0VjKSxjgLY+PHvj8k3HMDD1mv4y3+2ErQ+J8w23p2cRdM05EJiQSnSPN3XWqM//RfgVE9gmnAHSDWXiv8V5302kyhL2Mc4b62Q34bFKKwvxnUwvYqmPXvBHnhkeoWIVpUMkbV0xBcCSo4j6OARzkj+APzx8jowA== 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=WhrOhDUkEGXz0eez4sWpsC9X6VH7uZoLmOWJeQwPPNCTq8oM86Kkx1UAfiLd8HRsTanJNDiX5kdyICwkZW023WcDZhFYsNcrfBuSkayjJdVEWfIsbc03JsUFgZttCToOzDGNlQIFAGcTcmfak/SjulitZVfAJB6ytjLS6OHvxoBPqsaFZ56HHiySR4qjSbQD5uT2DlBkG8+JfZOVY8TfKSmQHMoxVUWyEJpttT9P/lStNXxwJwJyXBcPZWs1Ut6FPPCRtRQZeg/y5lhELEshdf0sQvsrMGXxJN5ccWuOxSocHvrVgzdD//rg7hcreBNaUPH1wTcdrnivxenTWjBsLQ== 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: Fri, 10 Mar 2023 13:48:29 +0800 Message-id: <20230310054829.4241-5-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-reply-to: <20230310054829.4241-1-frank.li@vivo.com> References: <20230310054829.4241-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)(346002)(376002)(39850400004)(136003)(396003)(366004)(451199018)(52116002)(6486002)(1076003)(26005)(6506007)(6512007)(107886003)(186003)(4744005)(41300700001)(66946007)(66476007)(66556008)(4326008)(8676002)(7416002)(8936002)(5660300002)(86362001)(2906002)(36756003)(316002)(478600001)(921005)(83380400001)(38100700002)(38350700002)(2616005); DIR:OUT; SFP:1102; X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2023 05:49:20.8712 (UTC) X-Source-IP: 40.107.117.116 X-Proofpoint-Virus-Version: vendor=nai engine=6500 definitions=10644 signatures=596816 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 clxscore=150 mlxlogscore=729 phishscore=0 impostorscore=0 bulkscore=0 priorityscore=159 adultscore=0 spamscore=0 lowpriorityscore=0 mlxscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303100045 domainage_hfrom=9103 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 v4 5/5] 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: SI2PR04CA0006.apcprd04.prod.outlook.com (2603:1096:4:197::13) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB6023:EE_ X-MS-Office365-Filtering-Correlation-Id: e5ebba1a-19b4-4abb-2515-08db212b31d9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vmRIrTsdgNJOnv5mVw2IF7UBVhRCnXl+hUMJNlrvYSzjQ8VEi+it7z4kFy88i5XoTmTkRzfqiQUCXtTdHcnNN+qJ3JaJr7uL05YgA74UjsWH8BXCPlvfFtIo3o+CwXkdoU0P38Z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dvnAKi9xgF8lAW3QV/PZzq85nvMVJHJ/6Tr1lok1E3VXM9VE3d4QbahjIId1Bx73IocA4f7MxcJGIr6zLs07mds1rjDaithpXeE4V6Nb X-MS-Exchange-CrossTenant-Network-Message-Id: e5ebba1a-19b4-4abb-2515-08db212b31d9 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: QKizUUXD/PnoWJx1I+aESm8SLdwYYhBhPV69laPZaD6rM+/iSpNXIgeiSRn/DRUBnQh/W6cHvJhumEt8zADWdg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB6023 X-ServerName: mail-tyzapc01on2116.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: I-9TPFA4Yo0oqXLr0lTTMfI75NcrNbhH X-Proofpoint-ORIG-GUID: I-9TPFA4Yo0oqXLr0lTTMfI75NcrNbhH X-Mailman-Approved-At: Wed, 22 Mar 2023 17:03:04 +0000 Reporting-Meta: AAFxrwKTSJy3Y8e5YKnJ9E2HBA4/1xu+l4bdyOIPIyXvoMi4J8WACc5vrqjONRoy +cQqerDztDoi3nSQ83cYQUJrLY2qj2FMrHRuWrxzPkPKP684Fpkf7HL0lhfmbNwa PDUKfSIw4dRQO6BMWyW2iJgcjqvabwYSXWaoYZU8lZjKI75DgbrRHMwKdXHkU0W0 ZTtBi76XSWGGygC6hh11XET0wp5Ay7kjZqCP6knFO/Vxsq0wQqeQ+m84mXNBdbqZ D851VpAX52s2BH2/Kk6EmXg4RCfDIlwhxW35wGAXqvLA7C0ILctJJqg+0IBZ1mBH dVjQlhtj4+595mz+5lydjN0wuvuFeDyvNvfHd/b2N98HcsheLZ8P+S1T+FFyCAyv FZKN1fLBA5+Uw9IsWkxV3QcDR3rDwQP95ZBVUYQo/L91iUHtuO/O9kxb7saAXrCx QXQACZwWbXu4asMaFzc0UDbGEJUbUSJGGqfzfZviCtaA+b1cyIlZSLB7mSjuEBS0 dHhepzQnC8o+CFwavaf5jvWi5mHIlDd9K+AuMY+QQa6Hng== 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)