linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH 1/2] f2fs: convert to use F2FS_SMALL_VOLUME_IPU_POLICY macro
@ 2023-06-13  7:51 Yangtao Li via Linux-f2fs-devel
  2023-06-13  7:51 ` [f2fs-dev] [PATCH 2/2] f2fs: convert to use sbi directly Yangtao Li via Linux-f2fs-devel
  2023-06-22  7:11 ` [f2fs-dev] [PATCH 1/2] f2fs: convert to use F2FS_SMALL_VOLUME_IPU_POLICY macro patchwork-bot+f2fs
  0 siblings, 2 replies; 4+ messages in thread
From: Yangtao Li via Linux-f2fs-devel @ 2023-06-13  7:51 UTC (permalink / raw)
  To: Jaegeuk Kim, Chao Yu; +Cc: linux-f2fs-devel, linux-kernel, Yangtao Li

Just for cleanup.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 fs/f2fs/segment.h | 2 ++
 fs/f2fs/super.c   | 3 +--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index 2ca8fb5d0dc4..28ccbaffe546 100644
--- a/fs/f2fs/segment.h
+++ b/fs/f2fs/segment.h
@@ -708,6 +708,8 @@ enum {
 	F2FS_IPU_MAX,
 };
 
+#define F2FS_SMALL_VOLUME_IPU_POLICY (BIT(F2FS_IPU_FORCE) | BIT(F2FS_IPU_HONOR_OPU_WRITE))
+
 static inline bool IS_F2FS_IPU_DISABLE(struct f2fs_sb_info *sbi)
 {
 	return SM_I(sbi)->ipu_policy == F2FS_IPU_DISABLE;
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 1b2c788ed80d..375a178540d6 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -4314,8 +4314,7 @@ static void f2fs_tuning_parameters(struct f2fs_sb_info *sbi)
 			SM_I(sbi)->dcc_info->discard_granularity =
 						MIN_DISCARD_GRANULARITY;
 		if (!f2fs_lfs_mode(sbi))
-			SM_I(sbi)->ipu_policy = BIT(F2FS_IPU_FORCE) |
-						BIT(F2FS_IPU_HONOR_OPU_WRITE);
+			SM_I(sbi)->ipu_policy = F2FS_SMALL_VOLUME_IPU_POLICY;
 	}
 
 	sbi->readdir_ra = true;
-- 
2.39.0



_______________________________________________
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] 4+ messages in thread

* [f2fs-dev] [PATCH 2/2] f2fs: convert to use sbi directly
  2023-06-13  7:51 [f2fs-dev] [PATCH 1/2] f2fs: convert to use F2FS_SMALL_VOLUME_IPU_POLICY macro Yangtao Li via Linux-f2fs-devel
