Message ID | 20230124153346.74881-3-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2230740wrn; Tue, 24 Jan 2023 08:00:18 -0800 (PST) X-Google-Smtp-Source: AMrXdXu28Niv1aCEfMTm5CO0oKghEZP0XK3BeNuRz/hiT/SW7j3Sc+6UIUodPXAD1aRkhXnPS/aP X-Received: by 2002:a17:90a:1a5e:b0:22b:bc63:c8b0 with SMTP id 30-20020a17090a1a5e00b0022bbc63c8b0mr14778149pjl.34.1674576017947; Tue, 24 Jan 2023 08:00:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674576017; cv=pass; d=google.com; s=arc-20160816; b=GrYCPHYrkKX0Swy19oNJdBoiInu2qq2zk/za4kBYnFk6S09IodDJVVY71h5GpOZPxk TkY2IF/ORxVnpaL8ZRKicdMB2DM9vFqYLmpb2LkDjLp97Kv3zkd9Z8LicOuYmKD9376o Y49CnMuSS1rrulK9xM1NgOpAL9XYkX3e/jV1WYUTlqRBDao1Sm4/g+RUZGRxO7ECxJ02 urHOND7s+gg+UJ2QsJWkwyZ7nzIH0M7Exb3ra9GVSlqrwgHU4cQdepF/N/RdX2pwGm1K MKyukcelVKGByukPPpVnGISvO5ZGyzS7C34YQe7cAM1GRPhumn9Do8uJHQAMyqPYP1FU wGIQ== 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=pc/HiXG4XACj4UAubJW4YdIEG+BNWkO6yw1S/98YXKA=; b=ZMBButvOzo7HdSFcI0lUQvdaJ+83QpFREcofPfIm1o1Z9gveY7paW+HUqxaoW1HCb0 4H1X7R3vf73UcpAWB3p02Dxhv2VFNzg9C7l5OZKebhlvwkPSlJTo+fjef/sd9omeQXwc wf62LO0lE6/Lw3xaIi86bseCfHt2Qxg+RODjfmKpUD5Va/aDYUcbOG07BW8ozNrY2mgJ VVnjVBEleKJ0vxsf4CZoGCCLAumyjwJCE6B0xZDqBOygKhgCh/wg4hqeKLAcPbO1Gksb R0PwaIm7hSEQVm1Gx2MXBBa9gmWbBq5sK8LA3yN7mM3Usz5ibTg319HCd7ZcnazdWppk y8bw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=kPeE0NVb; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z22-20020a63b916000000b004772ac33cdesi2489854pge.688.2023.01.24.08.00.04; Tue, 24 Jan 2023 08:00:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=kPeE0NVb; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235227AbjAXPeJ (ORCPT <rfc822;rust.linux@gmail.com> + 99 others); Tue, 24 Jan 2023 10:34:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235177AbjAXPeE (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 24 Jan 2023 10:34:04 -0500 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2123.outbound.protection.outlook.com [40.107.215.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6311811E85 for <linux-kernel@vger.kernel.org>; Tue, 24 Jan 2023 07:34:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ArCiyjGFtSyxcdn/pS81OMJdeG0y3xXP8Pm3VcjV1cZcFI48dpnV0c31Ew9rL1s8X/frnY4CKdIhHat3PmX8CSyPklUJNlIpA/7s62v6qMqtWvhFhcRypN5WgZbR+gztTEiVNqqzgDJjlU23k0LQv6OctEIZRyMHZQ/s5B9L5bEKh5scvppj45Gqsem4EaC7m0GRbeh0Wdf5PB58msMHyAnIFimagTtYG1S6oO/1zyiJRZ2Aubh//plrVB8m5ry+5L6RaZKpXc2V0fsux6YRb77lpJ/cbRfO5+Ve+BWQr5hOeVEg/616d7RKwlxmVh3KmtiQX9v/eKemiEPKxo2s2g== 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=pc/HiXG4XACj4UAubJW4YdIEG+BNWkO6yw1S/98YXKA=; b=jdhAwo3tugThj1IyfRxNI7BhjrbcU2krN3sEoTnm+lv+uUdwCXDi3zEus9pTK5TIF6PgMTibai/Pce5jN6gQ7v5Hp+coKUMeGXPtzEPzk98LcqmjsMiSBMdCS5LTxRFAsh+QGDaDexYNuYMi8VPMY5kKM0bScggdDBxyANknTdvjM0/OnBjN7u6PfO31j63Ys8SMJ9LjZEc+TqmOXsZpCkTKFLYqCQQNqmI1KIwQ3FzBYyUjZCLdZlIwCjJA/wuPmETF4aSp+9D5L7kfvjS+kWQF4WYFC6cGETJgwOqApSQjr2VDPbQaZ/7nwix0sekfLBPqHfn1RsBA9xqv1gbQBg== 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=pc/HiXG4XACj4UAubJW4YdIEG+BNWkO6yw1S/98YXKA=; b=kPeE0NVbzveUj+EUCJUxuxQLpXUhxgKNVnUaAQFYH+O6FKGAK8jRgIEGa/5az3MnEfmLMZflExClfgs7jCrhEopGJiufXPGJdobl7FjvIojomQTSfR26pvG7hc8rf4BXy/4d6ii2uN5BaaRGmsQeNDFQtRlJp8uZq7wCbomoBateoUQcoD5NPNMC28EEJlYXgiq5VPHv9bCFHbH1WzKq21z5xyoM3wg9retwGJvJQfpcD182upZ8sisW9rAmx5m+nS5brvUx420M9nWWjd4kdxbJazVyrsNRPOtRt6WW/mBZlLzjGEIIX0HhA1GEG/zr5KzVok1hPhYbECWNDS1QBQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by SI2PR06MB5019.apcprd06.prod.outlook.com (2603:1096:4:1a3::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.9; Tue, 24 Jan 2023 15:34:01 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::3e52:d08c:ecf4:d572]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::3e52:d08c:ecf4:d572%4]) with mapi id 15.20.6043.016; Tue, 24 Jan 2023 15:34:01 +0000 From: Yangtao Li <frank.li@vivo.com> To: jaegeuk@kernel.org, chao@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Yangtao Li <frank.li@vivo.com> Subject: [PATCH 3/4] f2fs: set default compress option only when sb_has_compression Date: Tue, 24 Jan 2023 23:33:45 +0800 Message-Id: <20230124153346.74881-3-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230124153346.74881-1-frank.li@vivo.com> References: <20230124153346.74881-1-frank.li@vivo.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SGXP274CA0004.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB5019:EE_ X-MS-Office365-Filtering-Correlation-Id: df2e40b9-e6a6-46f6-37de-08dafe206ad1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jrg3L6RYuFdiIjmeCGqFMuwNLG5QQUZeEQwai5Kf2DTTtorl9OhI53W3s+Q9/jvjSCQjTy/Yd6QXwEkvEwo6JH08MNDZunE1qlYcigOAknzMRFi1jrkhB68OJPf0kiYU90NtDSZRrbFIrduw+5JrbqMqgWaQrJsPxeipxVyvbP8/9EqVSJIfd0LdI8+HInZy0dcYRBwl8Y8vr3JPUeffpGnsnEKXf7sHKnyiulDh5ObFr87bN/It9TEXsmDqeEJt+8ssXbM6OVbR/4VW1C6Gcr3i3bA/JrZbb44i4OCL6cehp0alF4vdmQpRmhh57RjBZmwXCYP+1faNDyyuMS1Qd5NEMlqruyUYt79dHvEz3yQY5rRjRMhXm7mJvO7Mb1ToC/DSXaUbMf/sUlOuVuEcenPimJzP8HiB13+8OSifT8nuhyjqFU3d2GZt9cN+E222WvWBx/W6v8jsUBaKobhYHm9HZ5KejFXUwvAhz8+nx56J62CDKP94LCkpd/8FK5t0JPGKQM+qtVuocM0WMReMEbRWcadrVFWcIDqQrwtprszk/JWoE87di//NCPTiU+zm0xPBXXtuAxIId3pioj+SCToFTC4hxhLhrky6Orik7WOVn6OMoOJtkeA+15uzj0GHaeXQsEe1DItPxtfHvrk4jr1kqA46BkS1cH2PviaV6ShrACQCvUyPZT+3y/3GPMj96k8NzrRsnnZ+IH/6KXdi3Q== 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:(13230022)(4636009)(376002)(346002)(366004)(136003)(39860400002)(396003)(451199015)(2616005)(2906002)(6512007)(26005)(86362001)(186003)(38350700002)(38100700002)(36756003)(8936002)(52116002)(316002)(5660300002)(83380400001)(41300700001)(6666004)(107886003)(478600001)(6506007)(6486002)(4326008)(8676002)(66476007)(1076003)(66556008)(66946007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Kvtfq6J8WcGROyBOYeqYq8sbAEcy9yJJeKhtXmd2CJqaPowV4mVaXfPRswBnj8Mm2xdj/io/Ntq5LBxvr7rqsfzUTW5O/DiN8+6kHrUO+k/JHk5jBFZ1Vpq1iuXNMBdgN6N6YuWdbloKI1yCwwJ2W7RUwKCOqBPMqUZ6cF/ispHyu4kWgVEpw57xEtVmXEyhtGimSuANJtKhxE90EJtFGzR5j+riyMZABiPBVjH6aAyVDnuVkYVLjQIxLVEWca+qtDlLW6x7X/HlK8An/fM61F7F/+nMuIOqyttYRbxG1W9QbVU1AjGGdFJD2fV4gE+XUqSgiBsjWg3aUUGG3YmYcSLKDCFAC6697ByyZP1QPtahlMDpjiKyxSTqPMAWBEWUo4QSdZ1T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OyKg1+Pzk7rZK/kaDbp8DOATQfl+oLkfyHMXXCsFLQ07upNGPeyexECNGYw2etNc4zUTxp864k678Be/D3Ljo0QROf3uqUW8p+IUc7sBGD1TD3GBFP4lkh9U52GEPo6LOFPN0QM0K X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: df2e40b9-e6a6-46f6-37de-08dafe206ad1 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2023 15:34:01.2737 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LHIZjphWEmRJx4iGLswuuG7oX95MAKgZUhkpZkWgz61nRV3DdCcpL3MzuYpthR0y0haO0DZD/sQX1E68Vc8qMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5019 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755920223019773502?= X-GMAIL-MSGID: =?utf-8?q?1755920223019773502?= |
Series |
[1/4] f2fs: fix to check lz4hc compression when CONFIG_F2FS_FS_LZ4HC is not enabled
|
|
Commit Message
李扬韬
Jan. 24, 2023, 3:33 p.m. UTC
If the compress feature is not enabled, there is no need to set
compress-related parameters.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
fs/f2fs/super.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index b5fbe9939390..68ccc9f54c2d 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -2039,10 +2039,12 @@ static void default_options(struct f2fs_sb_info *sbi) F2FS_OPTION(sbi).fsync_mode = FSYNC_MODE_POSIX; F2FS_OPTION(sbi).s_resuid = make_kuid(&init_user_ns, F2FS_DEF_RESUID); F2FS_OPTION(sbi).s_resgid = make_kgid(&init_user_ns, F2FS_DEF_RESGID); - F2FS_OPTION(sbi).compress_algorithm = COMPRESS_LZ4; - F2FS_OPTION(sbi).compress_log_size = MIN_COMPRESS_LOG_SIZE; - F2FS_OPTION(sbi).compress_ext_cnt = 0; - F2FS_OPTION(sbi).compress_mode = COMPR_MODE_FS; + if (f2fs_sb_has_compression(sbi)) { + F2FS_OPTION(sbi).compress_algorithm = COMPRESS_LZ4; + F2FS_OPTION(sbi).compress_log_size = MIN_COMPRESS_LOG_SIZE; + F2FS_OPTION(sbi).compress_ext_cnt = 0; + F2FS_OPTION(sbi).compress_mode = COMPR_MODE_FS; + } F2FS_OPTION(sbi).bggc_mode = BGGC_MODE_ON; F2FS_OPTION(sbi).memory_mode = MEMORY_MODE_NORMAL;