f2fs: increase the number of max hard links
Subsystems (2)
Jaegeuk Kim
maintainerPATCH 1/2 f2fs: increase the number of max hard links
This patch increases the number of maximum hard links for one file.
--- fs/f2fs/f2fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/f2fs.h +1 -1
@@ -321,7 +321,7 @@ enum {*/ }; -#define F2FS_LINK_MAX 32000/* maximum link count per file */ +#define F2FS_LINK_MAX 65536/* maximum link count per file */ #define MAX_DIR_RA_PAGES 4/* maximum ra pages of dir */
Signature · 1 line
2.1.1
Jaegeuk Kim
maintainerPATCH 2/2 f2fs: skip checkpoint if there is no dirty segments
We should avoid wrong checkpoints when there is no dirty segments.
--- fs/f2fs/gc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
fs/f2fs/gc.c +3 -2
@@ -809,13 +809,14 @@ gc_more:if (unlikely (f2fs_cp_error (sbi))) goto stop; +if (!__get_victim (sbi, &segno, gc_type)) + goto stop; +if (gc_type ==BG_GC &&has_not_enough_free_secs (sbi, nfree)) { gc_type =FG_GC ;write_checkpoint (sbi, &cpc); } -if (!__get_victim (sbi, &segno, gc_type)) - goto stop; ret =0 ;/* readahead multi ssa blocks those have contiguous address */
Signature · 4 lines
2.1.1 ------------------------------------------------------------------------------
Jaegeuk Kim
maintainerRe: [PATCH 2/2 v2] f2fs: skip checkpoint if there is no dirty segments
Change log from v1:
- fix skipping gc incorrectly
Quoted 1 line
From
06f90d3757a6b7ff524cc112168488f31bbf830fMon Sep 17 00:00:00 2001
From: Jaegeuk Kim <[email protected]>
Date: Tue, 11 Aug 2015 21:59:49 -0700
Subject: [PATCH] f2fs: skip checkpoint if there is no dirty and prefree
segments
We should avoid needless checkpoints when there is no dirty and prefree segment.
--- fs/f2fs/gc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/f2fs/gc.c +2 -1
@@ -811,7 +811,8 @@ gc_more:if (gc_type ==BG_GC &&has_not_enough_free_secs (sbi, nfree)) { gc_type =FG_GC ; -write_checkpoint (sbi, &cpc); +if (dirty_segments (sbi) ||prefree_segments (sbi)) +write_checkpoint (sbi, &cpc); }if (!__get_victim (sbi, &segno, gc_type))
Signature · 1 line
2.1.1
Chao Yu
Reviewed-byRE: [f2fs-dev] [PATCH 2/2 v2] f2fs: skip checkpoint if there is no dirty segments
Quoted 11 lines
-----Original Message-----
From: Jaegeuk Kim [mailto:[email protected]]
Sent: Wednesday, August 12, 2015 1:09 PM
To: [email protected]; [email protected]; [email protected]
Subject: Re: [f2fs-dev] [PATCH 2/2 v2] f2fs: skip checkpoint if there is no dirty segmentsChange log from v1:
- fix skipping gc incorrectlyQuoted 1 line
From
06f90d3757a6b7ff524cc112168488f31bbf830fMon Sep 17 00:00:00 2001
Quoted 8 lines
From: Jaegeuk Kim <[email protected]>
Date: Tue, 11 Aug 2015 21:59:49 -0700
Subject: [PATCH] f2fs: skip checkpoint if there is no dirty and prefree
segmentsWe should avoid needless checkpoints when there is no dirty and prefree segment.
Signed-off-by Jaegeuk Kim <[email protected]>
Jaegeuk Kim
maintainerRe: [f2fs-dev] [PATCH 2/2 v3] f2fs: skip checkpoint if there is no dirty segments
Change log from v2:
- consider omitting current dirty segments
Quoted 1 line
From
181cb245f6a406e89c00976f65a5727956a72942Mon Sep 17 00:00:00 2001
From: Jaegeuk Kim <[email protected]>
Date: Tue, 11 Aug 2015 21:59:49 -0700
Subject: [PATCH] f2fs: skip checkpoint if there is no dirty and prefree
segments
We should avoid needless checkpoints when there is no dirty and prefree segment.
--- fs/f2fs/gc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
fs/f2fs/gc.c +5 -3
@@ -792,7 +792,8 @@ static void do_garbage_collect(struct f2fs_sb_info *sbi, unsigned int segno,int f2fs_gc (struct f2fs_sb_info *sbi) { -unsigned int segno, i; +unsigned int segno =NULL_SEGNO ; +unsigned int i;int gc_type =BG_GC ;int nfree =0 ;int ret =-1 ;
@@ -811,10 +812,11 @@ gc_more:if (gc_type ==BG_GC &&has_not_enough_free_secs (sbi, nfree)) { gc_type =FG_GC ; -write_checkpoint (sbi, &cpc); +if (__get_victim (sbi, &segno, gc_type) ||prefree_segments (sbi)) +write_checkpoint (sbi, &cpc); } -if (!__get_victim (sbi, &segno, gc_type)) +if (segno ==NULL_SEGNO && !__get_victim (sbi, &segno, gc_type)) goto stop; ret =0 ;
Signature · 4 lines
2.1.1 ------------------------------------------------------------------------------
Quoted 11 lines
-----Original Message-----
From: Jaegeuk Kim [mailto:[email protected]]
Sent: Tuesday, August 11, 2015 9:23 AM
To: [email protected]; [email protected]; [email protected]
Cc: Jaegeuk Kim
Subject: [f2fs-dev] [PATCH 1/2] f2fs: increase the number of max hard linksThis patch increases the number of maximum hard links for one file.
Signed-off-by Jaegeuk Kim <[email protected]>
Change log from v1:
o increase to the maximum since we have 32 bit structure
Quoted 1 line
From
448ffa6a623cae1c3537114b9d10f92d1ddf03f5Mon Sep 17 00:00:00 2001
From: Jaegeuk Kim <[email protected]>
Date: Mon, 10 Aug 2015 15:01:12 -0700
Subject: [PATCH] f2fs: increase the number of max hard links
This patch increases the number of maximum hard links for one file.
--- fs/f2fs/f2fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/f2fs.h +1 -1
@@ -322,7 +322,7 @@ enum {*/ }; -#define F2FS_LINK_MAX 32000/* maximum link count per file */ +#define F2FS_LINK_MAX 0xffffffff/* maximum link count per file */ #define MAX_DIR_RA_PAGES 4/* maximum ra pages of dir */
Signature · 3 lines
2.1.1 ------------------------------------------------------------------------------