linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH] f2fs: allow set compression option of files without blocks
@ 2023-01-23  9:46 Yangtao Li via Linux-f2fs-devel
  2023-01-29 10:02 ` Chao Yu
  2023-01-30 23:00 ` patchwork-bot+f2fs
  0 siblings, 2 replies; 3+ messages in thread
From: Yangtao Li via Linux-f2fs-devel @ 2023-01-23  9:46 UTC (permalink / raw)
  To: jaegeuk, chao; +Cc: Yangtao Li, linux-kernel, linux-f2fs-devel

Files created by truncate have a size but no blocks, so
they can be allowed to set compression option.

Fixes: e1e8debec656 ("f2fs: add F2FS_IOC_SET_COMPRESS_OPTION ioctl")
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 fs/f2fs/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index b3bcb50490bd..fda04c37b48c 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -3990,7 +3990,7 @@ static int f2fs_ioc_set_compress_option(struct file *filp, unsigned long arg,
 		goto out;
 	}
 
-	if (inode->i_size != 0) {
+	if (F2FS_HAS_BLOCKS(inode)) {
 		ret = -EFBIG;
 		goto out;
 	}
-- 
2.25.1



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: allow set compression option of files without blocks
  2023-01-23  9:46 [f2fs-dev] [PATCH] f2fs: allow set compression option of files without blocks Yangtao Li via Linux-f2fs-devel
@ 2023-01-29 10:02 ` Chao Yu
  2023-01-30 23:00 ` patchwork-bot+f2fs
  1 sibling, 0 replies; 3+ messages in thread
From: Chao Yu @ 2023-01-29 10:02 UTC (permalink / raw)
  To: Yangtao Li, jaegeuk; +Cc: linux-kernel, linux-f2fs-devel

On 2023/1/23 17:46, Yangtao Li wrote:
> Files created by truncate have a size but no blocks, so
> they can be allowed to set compression option.
> 
> Fixes: e1e8debec656 ("f2fs: add F2FS_IOC_SET_COMPRESS_OPTION ioctl")
> Signed-off-by: Yangtao Li <frank.li@vivo.com>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: allow set compression option of files without blocks
  2023-01-23  9:46 [f2fs-dev] [PATCH] f2fs: allow set compression option of files without blocks Yangtao Li via Linux-f2fs-devel
  2023-01-29 10:02 ` Chao Yu
@ 2023-01-30 23:00 ` patchwork-bot+f2fs
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+f2fs @ 2023-01-30 23:00 UTC (permalink / raw)
  To: Yangtao Li; +Cc: jaegeuk, linux-kernel, linux-f2fs-devel

Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:

On Mon, 23 Jan 2023 17:46:01 +0800 you wrote:
> Files created by truncate have a size but no blocks, so
> they can be allowed to set compression option.
> 
> Fixes: e1e8debec656 ("f2fs: add F2FS_IOC_SET_COMPRESS_OPTION ioctl")
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
>  fs/f2fs/file.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - [f2fs-dev] f2fs: allow set compression option of files without blocks
    https://git.kernel.org/jaegeuk/f2fs/c/0f837b84b2af

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html




_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-30 23:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-23  9:46 [f2fs-dev] [PATCH] f2fs: allow set compression option of files without blocks Yangtao Li via Linux-f2fs-devel
2023-01-29 10:02 ` Chao Yu
2023-01-30 23:00 ` patchwork-bot+f2fs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).