[f2fs-dev] [PATCH] f2fs: optimize the way of traversing free_nid_bitmap

2017-11-07 Thread Fan Li
third of its original. Signed-off-by: Fan li <fanofcode...@samsung.com> --- fs/f2fs/node.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index fef5c68..d234c6e 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1955,6 +

Re: [f2fs-dev] [PATCH] f2fs: keep scanning until enough free nids are acquired

2017-11-06 Thread Fan Li
> -Original Message- > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > Sent: Tuesday, November 07, 2017 11:41 AM > To: Fan Li > Cc: 'Chao Yu'; 'Chao Yu'; linux-ker...@vger.kernel.org; > linux-f2fs-devel@lists.sourceforge.net > Subject: Re: [f2fs-dev] [PATCH] f2fs

[f2fs-dev] [PATCH] f2fs: keep scanning until enough free nids are acquired

2017-11-06 Thread Fan Li
solving the shortage of the free nids. This patch fixes that. Signed-off-by: Fan li <fanofcode...@samsung.com> --- fs/f2fs/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 3d0d1be..5cef118 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/

Re: [f2fs-dev] [PATCH RESEND] f2fs: modify the procedure of scan free nid

2017-11-05 Thread Fan Li
> -Original Message- > From: Chao Yu [mailto:c...@kernel.org] > Sent: Friday, November 03, 2017 9:16 PM > To: Fan Li; 'Chao Yu'; 'Jaegeuk Kim' > Cc: linux-ker...@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net > Subject: Re: [f2fs-dev] [PATCH RESEND] f2fs: mo

Re: [f2fs-dev] [PATCH RESEND] f2fs: modify the procedure of scan free nid

2017-11-03 Thread Fan Li
> -Original Message- > From: Chao Yu [mailto:yuch...@huawei.com] > Sent: Friday, November 03, 2017 4:54 PM > To: Fan Li; 'Chao Yu'; 'Jaegeuk Kim' > Cc: linux-ker...@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net > Subject: Re: [f2fs-dev] [PATCH RESEND] f2fs: mo

[f2fs-dev] [PATCH RESEND] f2fs: modify the procedure of scan free nid

2017-11-03 Thread Fan Li
ans all free nids before next_scan_nid are already in free list; and use next_scan_nid as the end of the range since all free nids which are scanned in scan_free_nid_bits must be smaller next_scan_nid. Signed-off-by: Fan li <fanofcode...@samsung.com> --- fs/f2fs/f2fs.h | 1 + fs/f2fs/no

[f2fs-dev] [PATCH] f2fs: save a multiplication for last_nid calculation

2017-11-01 Thread Fan Li
Use a slightly easier way to calculate last_nid. Signed-off-by: Fan li <fanofcode...@samsung.com> --- fs/f2fs/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 7834097..55ab330 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/

Re: [f2fs-dev] [PATCH] f2fs: modify the procedure of scan free nid

2017-11-01 Thread Fan Li
> -Original Message- > From: Chao Yu [mailto:c...@kernel.org] > Sent: Wednesday, November 01, 2017 8:47 PM > To: Fan Li; 'Jaegeuk Kim' > Cc: linux-ker...@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net > Subject: Re: [f2fs-dev] [PATCH] f2fs: modify the procedur

Re: [f2fs-dev] [PATCH] f2fs: modify the procedure of scan free nid

2017-11-01 Thread Fan Li
> -Original Message- > From: Chao Yu [mailto:c...@kernel.org] > Sent: Tuesday, October 31, 2017 10:32 PM > To: Fan Li; 'Jaegeuk Kim' > Cc: linux-ker...@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net > Subject: Re: [f2fs-dev] [PATCH] f2fs: modify the procedur

[f2fs-dev] [PATCH] f2fs: modify the procedure of scan free nid

2017-10-31 Thread Fan Li
ist; and use next_scan_nid as the end of the range since all free nids which are scanned must be smaller next_scan_nid. Signed-off-by: Fan li <fanofcode...@samsung.com> --- fs/f2fs/f2fs.h | 1 + fs/f2fs/node.c | 30 ++ 2 files changed, 27 insertions(+), 4

Re: [f2fs-dev] [PATCH] f2fs: add a function to move nid

2017-10-30 Thread Fan Li
> -Original Message- > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > Sent: Monday, October 30, 2017 5:30 PM > To: Chao Yu > Cc: Fan Li; 'Chao Yu'; linux-ker...@vger.kernel.org; > linux-f2fs-devel@lists.sourceforge.net > Subject: Re: [f2fs-dev] [PATCH] f2fs: add a

[f2fs-dev] [PATCH] f2fs: optimize __update_nat_bits

