* [f2fs-dev] [PATCH RFC] f2fs: only set release for file that has compressed data
@ 2023-06-27 12:21 Sheng Yong via Linux-f2fs-devel
2023-06-29 1:43 ` Chao Yu
2023-06-30 23:40 ` patchwork-bot+f2fs
0 siblings, 2 replies; 3+ messages in thread
From: Sheng Yong via Linux-f2fs-devel @ 2023-06-27 12:21 UTC (permalink / raw)
To: jaegeuk, chao; +Cc: linux-kernel, linux-f2fs-devel
If a file is not comprssed yet or does not have compressed data,
for example, its data has a very low compression ratio, do not
set FI_COMPRESS_RELEASED flag.
Signed-off-by: Sheng Yong <shengyong@oppo.com>
---
fs/f2fs/file.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index b1a4de3b53e01..0f54c1ff02f71 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -3510,13 +3510,15 @@ static int f2fs_release_compress_blocks(struct file *filp, unsigned long arg)
if (ret)
goto out;
+ if (!atomic_read(&F2FS_I(inode)->i_compr_blocks)) {
+ ret = -EPERM;
+ goto out;
+ }
+
set_inode_flag(inode, FI_COMPRESS_RELEASED);
inode->i_ctime = current_time(inode);
f2fs_mark_inode_dirty_sync(inode, true);
- if (!atomic_read(&F2FS_I(inode)->i_compr_blocks))
- goto out;
-
f2fs_down_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]);
filemap_invalidate_lock(inode->i_mapping);
--
2.40.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 RFC] f2fs: only set release for file that has compressed data
2023-06-27 12:21 [f2fs-dev] [PATCH RFC] f2fs: only set release for file that has compressed data Sheng Yong via Linux-f2fs-devel
@ 2023-06-29 1:43 ` Chao Yu
2023-06-30 23:40 ` patchwork-bot+f2fs
1 sibling, 0 replies; 3+ messages in thread
From: Chao Yu @ 2023-06-29 1:43 UTC (permalink / raw)
To: Sheng Yong, jaegeuk; +Cc: linux-kernel, linux-f2fs-devel
On 2023/6/27 20:21, Sheng Yong wrote:
> If a file is not comprssed yet or does not have compressed data,
> for example, its data has a very low compression ratio, do not
> set FI_COMPRESS_RELEASED flag.
>
> Signed-off-by: Sheng Yong <shengyong@oppo.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 RFC] f2fs: only set release for file that has compressed data
2023-06-27 12:21 [f2fs-dev] [PATCH RFC] f2fs: only set release for file that has compressed data Sheng Yong via Linux-f2fs-devel
2023-06-29 1:43 ` Chao Yu
@ 2023-06-30 23:40 ` patchwork-bot+f2fs
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+f2fs @ 2023-06-30 23:40 UTC (permalink / raw)
To: Sheng Yong; +Cc: jaegeuk, linux-kernel, linux-f2fs-devel
Hello:
This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:
On Tue, 27 Jun 2023 20:21:53 +0800 you wrote:
> If a file is not comprssed yet or does not have compressed data,
> for example, its data has a very low compression ratio, do not
> set FI_COMPRESS_RELEASED flag.
>
> Signed-off-by: Sheng Yong <shengyong@oppo.com>
> ---
> fs/f2fs/file.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
Here is the summary with links:
- [f2fs-dev,RFC] f2fs: only set release for file that has compressed data
https://git.kernel.org/jaegeuk/f2fs/c/87a91a155902
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-06-30 23:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-27 12:21 [f2fs-dev] [PATCH RFC] f2fs: only set release for file that has compressed data Sheng Yong via Linux-f2fs-devel
2023-06-29 1:43 ` Chao Yu
2023-06-30 23:40 ` 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).