mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Jaegeuk Kim <jaegeuk@kernel.org>,
	linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: compress tmp files given extension
Date: Mon, 12 Jun 2023 22:18:17 +0800	[thread overview]
Message-ID: <7af0f599-2314-56af-2813-5e63754134e1@kernel.org> (raw)
In-Reply-To: <20230606203645.3926651-1-jaegeuk@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 <chao@kernel.org>
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 <jaegeuk@kernel.org>
> ---
>   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;
>   		}

  reply	other threads:[~2023-06-12 14:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-06 20:36 Jaegeuk Kim
2023-06-12 14:18 ` Chao Yu [this message]
2023-06-12 15:36   ` [f2fs-dev] " Jaegeuk Kim
2023-06-13  1:11     ` Chao Yu
2023-06-13 22:14 ` [PATCH v2] " Jaegeuk Kim
2023-06-20 15:14   ` [f2fs-dev] " Chao Yu
2023-06-22  7:10     ` Jaegeuk Kim
2023-06-22  7:12   ` [f2fs-dev] [PATCH v3] " Jaegeuk Kim
2023-06-23  1:41     ` Chao Yu
2023-06-23 19:15     ` [f2fs-dev] [PATCH v4] " Jaegeuk Kim
2023-06-25  2:49       ` Chao Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7af0f599-2314-56af-2813-5e63754134e1@kernel.org \
    --to=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®