2017-10-30 Thread Fan Li
better that we don't assume @start_nid is the first nid of the nat block it's in. 3. Use " if (nat_blk->entries[i].block_addr != NULL_ADDR)" to explicitly comfirm the value of block_addr use constant to make sure the codes is right, even if the value of NULL_ADDR changes.

[f2fs-dev] [PATCH] f2fs: add a function to move nid

2017-10-28 Thread Fan Li
This patch add a new function to move nid from one state to another. Move operation is heavily used, by adding a new function for it we can cut down some branches from several flow. Signed-off-by: Fan li <fanofcode...@samsung.com> --- fs/f2fs/node.

[f2fs-dev] [PATCH] f2fs: simplify the way of calulating next nat address

2017-06-02 Thread Fan Li
The index of segment which the next nat block is in has only one different bit than the current one, so to get the next nat address, we can simply alter that one bit. Signed-off-by: Fan Li <fanofcode...@samsung.com> --- fs/f2fs/node.h | 5 + 1 file changed, 1 insertion(+), 4 del

Re: [f2fs-dev] [PATCH] f2fs: adjust the way of calculating nat block

2017-03-08 Thread Fan Li
> -Original Message- > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > Sent: Thursday, March 09, 2017 5:56 AM > To: Fan Li > Cc: linux-f2fs-devel@lists.sourceforge.net > Subject: Re: [f2fs-dev] [PATCH] f2fs: adjust the way of calculating nat block > > On 03/0

[f2fs-dev] [PATCH] f2fs: adjust the way of calculating nat block

2017-03-07 Thread Fan Li
use a slightly simpler expression to calculate nat block with nid. Signed-off-by: Fan Li <fanofcode...@samsung.com> --- fs/f2fs/node.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h index 2f9603f..f9fb5b8 100644 --- a/fs/f2fs/node.h

[f2fs-dev] [PATCH] f2fs: exclude special cases for f2fs_move_file_range

2016-09-12 Thread Fan Li
source region and destination region is actually the same part of the same file. Signed-off-by: Fan li <fanofcode...@samsung.com> --- fs/f2fs/file.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index d5f60ad..116946b 100644 --- a/fs/f2fs/file.c

Re: [f2fs-dev] [PATCH] f2fs: modify the readahead method in ra_node_page()

2016-03-01 Thread Fan Li
> -Original Message- > From: Chao Yu [mailto:chao2...@samsung.com] > Sent: Tuesday, March 01, 2016 5:53 PM > To: 'Fan Li'; 'Jaegeuk Kim' > Cc: linux-f2fs-devel@lists.sourceforge.net > Subject: RE: [f2fs-dev] [PATCH] f2fs: modify the readahead method in > r

Re: [f2fs-dev] [PATCH v2] f2fs-tools: set segment_count in super block correctly

2016-02-29 Thread Fan Li
> -Original Message- > From: Junling Zheng [mailto:zhengjunl...@huawei.com] > Sent: Wednesday, February 24, 2016 4:34 PM > To: Fan Li; 'Jaegeuk Kim' > Cc: heyun...@huawei.com; linux-f2fs-devel@lists.sourceforge.net > Subject: Re: [f2fs-dev] [PATCH v2] f2fs-tools:

[f2fs-dev] [PATCH] f2fs: modify the readahead method in ra_node_page()

2016-02-28 Thread Fan Li
. Signed-off-by: Fan li <fanofcode...@samsung.com> --- fs/f2fs/node.c |9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 511c0e7..6d8f107 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1080,12 +1080,11 @@ void ra_nod

Re: [f2fs-dev] [PATCH v2] f2fs-tools: set segment_count in super block correctly

2016-02-23 Thread Fan Li
> -Original Message- > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > Sent: Saturday, February 06, 2016 12:08 PM > To: Fan Li > Cc: 'Junling Zheng'; heyun...@huawei.com; > linux-f2fs-devel@lists.sourceforge.net > Subject: Re: [f2fs-dev] [PATCH v2] f2fs-tools: set s

Re: [f2fs-dev] [PATCH v2] f2fs-tools: set segment_count in super block correctly

2016-02-04 Thread Fan Li
> -Original Message- > From: Junling Zheng [mailto:zhengjunl...@huawei.com] > Sent: Thursday, February 04, 2016 10:52 AM > To: Fan Li; 'Jaegeuk Kim'; heyun...@huawei.com > Cc: linux-f2fs-devel@lists.sourceforge.net > Subject: Re: [f2fs-dev] [PATCH v2] f2fs-tools:

[f2fs-dev] [PATCH] f2fs: avoid unnecessary search while finding victim in gc

2016-02-03 Thread Fan Li
. Signed-off-by: Fan li <fanofcode...@samsung.com> --- fs/f2fs/gc.c | 33 + 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index c958321..47ade35 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -245,6 +245,18 @@ static

[f2fs-dev] [PATCH v2] f2fs-tools: set segment_count in super block correctly

