[f2fs-dev] [PATCH] f2fs: fix to update F2FS_{CP_}WB_DATA count correctly

2017-02-27 Thread Chao Yu
We should only account F2FS_{CP_}WB_DATA IOs for write path, fix it. Signed-off-by: Chao Yu --- fs/f2fs/data.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index b0a2e3faabb2..1375fef11146 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @

[f2fs-dev] [PATCH 1/2] f2fs: fix memory leak of write_io_dummy mempool during umount

2017-02-27 Thread Chao Yu
Signed-off-by: Chao Yu --- fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 751e1068db17..53305880c455 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -818,7 +818,7 @@ static void f2fs_put_super(struct super_block *s

[f2fs-dev] [PATCH 2/2] f2fs: fix to enlarge size of write_io_dummy mempool

2017-02-27 Thread Chao Yu
It needs to double cache size of write_io_dummy mempool, otherwise we may run out of cache in scenraio of Data/Node IOs were issued concurrently. Signed-off-by: Chao Yu --- fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index

[f2fs-dev] [PATCH] f2fs: remove redundant set_page_dirty()

2017-02-27 Thread Yunlei He
This patch remove redundant set_page_dirty in truncate_blocks Signed-off-by: Yunlei He --- fs/f2fs/file.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 36c1565..c6ca00c 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -567,8 +567,7

[f2fs-dev] [PATCH 1/1] f2fs: Fix zoned block device support

2017-02-27 Thread Masato Suzuki
The introduction of the multi-device feature partially broke the support for zoned block devices. In the function f2fs_scan_devices, sbi->devs allocation and initialization is skipped in the case of a single device mount. This result in no device information structure being allocated for the device

[f2fs-dev] [PATCH 2/3] f2fs: add f2fs_drop_inode tracepoint

2017-02-27 Thread Hou Pengyang
Signed-off-by: Hou Pengyang --- fs/f2fs/super.c | 7 +-- include/trace/events/f2fs.h | 7 +++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 751e106..746296e 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -624,6 +

[f2fs-dev] [PATCH 1/3] f2fs: fix a memleak issue

2017-02-27 Thread Hou Pengyang
[fix: ae75f0ca76 f2fs: introduce free nid bitmap] Signed-off-by: Hou Pengyang --- fs/f2fs/node.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 6d43095..353c01d 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -2650,8 +2650,11 @@ i

[f2fs-dev] [PATCH 3/3] f2fs: fix a plint compile warning

2017-02-27 Thread Hou Pengyang
fix such pclint warning: ... Loss of precision (arg. no. 2) (unsigned long long to unsigned int)) Signed-off-by: Hou Pengyang --- fs/f2fs/gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 023f043..418fd98 100644 --- a/fs/f2fs/gc.c +++ b/fs

Re: [f2fs-dev] [PATCH 1/3] f2fs: fix a memleak issue

2017-02-27 Thread Kinglong Mee
On 2/27/2017 21:02, Hou Pengyang wrote: > [fix: ae75f0ca76 f2fs: introduce free nid bitmap] > Signed-off-by: Hou Pengyang > --- > fs/f2fs/node.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c > index 6d43095..353c01d 100644 > --- a/fs

Re: [f2fs-dev] [PATCH] f2fs: skip checkpoint if having a dirty segment but no prefree at BG_GC -> FG_GC

2017-02-27 Thread Jaegeuk Kim
On 02/27, Chao Yu wrote: > On 2017/2/26 3:56, Jaegeuk Kim wrote: > > On 02/25, guoweichao wrote: > >> Hi Jaegeuk, > >> > >> I regard no enough free sections as a precondition when talking about > >> BG_GC -> FG_GC. I mean that for both case a) and b) I mentioned has no > >> enough > >> free sectio

Re: [f2fs-dev] [PATCH 1/1] f2fs: Fix zoned block device support

2017-02-27 Thread Jaegeuk Kim
Hello, On 02/27, Masato Suzuki wrote: > The introduction of the multi-device feature partially broke the support > for zoned block devices. In the function f2fs_scan_devices, sbi->devs > allocation and initialization is skipped in the case of a single device > mount. This result in no device infor

[f2fs-dev] [PATCH] f2fs: avoid to issue redundant discard commands

2017-02-27 Thread Jaegeuk Kim
If segs_per_sec is over 1 like under SMR, previously f2fs issues discard commands redundantly on the same section, since we didn't move end position for the previous discard command. E.g., start end || prefree_bitmap = [010000] A

Re: [f2fs-dev] [PATCH 2/3] f2fs: add bitmaps for empty or full NAT blocks

