Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5633268rwd; Mon, 12 Jun 2023 07:43:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ79jgLbZ2bTKl6uQXLFDReA5c0j9Y3BLqbMIssNuCAhC+Un6pCabOkDGol6s2FaooH8cIzS X-Received: by 2002:a05:6a00:2d18:b0:646:6e40:b421 with SMTP id fa24-20020a056a002d1800b006466e40b421mr11289838pfb.1.1686581003099; Mon, 12 Jun 2023 07:43:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686581003; cv=none; d=google.com; s=arc-20160816; b=hSP11+Q6BvHTzNUPzijN/iMiUGps0wAI1QCmGCLR75sXvwpyD3r+zEj2U7Pu1f3aw6 zSI6lh3gai1QpXOLXOMrWJwX85V5j4vLm8hQE0ZQy88FzMEZiClkLnVKFklDmjSd+pxW cHRwSvfdzAGd/kj493uUmFGmqPjvDXoJuTkNiXgXkGLNl+EssdZitrrd95DweKYp/vkI 9Fcr16NZgbkUNvKtZlStYLL62bie4BrNXHLb43mvYXcQGRefXPmfOJWouQJBWUwiUsV6 /8LAlEF1Mi0pZAJBXmRkL+UpPzNjiZnPx9dU0oZFqsEie1lrUAhVraUcdgwZWqiRA2Ro nRVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=VrZ4GNFnC3sgYd3sMRUahYToCKoEXjYbz/m7skd0Wrs=; b=EuCga8AUEPgUd2ABFis3AT0uxuGA0hLFpsEQyePzXOvXEaJkAgzpAG1VZCk/jaSiW8 QlzZmyzwL112FLJCaX7DbXRo/JY2V6jmUtDeL3+rl5qOrO63nDEHZvOqTaxpnGUGT8nd DDbjwsxh6BGJjocz8Pok0fsOMx1G35agRiRRqT7TbWF7SWnUk6XQl+B5e7u0BpkuWbFH LL7v/oFEhxtMVzvmRyW8q3hyXp3x2NickvSwWgqrFrz/JfNGlaIanJyPCw3QE2YbNykI q/3sBiVbdZyLqcQmdHpQjYBrLyG76HbXgXm2EU0zbtZXMtH7DEeDUo/BtQq5QeJ47MDI nmqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sDMPNCtc; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s15-20020a63924f000000b0054507258ce0si7108497pgn.234.2023.06.12.07.43.11; Mon, 12 Jun 2023 07:43:23 -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=@kernel.org header.s=k20201202 header.b=sDMPNCtc; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238333AbjFLOWn (ORCPT + 99 others); Mon, 12 Jun 2023 10:22:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237622AbjFLOWa (ORCPT ); Mon, 12 Jun 2023 10:22:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 719281996 for ; Mon, 12 Jun 2023 07:20:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 296EE629FB for ; Mon, 12 Jun 2023 14:18:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B960FC4339B; Mon, 12 Jun 2023 14:18:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686579500; bh=ilN1/jTNe0GA6pB/SlZ9PiNSr53z2qsAMGgSkLjTC2w=; h=Date:Subject:To:References:From:In-Reply-To:From; b=sDMPNCtc0puIdJWz86xkxsdXNL19AE4EeVwLS/TyXZOr2t4P2/4Im0P2qECC30mDP tm4DDNx3P33+vPFwlWlJLludG8YoYq+00Yyj4s87yhihKig8YEA/HtXbG9oH0VsoJb x6qV1O1I4eblUs1+Qes/NOqAysPeciTTpYs7kXxryqySCwqITm22QDxY48FQshiOGS 22PpbsfSiQGZotypAGtQgNuSbVKMFohjb4UY+veEVG7/bqkNuEaP90dBbqyjKhVxZ6 UGzm2a+zLdaVNRPxloxjtB2aaADN3DKtoXD1rM/VkIBHJoZIIlBKuMmGIUzbxr+bWI i/HmVoQEQWMXg== Message-ID: <7af0f599-2314-56af-2813-5e63754134e1@kernel.org> Date: Mon, 12 Jun 2023 22:18:17 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [f2fs-dev] [PATCH] f2fs: compress tmp files given extension Content-Language: en-US To: Jaegeuk Kim , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net References: <20230606203645.3926651-1-jaegeuk@kernel.org> From: Chao Yu In-Reply-To: <20230606203645.3926651-1-jaegeuk@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,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 On 2023/6/7 4:36, Jaegeuk Kim wrote: > Let's compress tmp files for the given extension list. Could you please check below commit? IIRC, it was introduce to avoid compressing file which has unpredictable tmp file, e.g. foo.sox. Could you please describe the case you encounter? commit 4a67d9b07ac8dce7f1034e0d887f2f4ee00fe118 Author: Chao Yu Date: Tue May 18 17:54:58 2021 +0800 f2fs: compress: fix to disallow temp extension This patch restricts to configure compress extension as format of: [filename + '.' + extension] rather than: [filename + '.' + extension + (optional: '.' + temp extension)] in order to avoid to enable compression incorrectly: 1. compress_extension=so 2. touch file.soa 3. touch file.so.tmp Thanks, > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/namei.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c > index 3e35eb7dbb8f..cdc94c8e60f7 100644 > --- a/fs/f2fs/namei.c > +++ b/fs/f2fs/namei.c > @@ -161,7 +161,7 @@ static void set_compress_new_inode(struct f2fs_sb_info *sbi, struct inode *dir, > > /* Compress wanting extension. */ > for (i = 0; i < ext_cnt; i++) { > - if (is_extension_exist(name, ext[i], false)) { > + if (is_extension_exist(name, ext[i], true)) { > set_compress_context(inode); > return; > }