2016-02-02 Thread Fan Li
section size first to prevent such problem. Signed-off-by: Fan Li <fanofcode...@samsung.com> --- mkfs/f2fs_format.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c index 66d7342..3366302 100644 --- a/mkfs/f2fs_format.c +++ b/

[f2fs-dev] [PATCH] f2fs-tools: set segment_count in super block correctly

2016-02-01 Thread Fan Li
section size to prevent such problem. Signed-off-by: Fan Li <fanofcode...@samsung.com> --- mkfs/f2fs_format.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c index 66d7342..aab2491 100644 --- a/mkfs/f2fs_format.c +++ b/mkfs/f2fs_

[f2fs-dev] [PATCH] f2fs: optimize f2fs_write_cache_pages()

2016-01-18 Thread Fan Li
. I also found another two problems and describe them in comment beginning with "FIXME". I tried to fix them, but my method is too complex, so I mark it and hope someone else has better solution. Signed-off-by: Fan li <fanofcode...@samsung.com> --- fs/f2

Re: [f2fs-dev] [PATCH 2/3] f2fs: support finding extents after isize

2016-01-04 Thread Fan Li
> -Original Message- > From: Chao Yu [mailto:chao2...@samsung.com] > Sent: Monday, January 04, 2016 6:00 PM > To: 'Fan Li'; 'Jaegeuk Kim' > Cc: linux-f2fs-devel@lists.sourceforge.net > Subject: RE: [f2fs-dev] [PATCH 2/3] f2fs: support finding extents after isize &g

Re: [f2fs-dev] [PATCH 2/3] f2fs: support finding extents after isize

2016-01-04 Thread Fan Li
> -Original Message- > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > Sent: Monday, January 04, 2016 2:56 PM > To: Fan Li > Cc: 'Chao Yu'; linux-f2fs-devel@lists.sourceforge.net > Subject: Re: [f2fs-dev] [PATCH 2/3] f2fs: support finding extents after isize > >

Re: [f2fs-dev] [PATCH 2/3] f2fs: support finding extents after isize

2016-01-04 Thread Fan Li
> -Original Message- > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > Sent: Tuesday, January 05, 2016 7:14 AM > To: Fan Li > Cc: 'Chao Yu'; linux-f2fs-devel@lists.sourceforge.net > Subject: Re: [f2fs-dev] [PATCH 2/3] f2fs: support finding extents after isize > >

Re: [f2fs-dev] [PATCH 2/3] f2fs: support finding extents after isize

2016-01-04 Thread Fan Li
> -Original Message- > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > Sent: Tuesday, January 05, 2016 11:08 AM > To: Fan Li; ""@jaegeuk-2.local > Cc: 'Chao Yu'; linux-f2fs-devel@lists.sourceforge.net > Subject: Re: [f2fs-dev] [PATCH 2/3] f2fs: support

Re: [f2fs-dev] [PATCH 2/3] f2fs: support finding extents after isize

2016-01-03 Thread Fan Li
> -Original Message- > From: Chao Yu [mailto:chao2...@samsung.com] > Sent: Thursday, December 31, 2015 2:34 PM > To: 'Fan Li'; 'Jaegeuk Kim' > Cc: linux-f2fs-devel@lists.sourceforge.net > Subject: RE: [f2fs-dev] [PATCH 2/3] f2fs: support finding extents after isize &g

Re: [f2fs-dev] [PATCH 1/3] f2fs: avoid calling i_size_read when it's unnecessary

2016-01-03 Thread Fan Li
> -Original Message- > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > Sent: Friday, January 01, 2016 11:08 AM > To: Fan Li > Cc: linux-f2fs-devel@lists.sourceforge.net > Subject: Re: [f2fs-dev] [PATCH 1/3] f2fs: avoid calling i_size_read when it's > unnecessary >

Re: [f2fs-dev] [PATCH 1/3] f2fs: avoid calling i_size_read when it's unnecessary

2015-12-30 Thread Fan Li
> -Original Message- > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > Sent: Thursday, December 31, 2015 2:28 AM > To: Fan Li > Cc: linux-f2fs-devel@lists.sourceforge.net > Subject: Re: [f2fs-dev] [PATCH 1/3] f2fs: avoid calling i_size_read when it's > un

Re: [f2fs-dev] [PATCH 2/3] f2fs: support finding extents after isize

2015-12-30 Thread Fan Li
> -Original Message- > From: Chao Yu [mailto:c...@kernel.org] > Sent: Wednesday, December 30, 2015 9:28 PM > To: Fan Li; 'Jaegeuk Kim' > Cc: linux-f2fs-devel@lists.sourceforge.net > Subject: Re: [f2fs-dev] [PATCH 2/3] f2fs: support finding extents after isize > >

[f2fs-dev] [PATCH 1/3] f2fs: avoid calling i_size_read when it's unnecessary