2017-02-27 Thread Jaegeuk Kim
On 02/27, Chao Yu wrote: > On 2017/2/26 2:34, Jaegeuk Kim wrote: > > On 02/25, Chao Yu wrote: > >> On 2017/2/24 6:54, Jaegeuk Kim wrote: > >>> On 02/23, Chao Yu wrote: > On 2017/2/14 10:06, Jaegeuk Kim wrote: > > ... > >>> > > +static int scan_nat_bits(struct f2fs_sb_info *sbi) > > +{

Re: [f2fs-dev] [PATCH V2] f2fs: introduce free nid bitmap

2017-02-27 Thread Jaegeuk Kim
On 02/27, Chao Yu wrote: > On 2017/2/26 3:02, Jaegeuk Kim wrote: > > On 02/25, Chao Yu wrote: > >> Hi Jaegeuk, > >> > >> I added below diff code into this patch in order to fix incorrectly nid > >> status > >> updating to reduce large latency of generic/251 in fstest, could you help > >> to > >>

Re: [f2fs-dev] [PATCH] f2fs: add a modify discard command function

2017-02-27 Thread Jaegeuk Kim
On 02/27, Yunlei He wrote: > This patch add a function to modify discard command if one segment > reuse before discard. Split this segment from multi-segments discard > range, and discard the left bigger range. Now MAX_DISCARD_BLOCKS() is set to section size, so there will be no multi-sections dis

Re: [f2fs-dev] [PATCH] f2fs: add F2FS_DIRTY_DATA to has_not_enough_free_secs and need_SSR

2017-02-27 Thread Jaegeuk Kim
On 02/25, Yunlong Song wrote: > The benefit is much, let me give an example to make the point more clear, the > reserved_sections for a 64G image is > about 500M, and if the current free_sections is 600M, and the IO pattern is > like this: > > Before this patch: > time 1: node & dent * imeta 20

Re: [f2fs-dev] [PATCH] f2fs: avoid unnecessary fg_gc

2017-02-27 Thread Jaegeuk Kim
On 02/27, heyunlei wrote: > Hi Jaegeuk, > > On 2017/2/27 9:59, Hou Pengyang wrote: > > We use has_not_enough_free_secs to check if there are enough free segments, > > > > (free_sections(sbi) + freed) <= > > (node_secs + 2 * dent_secs + imeta_secs + > > re

Re: [f2fs-dev] [PATCH] f2fs: skip checkpoint if having a dirty segment but no prefree at BG_GC -> FG_GC

2017-02-27 Thread Jaegeuk Kim
On 02/27, Jaegeuk Kim wrote: > On 02/27, Chao Yu wrote: > > On 2017/2/26 3:56, Jaegeuk Kim wrote: > > > On 02/25, guoweichao wrote: > > >> Hi Jaegeuk, > > >> > > >> I regard no enough free sections as a precondition when talking about > > >> BG_GC -> FG_GC. I mean that for both case a) and b) I men

Re: [f2fs-dev] [PATCH] f2fs: add a modify discard command function

2017-02-27 Thread heyunlei
Hi Jaegeuk, On 2017/2/28 7:08, Jaegeuk Kim wrote: > On 02/27, Yunlei He wrote: >> This patch add a function to modify discard command if one segment >> reuse before discard. Split this segment from multi-segments discard >> range, and discard the left bigger range. > > Now MAX_DISCARD_BLOCKS() is

Re: [f2fs-dev] [PATCH 1/3] f2fs: fix a memleak issue

2017-02-27 Thread Hou Pengyang
On 2017/2/27 21:52, Kinglong Mee wrote: > On 2/27/2017 21:02, Hou Pengyang wrote: >> [fix: ae75f0ca76 f2fs: introduce free nid bitmap] >> Signed-off-by: Hou Pengyang >> --- >> fs/f2fs/node.c | 5 - >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/fs/f2fs/node.c b/fs/f2fs

Re: [f2fs-dev] [PATCH] f2fs: avoid unnecessary fg_gc

2017-02-27 Thread heyunlei
On 2017/2/28 7:40, Jaegeuk Kim wrote: > On 02/27, heyunlei wrote: >> Hi Jaegeuk, >> >> On 2017/2/27 9:59, Hou Pengyang wrote: >>> We use has_not_enough_free_secs to check if there are enough free segments, >>> >>> (free_sections(sbi) + freed) <= >>> (node_secs + 2 * dent_secs

Re: [f2fs-dev] [PATCH 2/3 v2] f2fs: add bitmaps for empty or full NAT blocks

2017-02-27 Thread Chao Yu
On 2017/2/24 6:58, Jaegeuk Kim wrote: > @@ -2326,7 +2431,8 @@ void flush_nat_entries(struct f2fs_sb_info *sbi) >* entries, remove all entries from journal and merge them >* into nat entry set. >*/ > - if (!__has_cursum_space(journal, nm_i->dirty_nat_cnt, NAT_JOURNAL)) >

Re: [f2fs-dev] [PATCH 2/3 v2] f2fs: add bitmaps for empty or full NAT blocks

2017-02-27 Thread Jaegeuk Kim
On 02/28, Chao Yu wrote: > On 2017/2/24 6:58, Jaegeuk Kim wrote: > > @@ -2326,7 +2431,8 @@ void flush_nat_entries(struct f2fs_sb_info *sbi) > > * entries, remove all entries from journal and merge them > > * into nat entry set. > > */ > > - if (!__has_cursum_space(journal, nm_i->di