@ 2023-06-13  7:51 ` Yangtao Li via Linux-f2fs-devel
  2023-06-19  5:15   ` Chao Yu
  2023-06-22  7:11 ` [f2fs-dev] [PATCH 1/2] f2fs: convert to use F2FS_SMALL_VOLUME_IPU_POLICY macro patchwork-bot+f2fs
  1 sibling, 1 reply; 4+ messages in thread
From: Yangtao Li via Linux-f2fs-devel @ 2023-06-13  7:51 UTC (permalink / raw)
  To: Jaegeuk Kim, Chao Yu; +Cc: linux-f2fs-devel, linux-kernel, Yangtao Li

F2FS_I_SB(inode) is redundant.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 fs/f2fs/file.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 41e7c2b80f31..f45d05c13ae5 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -3476,7 +3476,7 @@ static int f2fs_release_compress_blocks(struct file *filp, unsigned long arg)
 	int ret;
 	int writecount;
 
-	if (!f2fs_sb_has_compression(F2FS_I_SB(inode)))
+	if (!f2fs_sb_has_compression(sbi))
 		return -EOPNOTSUPP;
 
 	if (!f2fs_compressed_file(inode))
@@ -3489,7 +3489,7 @@ static int f2fs_release_compress_blocks(struct file *filp, unsigned long arg)
 	if (ret)
 		return ret;
 
-	f2fs_balance_fs(F2FS_I_SB(inode), true);
+	f2fs_balance_fs(sbi, true);
 
 	inode_lock(inode);
 
@@ -3646,7 +3646,7 @@ static int f2fs_reserve_compress_blocks(struct file *filp, unsigned long arg)
 	unsigned int reserved_blocks = 0;
 	int ret;
 
-	if (!f2fs_sb_has_compression(F2FS_I_SB(inode)))
+	if (!f2fs_sb_has_compression(sbi))
 		return -EOPNOTSUPP;
 
 	if (!f2fs_compressed_file(inode))
@@ -3662,7 +3662,7 @@ static int f2fs_reserve_compress_blocks(struct file *filp, unsigned long arg)
 	if (atomic_read(&F2FS_I(inode)->i_compr_blocks))
 		goto out;
 
-	f2fs_balance_fs(F2FS_I_SB(inode), true);
+	f2fs_balance_fs(sbi, true);
 
 	inode_lock(inode);
 
@@ -4056,7 +4056,7 @@ static int f2fs_ioc_decompress_file(struct file *filp)
 	if (!f2fs_compressed_file(inode))
 		return -EINVAL;
 
-	f2fs_balance_fs(F2FS_I_SB(inode), true);
+	f2fs_balance_fs(sbi, true);
 
 	file_start_write(filp);
 	inode_lock(inode);
@@ -4131,7 +4131,7 @@ static int f2fs_ioc_compress_file(struct file *filp)
 	if (!f2fs_compressed_file(inode))
 		return -EINVAL;
 
-	f2fs_balance_fs(F2FS_I_SB(inode), true);
+	f2fs_balance_fs(sbi, true);
 
 	file_start_write(filp);
 	inode_lock(inode);
-- 
2.39.0



_______________________________________________
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] 4+ messages in thread

* Re: [f2fs-dev] [PATCH 2/2] f2fs: convert to use sbi directly
  2023-06-13  7:51 ` [f2fs-dev] [PATCH 2/2] f2fs: convert to use sbi directly Yangtao Li via Linux-f2fs-devel
@ 2023-06-19  5:15   ` Chao Yu
  0 siblings, 0 replies; 4+ messages in thread
From: Chao Yu @ 2023-06-19  5:15 UTC (permalink / raw)
  To: Yangtao Li, Jaegeuk Kim; +Cc: linux-kernel, linux-f2fs-devel

On 2023/6/13 15:51, Yangtao Li wrote:
> F2FS_I_SB(inode) is redundant.
> 
> 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] 4+ messages in thread

* Re: [f2fs-dev] [PATCH 1/2] f2fs: convert to use F2FS_SMALL_VOLUME_IPU_POLICY macro
  2023-06-13  7:51 [f2fs-dev] [PATCH 1/2] f2fs: convert to use F2FS_SMALL_VOLUME_IPU_POLICY macro Yangtao Li via Linux-f2fs-devel
  2023-06-13  7:51 ` [f2fs-dev] [PATCH 2/2] f2fs: convert to use sbi directly Yangtao Li via Linux-f2fs-devel
@ 2023-06-22  7:11 ` patchwork-bot+f2fs
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+f2fs @ 2023-06-22  7:11 UTC (permalink / raw)
  To: Yangtao Li; +Cc: jaegeuk, linux-kernel, linux-f2fs-devel

Hello:

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

On Tue, 13 Jun 2023 15:51:56 +0800 you wrote:
> Just for cleanup.
> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
>  fs/f2fs/segment.h | 2 ++
>  fs/f2fs/super.c   | 3 +--
>  2 files changed, 3 insertions(+), 2 deletions(-)

Here is the summary with links:
  - [f2fs-dev,1/2] f2fs: convert to use F2FS_SMALL_VOLUME_IPU_POLICY macro
    (no matching commit)
  - [f2fs-dev,2/2] f2fs: convert to use sbi directly
    https://git.kernel.org/jaegeuk/f2fs/c/08f83cb23a3e

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] 4+ messages in thread

end of thread, other threads:[~2023-06-22  7:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-13  7:51 [f2fs-dev] [PATCH 1/2] f2fs: convert to use F2FS_SMALL_VOLUME_IPU_POLICY macro Yangtao Li via Linux-f2fs-devel
2023-06-13  7:51 ` [f2fs-dev] [PATCH 2/2] f2fs: convert to use sbi directly Yangtao Li via Linux-f2fs-devel
2023-06-19  5:15   ` Chao Yu
2023-06-22  7:11 ` [f2fs-dev] [PATCH 1/2] f2fs: convert to use F2FS_SMALL_VOLUME_IPU_POLICY macro 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).