Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4980094rwd; Sun, 11 Jun 2023 20:16:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6xsKDqs2qDxXvN4wQmSbpg/+plR3Dl2VrdYWgBKWyI84vnNfbkCxuaXp27s30l+zOsn6ws X-Received: by 2002:a17:902:e842:b0:1b1:f617:d184 with SMTP id t2-20020a170902e84200b001b1f617d184mr6829709plg.11.1686539786668; Sun, 11 Jun 2023 20:16:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686539786; cv=pass; d=google.com; s=arc-20160816; b=aRI6sT0dtksMcKF1X7gbgmVdIvxBSiBNHa8jqSnIsXswn+axTi2pFlCpi+d2iWdaBR 5DIEl6QInuwbUanGrZFllCo8Bopzs2cEBZzK7aOLEhsnwV4kJDfihmVpDrxin7vHd0pq B2e7DBWiXSXMCw+Y79KdieBtCHNuV6GXJpmvd0YB3+0Lj6yGWIWfJBU624EYV/rmqZq4 o2KjDyFYZtevGr6nC8mxab97n6MNJL22TFdqrIPGK0VEHZNbEReMg9YDpBStumRW9k5O fmM0K8tR6gzu+Rvc8BrzX6f6iC2r0hl+ZNZGOIHgzKTXys6yXjK8Gm+pet3T/c+GW6ZI /4kg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yG4NaiIwJDVRa91GbUkjytPpX0qB5PkhDezBZEAmJxM=; b=SPhkZWJ3wTA2CYbjDPJ34YZlboQ6LhhdUQSryGoSExUuMWpCZEoBHSzRtHTKXDrHvS wDgPVT78y7q5T+xlve/NKE7kCst0akP0mqPUMrt2w+dAf0Hwx/LSA310TXsMPgCJB5+T 5P5Qxhgk5yQRxelX/SCaDcVVAd88WOGT5PTyRf9khXZHxBQR8ZpTJF1tl8nptasp8ocS ai0vnc9Z/pyHWKWJ3SZP1MljfofOZkRnai5g/aApIQkHRieX19SFMZQgLrseGTIYO6sx yj4Hw4P4v/hRPbK/hoSykP1xTKRKH+LRDRxZKD2DbaTMh3xKBZRQZCaMm6pORuXKB4+h OeuA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oppo.com header.s=selector1 header.b=ZlpEdXJZ; arc=pass (i=1 spf=pass spfdomain=oppo.com dkim=pass dkdomain=oppo.com dmarc=pass fromdomain=oppo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=oppo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n17-20020a170902d2d100b001a6b6085041si6571977plc.512.2023.06.11.20.16.14; Sun, 11 Jun 2023 20:16:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oppo.com header.s=selector1 header.b=ZlpEdXJZ; arc=pass (i=1 spf=pass spfdomain=oppo.com dkim=pass dkdomain=oppo.com dmarc=pass fromdomain=oppo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=oppo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234007AbjFLDCI (ORCPT + 99 others); Sun, 11 Jun 2023 23:02:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234025AbjFLDBy (ORCPT ); Sun, 11 Jun 2023 23:01:54 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2075.outbound.protection.outlook.com [40.107.117.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AA57D9 for ; Sun, 11 Jun 2023 20:01:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oHywBGUK7RtIahJCVitMtgTRZxuq62SBfPfc4ljyg3HBynRACDy4vXyvxv550BHwXv9163vfKxO167HV87KQghhZ+qQYrSe5KlnGF3mhySvRl6qKdTSjwb2Kxvia48QlGicN30LOUICSh35140bHeS3x+nIcjJIuPE56MN7p4sju/ZUOiS3KxIEipOrm/DPHqsgYV9B/fEbmzD+90s2eVH93HK1yrOQhL484GnsqdbqdiPpnDe5FMF3662pwTKp6HRmyvYJoDDzFjaECk0e/fTWTV+jfclVKCVTr6JoBLBb62hN8bIqIEoTY+NvfbBCzqtgCaZSKteSVel5WiaoIag== 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=yG4NaiIwJDVRa91GbUkjytPpX0qB5PkhDezBZEAmJxM=; b=iWV5rSI+YaCh9WHVyT1BMXoMPqiAbFD0mutn2RVgrl+Nhnzr9u+9CQWAKTS+aycslXVuGbmYTIBZKKK4MO8hyMxH2fq9NLlQu2MuGlQWp4EZqer50WXkRVuNDY24y/DDy070+212TBCPGaYEpkbVOarQr95uoP7zuwenqekyICEXzV2bEsEEZ2HIZX8EdjqtdolZermbNAl+9PyjMmXD/vUukjyV0JOCk5im4pR8a2yJIiyMQJNlU6u/EqDNScNDU/wcLRJz5E01PXsH7rCkTGWMucitRQRx9/Ln5dKsWb12i61ADJyvA/ReK6WwV/nme62GYu0dNXWXjSCO82ruMw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oppo.com; dmarc=pass action=none header.from=oppo.com; dkim=pass header.d=oppo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oppo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yG4NaiIwJDVRa91GbUkjytPpX0qB5PkhDezBZEAmJxM=; b=ZlpEdXJZxSA+P7zmhq6IrKNTAw1XaAeKs74eS3ncErV8WBklXjMALn4mF7tsprdTMh4+l/T9AZh4wRY/Y3MlTl3ClvQoWtfNiwbRTxk0/qXG/Ae7jNmIKmiRxYhHLKXWgEJpop9N4PAdWJ9ZXNyE/XAj1238pulgBtjC67df52g= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oppo.com; Received: from SI2PR02MB5148.apcprd02.prod.outlook.com (2603:1096:4:153::6) by KL1PR02MB6259.apcprd02.prod.outlook.com (2603:1096:820:dc::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.21; Mon, 12 Jun 2023 03:01:46 +0000 Received: from SI2PR02MB5148.apcprd02.prod.outlook.com ([fe80::6297:13a6:41f1:e471]) by SI2PR02MB5148.apcprd02.prod.outlook.com ([fe80::6297:13a6:41f1:e471%6]) with mapi id 15.20.6500.020; Mon, 12 Jun 2023 03:01:46 +0000 From: Sheng Yong To: jaegeuk@kernel.org, chao@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, ebiggers@kernel.org, Sheng Yong Subject: [PATCH v4 2/6] f2fs: cleanup MIN_INLINE_XATTR_SIZE Date: Mon, 12 Jun 2023 11:01:17 +0800 Message-Id: <20230612030121.2393541-3-shengyong@oppo.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230612030121.2393541-1-shengyong@oppo.com> References: <20230612030121.2393541-1-shengyong@oppo.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI1PR02CA0029.apcprd02.prod.outlook.com (2603:1096:4:1f4::20) To SI2PR02MB5148.apcprd02.prod.outlook.com (2603:1096:4:153::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SI2PR02MB5148:EE_|KL1PR02MB6259:EE_ X-MS-Office365-Filtering-Correlation-Id: ee3d659b-a27b-4415-8a83-08db6af15b5e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5x6AMKJbDVweatTajHefXK3uD/csCXbk23plknNb/SJsddH6Kb5Ki4D+gXmz895DCeYu75ZNNlSAFor1B1ngsZqs/hWeep+9XS4HeVAzr5d/clcPbwqAeVn9Qh44PnXfankRclPar/7++U4+dfIMjX6Froo/HRlFlb1dN5GPp8zs0vLgjwG3Cdg4cAh1e8agacpEPbhlgk6/UGaFFtKrHrtwAiHEJDT2RGoGxOEnEkjCyIcInUg0e/BNfbtKiagcnFDN6r1SFrCHzL+IFbuzILgnE+Dl+hebLxc+OmzrEnViQNVcSPgsDRP+W8Lrlra37mK7e+54uQyDzaw1VMziY3/WrTbYpibHnq71BYFpR0zSTl7XoE9hVGzwkbPGejPRqSYBjdu91V7CcaskLqOEYlltiKtEKeychCVDfHjVHAwiPwAzWbch2JFT7GeLqRzrP3xc+kUVj1nfj+vAHdqQNiaybvl7uW8hViTwynVy469+q2c0MDbOPnY1sORd5QSO7z4Suoxl8Q4+/IFj8dGkslNZKuoG580BPhubvNseyShkCTsXfZdLIZn0yeRTfnnF3J9JRIQoWBWe07jkR1XKbyDtmrLPBLw/++/dwLnaeoNe32iZ+Oyji2tK0aQ8/G8Y X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SI2PR02MB5148.apcprd02.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(39860400002)(366004)(376002)(396003)(136003)(451199021)(66476007)(66556008)(8936002)(5660300002)(8676002)(36756003)(66946007)(4326008)(478600001)(6666004)(41300700001)(52116002)(6486002)(316002)(38100700002)(38350700002)(6512007)(6506007)(1076003)(26005)(186003)(2906002)(107886003)(2616005)(86362001)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?DUlp9yiDqy1Tn20fL2JCARYWAH6lmKYKBcdK6ePhMe0z+ctliDbCdj/o07yw?= =?us-ascii?Q?6AkB+TsymsXNi3OaQf7mNmqThVkXBsJRWUnBtRYpThg3G9AgajfyMyvJO1L0?= =?us-ascii?Q?QzTrv4NDkeo+aw7K7sz3psXxgl+DUDDralHUaLEE58ycsAiVwilrLg7cNX3x?= =?us-ascii?Q?FhiisZ/yez9q2JHGsKA0V56Cn2C9Otyyx5aWk4WFnkqYM6FzT33uBLb4+p5z?= =?us-ascii?Q?D0vMaQRVGgx32tXjgBMR/Xj0XZAqwDEWpF85zBBUPK3mTPHzBLBtIwj8E/ay?= =?us-ascii?Q?VUYIq0/g3sha3DxpqaOOTq7E8R1Nm1LLrUg+dac6QM8lHTwUbxtBsQmRruUO?= =?us-ascii?Q?kOOkhqCTkfnVbr6vEmAwGiO6nfk5gnFVobTHb8PLfV4IaeCVvRdoiW6jAfHb?= =?us-ascii?Q?/KBiIAnH9q6ItZC56+j9rKldn1lTxdxULI32G9jRFjis8XTUSLV3Yt4mPvHL?= =?us-ascii?Q?a4SQUqSJspihWtLxmEtBNAWCVwTlYBof1Tlu/GrX08S6vXFAe9uktEwd5wM4?= =?us-ascii?Q?ILyIDPExQ6IdtcVGOoIzhWq3ihjFUgqmfXs9NcsJl3uJgg7PgjXuqvxH8RBx?= =?us-ascii?Q?rz0WKTpu9cUIQytNI+iUw2X0Yd2oTdvbKswezI8DxNTwsyeEZrHyuznK27a4?= =?us-ascii?Q?mdr0Jsx74jQWKj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= =?us-ascii?Q?r+qeANz6k5t2T7nqpBqBrEECGPcCVL6WKFEiYpYl?= X-OriginatorOrg: oppo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ee3d659b-a27b-4415-8a83-08db6af15b5e X-MS-Exchange-CrossTenant-AuthSource: SI2PR02MB5148.apcprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jun 2023 03:01:46.0237 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f1905eb1-c353-41c5-9516-62b4a54b5ee6 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rP1XJo4UT6OPywRqHJTJf8wg9uRpZGidI8pUhWGjaNnpInRbvTYP3WR+6XaNhrhU0sqKslHEL2mwUEc4L1OyGw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR02MB6259 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Sheng Yong --- fs/f2fs/super.c | 2 +- fs/f2fs/xattr.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 023981824d240..d7630f6dcbd62 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1361,7 +1361,7 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount) return -EINVAL; } - min_size = sizeof(struct f2fs_xattr_header) / sizeof(__le32); + min_size = MIN_INLINE_XATTR_SIZE; max_size = MAX_INLINE_XATTR_SIZE; if (F2FS_OPTION(sbi).inline_xattr_size < min_size || diff --git a/fs/f2fs/xattr.h b/fs/f2fs/xattr.h index 416d652774a33..b1811c392e6f1 100644 --- a/fs/f2fs/xattr.h +++ b/fs/f2fs/xattr.h @@ -83,6 +83,7 @@ struct f2fs_xattr_entry { sizeof(struct f2fs_xattr_header) - \ sizeof(struct f2fs_xattr_entry)) +#define MIN_INLINE_XATTR_SIZE (sizeof(struct f2fs_xattr_header) / sizeof(__le32)) #define MAX_INLINE_XATTR_SIZE \ (DEF_ADDRS_PER_INODE - \ F2FS_TOTAL_EXTRA_ATTR_SIZE / sizeof(__le32) - \ -- 2.40.1