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: allow to set compression for inlined file
Date: Tue, 25 Oct 2022 14:57:57 +0800	[thread overview]
Message-ID: <ae5f7c6e-248b-3cf7-b111-a4ddc85dd411@kernel.org> (raw)
In-Reply-To: <20221024233634.803695-1-jaegeuk@kernel.org>

On 2022/10/25 7:36, Jaegeuk Kim wrote:
> The below commit disallows to set compression on empty created file which
> has a inline_data. Let's fix it.
> 
> Fixes: 7165841d578e ("f2fs: fix to check inline_data during compressed inode conversion")
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
>   fs/f2fs/file.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
> index 1c4004c9245f..304fe08edc61 100644
> --- a/fs/f2fs/file.c
> +++ b/fs/f2fs/file.c
> @@ -1915,6 +1915,9 @@ static int f2fs_setflags_common(struct inode *inode, u32 iflags, u32 mask)
>   			if (!f2fs_disable_compressed_file(inode))
>   				return -EINVAL;
>   		} else {
> +			/* try to convert inline_data to support compression */
> +			f2fs_convert_inline_inode(inode);

It needs to check return value of f2fs_convert_inline_inode()?

Thanks,

> +
>   			if (!f2fs_may_compress(inode))
>   				return -EINVAL;
>   			if (S_ISREG(inode->i_mode) && F2FS_HAS_BLOCKS(inode))

  reply	other threads:[~2022-10-25  6:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24 23:36 Jaegeuk Kim
2022-10-25  6:57 ` Chao Yu [this message]
2022-10-25 17:46   ` [f2fs-dev] " Jaegeuk Kim
2022-10-26  1:17     ` Chao Yu
2022-10-26 17:04       ` Jaegeuk Kim
2022-10-26 17:06 ` [PATCH v2] " Jaegeuk Kim
2022-10-27  1:50   ` [f2fs-dev] " 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=ae5f7c6e-248b-3cf7-b111-a4ddc85dd411@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

Powered by JetHome