2015-12-30 Thread Fan Li
i_size_read does more than reading a value, it's best that we use it only when we need it. Signed-off-by: Fan li <fanofcode...@samsung.com> --- fs/f2fs/data.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index d67c599..a9a4d89

[f2fs-dev] [PATCH] f2fs: fix bugs and simplify codes of f2fs_fiemap

2015-12-26 Thread Fan Li
at isize, it will also return the extent beyond isize, which is outside the range. Signed-off-by: Fan li <fanofcode...@samsung.com> --- fs/f2fs/data.c | 80 +++- 1 file changed, 27 insertions(+), 53 deletions(-) diff --git a/fs/f2fs/data.

[f2fs-dev] [PATCH] f2fs: optimize the flow of f2fs_map_blocks

2015-12-16 Thread Fan Li
check map->m_len right after it changes to avoid excess call to update dnode_of_data. Signed-off-by: Fan li <fanofcode...@samsung.com> --- fs/f2fs/data.c | 69 +--- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git

[f2fs-dev] [PATCH] f2fs: write only the pages in range during defragment

2015-12-13 Thread Fan Li
@lend of filemap_write_and_wait_range is supposed to be a "offset in bytes where the range ends (inclusive)". Subtract 1 to avoid writing an extra page. Signed-off-by: Fan li <fanofcode...@samsung.com> --- fs/f2fs/file.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[f2fs-dev] [PATCH] f2fs: fix to update variable correctly when skip a unmapped block

2015-12-13 Thread Fan Li
map.m_len should be reduced after skip a block Signed-off-by: Fan li <fanofcode...@samsung.com> --- fs/f2fs/file.c |1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 5fac4f2..9949d0f 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1759,6 +

[f2fs-dev] [PATCH] f2fs: optimize __find_rev_next_bit

2015-11-11 Thread Fan Li
1. Skip __reverse_ulong if the bitmap is empty. 2. Reduce branches and codes. According to my test, the performance of this new version is 5% higher on an empty bitmap of 64bytes, and remains about the same in the worst scenario. Signed-off-by: Fan li <fanofcode...@samsung.com> --- f

Re: [f2fs-dev] [PATCH] f2fs: refactor __find_rev_next_{zero}_bit

2015-11-05 Thread Fan Li
In bitmaps of f2fs, bytes are sorted in ascending order, but bits in a byte are sorted in descending order. It seems to be the reason why __reverse_ulong is needed. May I ask why f2fs bitmap apply such order? > -Original Message- > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > Sent:

[f2fs-dev] [PATCH 1/2] f2fs: drop largest extent by range

2015-09-17 Thread Fan Li
now we update extent by range, fofs may not be on the largest extent if the new extent overlaps with it. so add a new function to drop largest extent properly. Signed-off-by: Fan li <fanofcode...@samsung.com> --- fs/f2fs/extent_cache.c |9 + 1 file changed, 5 insertions

Re: [f2fs-dev] [PATCH v2] f2fs: optimize code of f2fs_update_extent_tree_range

2015-09-16 Thread Fan Li
> -Original Message- > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > Sent: Wednesday, September 16, 2015 2:37 AM > To: Fan Li > Cc: linux-f2fs-devel@lists.sourceforge.net > Subject: Re: [f2fs-dev] [PATCH v2] f2fs: optimize code of > f2fs_update_extent_t

[f2fs-dev] [PATCH] f2fs: optimize code of f2fs_update_extent_tree_range

2015-09-08 Thread Fan Li
the procedues that split extent into two. Signed-off-by: Fan li <fanofcode...@samsung.com> --- fs/f2fs/extent_cache.c | 150 +++- 1 file changed, 58 insertions(+), 92 deletions(-) diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c

[f2fs-dev] [PATCH] f2fs: add new interfaces for extent tree

2015-07-15 Thread Fan Li
to insert this extent directly, and save the time of searching down the tree. As long as tree remains unchanged between lookup and insertion, this would work fine. And the new lookup would be useful when add multi-blocks extent support for insertion interface. Signed-off-by: Fan li fanofcode

Re: [f2fs-dev] [PATCH] f2fs: change the method of calculating the number summary blocks

2013-10-29 Thread Fan Li
Hi, 2013-10-28 (월), 08:54 +, Fan Li: There is a HTML error in the previous email, so I send this one.If you already received this before, please ignore it.Sorry for the inconvenience This patch change the method of calculating the number of summary blocks in function

[f2fs-dev] [PATCH] f2fs: change the method of calculating the number summary blocks

2013-10-28 Thread Fan Li
can't be split to two pages, so it could take more space than the sum of its size, the current version seems not to take it into account. Signed-off-by: Fan Li fanofcode...@samsung.com --- fs/f2fs/segment.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/fs/f2fs