Skip to contentSkip to conversation

f2fs: clean up the unused variable additional_reserved_segments

PATCH Applied LongPing Wei via Linux-f2fs-devel 1 participant 3 messages Oct 29, 2024 – Nov 7, 2024 F2FS file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 f2fs: clean up the unused variable additional_reserved_segments

additional_reserved_segments was introduced by
commit 300a842937fb ("f2fs: fix to reserve space for IO align feature"), and its initialization was deleted by
commit 87161a2b0aed ("f2fs: deprecate io_bits").

---
 fs/f2fs/f2fs.h    | 1 -
 fs/f2fs/segment.h | 3 +--
 fs/f2fs/sysfs.c   | 4 +---
 3 files changed, 2 insertions(+), 6 deletions(-)
fs/f2fs/f2fs.h +0 -1
index c13812dc7d3b..119706dbaefa 100644
@@ -1064,7 +1064,6 @@ struct f2fs_sm_info {
 	unsigned int segment_count;	/* total # of segments */
 	unsigned int main_segments;	/* # of segments in main area */
 	unsigned int reserved_segments;	/* # of reserved segments */
-	unsigned int additional_reserved_segments;/* reserved segs for IO align feature */
 	unsigned int ovp_segments;	/* # of overprovision segments */
 
 	/* a threshold to reclaim prefree segments */
fs/f2fs/segment.h +1 -2
index d440fdb83ca4..943be4f1d6d2 100644
@@ -522,8 +522,7 @@ static inline unsigned int free_segments(struct f2fs_sb_info *sbi)
 
 static inline unsigned int reserved_segments(struct f2fs_sb_info *sbi)
 {
-	return SM_I(sbi)->reserved_segments +
-			SM_I(sbi)->additional_reserved_segments;
+	return SM_I(sbi)->reserved_segments;
 }
 
 static inline unsigned int free_sections(struct f2fs_sb_info *sbi)
fs/f2fs/sysfs.c +1 -3
index e51304bc65ea..bdbf24db667b 100644
@@ -501,9 +501,7 @@ static ssize_t __sbi_store(struct f2fs_attr *a,
 	if (a->struct_type == RESERVED_BLOCKS) {
 		spin_lock(&sbi->stat_lock);
 		if (t > (unsigned long)(sbi->user_block_count -
-				F2FS_OPTION(sbi).root_reserved_blocks -
-				SEGS_TO_BLKS(sbi,
-				SM_I(sbi)->additional_reserved_segments))) {
+				F2FS_OPTION(sbi).root_reserved_blocks)) {
 			spin_unlock(&sbi->stat_lock);
 			return -EINVAL;
 		}
Signature · 8 lines
2.34.1



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
author Reviewed-by Chao Yu on v1 1/1
#1 lore raw
Quoted 6 lines · LongPing Wei

additional_reserved_segments was introduced by
commit 300a842937fb ("f2fs: fix to reserve space for IO align feature"), and its initialization was deleted by
commit 87161a2b0aed ("f2fs: deprecate io_bits").

Thanks,

_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

#2 lore raw
In reply to LongPing Wei via Linux-f2fs-devel

Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <[email protected]>:

Quoted 8 lines · On Tue, 29 Oct 2024 18:49:07 +0800 you wrote:

additional_reserved_segments was introduced by
commit 300a842937fb ("f2fs: fix to reserve space for IO align feature"), and its initialization was deleted by
commit 87161a2b0aed ("f2fs: deprecate io_bits").

[...]

Here is the summary with links:
- [f2fs-dev] f2fs: clean up the unused variable additional_reserved_segments

    https://git.kernel.org/jaegeuk/f2fs/c/1df2bc3c8252

You are awesome, thank you!

Signature · 10 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html




_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel