Re: [PATCH] f2fs: update cur_valid_map_mir together with cur_valid_map

2017-08-02 Thread Yunlong Song
: Hi Yunlong, On 2017/8/2 0:59, Yunlong Song wrote: Hi Chao, I think there is no need to test mirror bitmap when original bitmap's check get passed, it is an instruction waste for "test". By the way, previous patch uses WARN to skip trigger panic when the memory is flippe

Re: [PATCH] f2fs: update cur_valid_map_mir together with cur_valid_map

2017-08-02 Thread Yunlong Song
: Hi Yunlong, On 2017/8/2 0:59, Yunlong Song wrote: Hi Chao, I think there is no need to test mirror bitmap when original bitmap's check get passed, it is an instruction waste for "test". By the way, previous patch uses WARN to skip trigger panic when the memory is flippe

[PATCH] f2fs: update cur_valid_map_mir together with cur_valid_map

2017-08-01 Thread Yunlong Song
When cur_valid_map passes the f2fs_test_and_set(,clear)_bit test, cur_valid_map_mir update is skipped unlikely, so fix it. Signed-off-by: Yunlong Song <yunlong.s...@huawei.com> --- fs/f2fs/segment.c | 8 1 file changed, 8 insertions(+) diff --git a/fs/f2fs/segment.c b/fs/f2fs/seg

[PATCH] f2fs: update cur_valid_map_mir together with cur_valid_map

2017-08-01 Thread Yunlong Song
When cur_valid_map passes the f2fs_test_and_set(,clear)_bit test, cur_valid_map_mir update is skipped unlikely, so fix it. Signed-off-by: Yunlong Song --- fs/f2fs/segment.c | 8 1 file changed, 8 insertions(+) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 151968e..6f7731a

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-08-01 Thread Yunlong Song
: Hi Yunlong, On 07/29, Yunlong Song wrote: f2fs_balance_fs of dentry pages is skipped in __write_data_page due to deadlock of gc_mutex in write_checkpoint flow. This patch enables f2fs_balance_fs for normal dentry page writeback to ensure there are always enough free segments. So, how about

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-08-01 Thread Yunlong Song
: Hi Yunlong, On 07/29, Yunlong Song wrote: f2fs_balance_fs of dentry pages is skipped in __write_data_page due to deadlock of gc_mutex in write_checkpoint flow. This patch enables f2fs_balance_fs for normal dentry page writeback to ensure there are always enough free segments. So, how about

Re: [PATCH v2] f2fs: provide f2fs_balance_fs to __write_node_page

2017-07-29 Thread Yunlong Song
Hi Chao, Nice suggestion, I have sent out a new patch to implement it. On 2017/7/29 8:19, Chao Yu wrote: Hi Yunlong, On 2017/7/27 20:13, Yunlong Song wrote: v1->v2, fix some dead lock problems under some heavy load test On 2017/7/27 20:11, Yunlong Song wrote: Let node writeback also

Re: [PATCH v2] f2fs: provide f2fs_balance_fs to __write_node_page

2017-07-29 Thread Yunlong Song
Hi Chao, Nice suggestion, I have sent out a new patch to implement it. On 2017/7/29 8:19, Chao Yu wrote: Hi Yunlong, On 2017/7/27 20:13, Yunlong Song wrote: v1->v2, fix some dead lock problems under some heavy load test On 2017/7/27 20:11, Yunlong Song wrote: Let node writeback also

Re: [PATCH v2] f2fs: provide f2fs_balance_fs to __write_node_page

2017-07-29 Thread Yunlong Song
ot;, which is reported by Chao. This is another corner case. On 2017/7/29 0:20, Jaegeuk Kim wrote: Hi Yunlong, On 07/27, Yunlong Song wrote: v1->v2, fix some dead lock problems under some heavy load test So, does this patch resolve the previous GC problem? Thanks, On 2017/7/27 20:11, Yunlo

Re: [PATCH v2] f2fs: provide f2fs_balance_fs to __write_node_page

2017-07-29 Thread Yunlong Song
ot;, which is reported by Chao. This is another corner case. On 2017/7/29 0:20, Jaegeuk Kim wrote: Hi Yunlong, On 07/27, Yunlong Song wrote: v1->v2, fix some dead lock problems under some heavy load test So, does this patch resolve the previous GC problem? Thanks, On 2017/7/27 20:11, Yunlo

[PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-07-29 Thread Yunlong Song
ed-off-by: Yunlong Song <yunlong.s...@huawei.com> --- fs/f2fs/checkpoint.c | 2 +- fs/f2fs/data.c | 67 +--- fs/f2fs/f2fs.h | 1 + 3 files changed, 61 insertions(+), 9 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c i

[PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-07-29 Thread Yunlong Song
f2fs_balance_fs of dentry pages is skipped in __write_data_page due to deadlock of gc_mutex in write_checkpoint flow. This patch enables f2fs_balance_fs for normal dentry page writeback to ensure there are always enough free segments. Reported-by: Chao Yu Signed-off-by: Yunlong Song --- fs

Re: [PATCH v2] f2fs: provide f2fs_balance_fs to __write_node_page

2017-07-27 Thread Yunlong Song
v1->v2, fix some dead lock problems under some heavy load test On 2017/7/27 20:11, Yunlong Song wrote: Let node writeback also do f2fs_balance_fs to ensure there are always enough free segments. Signed-off-by: Yunlong Song <yunlong.s...@huawei.com> --- fs/f2fs/checkpoint.c | 2 +-

Re: [PATCH v2] f2fs: provide f2fs_balance_fs to __write_node_page

2017-07-27 Thread Yunlong Song
v1->v2, fix some dead lock problems under some heavy load test On 2017/7/27 20:11, Yunlong Song wrote: Let node writeback also do f2fs_balance_fs to ensure there are always enough free segments. Signed-off-by: Yunlong Song --- fs/f2fs/checkpoint.c | 2 +- fs/f2fs/f2fs.h |

[PATCH v2] f2fs: provide f2fs_balance_fs to __write_node_page

2017-07-27 Thread Yunlong Song
Let node writeback also do f2fs_balance_fs to ensure there are always enough free segments. Signed-off-by: Yunlong Song <yunlong.s...@huawei.com> --- fs/f2fs/checkpoint.c | 2 +- fs/f2fs/f2fs.h | 2 +- fs/f2fs/node.c | 14 -- 3 files changed, 10 insertions

[PATCH v2] f2fs: provide f2fs_balance_fs to __write_node_page

2017-07-27 Thread Yunlong Song
Let node writeback also do f2fs_balance_fs to ensure there are always enough free segments. Signed-off-by: Yunlong Song --- fs/f2fs/checkpoint.c | 2 +- fs/f2fs/f2fs.h | 2 +- fs/f2fs/node.c | 14 -- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/fs

Re: [PATCH] f2fs: let __get_victim successfully get a segno in corner case

2017-07-26 Thread Yunlong Song
have sent another patch to provide f2fs_balance_fs to __write_node_page, similar as that in __write_data_page, to avoid missing f2fs_balance_fs in node page writeback. Please check that. On 2017/7/26 2:55, Jaegeuk Kim wrote: On 07/14, Yunlong Song wrote: Suppose that the valid blocks of each

Re: [PATCH] f2fs: let __get_victim successfully get a segno in corner case

2017-07-26 Thread Yunlong Song
have sent another patch to provide f2fs_balance_fs to __write_node_page, similar as that in __write_data_page, to avoid missing f2fs_balance_fs in node page writeback. Please check that. On 2017/7/26 2:55, Jaegeuk Kim wrote: On 07/14, Yunlong Song wrote: Suppose that the valid blocks of each

[PATCH] f2fs: provide f2fs_balance_fs to __write_node_page

2017-07-26 Thread Yunlong Song
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com> --- fs/f2fs/checkpoint.c | 2 +- fs/f2fs/f2fs.h | 2 +- fs/f2fs/node.c | 16 ++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 5b876f6..3

[PATCH] f2fs: provide f2fs_balance_fs to __write_node_page

2017-07-26 Thread Yunlong Song
Signed-off-by: Yunlong Song --- fs/f2fs/checkpoint.c | 2 +- fs/f2fs/f2fs.h | 2 +- fs/f2fs/node.c | 16 ++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 5b876f6..3c84a25 100644 --- a/fs/f2fs

Re: [PATCH] f2fs: let __get_victim successfully get a segno in corner case

2017-07-24 Thread Yunlong Song
Hi Jay, fggc_threshold is 507, reserved_segment is 462. On 2017/7/22 5:07, Jaegeuk Kim wrote: Hi Yunlong, On 07/20, Yunlong Song wrote: Hi, Jay, The distribution is like this, unit is segment counts: cnt_free: 0 (free blocks) cnt_full: 25182 (segment which has 512 blocks

Re: [PATCH] f2fs: let __get_victim successfully get a segno in corner case

2017-07-24 Thread Yunlong Song
Hi Jay, fggc_threshold is 507, reserved_segment is 462. On 2017/7/22 5:07, Jaegeuk Kim wrote: Hi Yunlong, On 07/20, Yunlong Song wrote: Hi, Jay, The distribution is like this, unit is segment counts: cnt_free: 0 (free blocks) cnt_full: 25182 (segment which has 512 blocks

Re: [PATCH] f2fs: let __get_victim successfully get a segno in corner case

2017-07-20 Thread Yunlong Song
hat >> this could happen. > So, have you taken a look at distribution of valid blocks in that case? > I'm wondering what distribution can cause this. > > Thanks, > >> >> >> >> 发自网易邮箱大师 >> On 07/16/2017 09:09, Jaegeuk Kim wrote: >> Hi Yunl

Re: [PATCH] f2fs: let __get_victim successfully get a segno in corner case

2017-07-20 Thread Yunlong Song
hat >> this could happen. > So, have you taken a look at distribution of valid blocks in that case? > I'm wondering what distribution can cause this. > > Thanks, > >> >> >> >> 发自网易邮箱大师 >> On 07/16/2017 09:09, Jaegeuk Kim wrote: >> Hi Yunl

Re: [PATCH] f2fs: let __get_victim successfully get a segno in corner case

2017-07-16 Thread Yunlong Song
Hi Jay, In fact,this is not "suppose" case yet, we have already met this problem several times in some test suits for corner case, or I cannot notice that this could happen. On 2017/7/16 9:09, Jaegeuk Kim wrote: > Hi Yunlong, > > On 07/14, Yunlong Song wrote: >&g

Re: [PATCH] f2fs: let __get_victim successfully get a segno in corner case

2017-07-16 Thread Yunlong Song
Hi Jay, In fact,this is not "suppose" case yet, we have already met this problem several times in some test suits for corner case, or I cannot notice that this could happen. On 2017/7/16 9:09, Jaegeuk Kim wrote: > Hi Yunlong, > > On 07/14, Yunlong Song wrote: >&g

[PATCH] f2fs: let __get_victim successfully get a segno in corner case

2017-07-14 Thread Yunlong Song
all, and get_new_segment cannot get a free segment, filesystem will trap into a wrong status. To fix this, we record the segno which has a rough minimum cost and return it to __get_victim to continue f2fs_gc's job. Signed-off-by: Yunlong Song <yunlong.s...@huawei.com> --- fs/f2fs/gc.c

[PATCH] f2fs: let __get_victim successfully get a segno in corner case

2017-07-14 Thread Yunlong Song
all, and get_new_segment cannot get a free segment, filesystem will trap into a wrong status. To fix this, we record the segno which has a rough minimum cost and return it to __get_victim to continue f2fs_gc's job. Signed-off-by: Yunlong Song --- fs/f2fs/gc.c | 19 ++- fs/f

Re: [PATCH] f2fs: no need to create issue_discard_thread if it exists

2017-07-06 Thread Yunlong Song
It's fine unless create_discard_cmd_control is used in remount flow in the future. On 2017/7/6 21:16, Chao Yu wrote: > Hi Yunlong, > > It looks there is no way to create discard thread redundantly, > so here we don't need to check this? > > Thanks, > > On 2017/7/6 1

Re: [PATCH] f2fs: no need to create issue_discard_thread if it exists

2017-07-06 Thread Yunlong Song
It's fine unless create_discard_cmd_control is used in remount flow in the future. On 2017/7/6 21:16, Chao Yu wrote: > Hi Yunlong, > > It looks there is no way to create discard thread redundantly, > so here we don't need to check this? > > Thanks, > > On 2017/7/6 1

[PATCH] f2fs: no need to create issue_discard_thread if it exists

2017-07-06 Thread Yunlong Song
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com> --- fs/f2fs/segment.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 4c246e3..b48d004 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1417,6 +1417,8 @@ stat

[PATCH] f2fs: no need to create issue_discard_thread if it exists

2017-07-06 Thread Yunlong Song
Signed-off-by: Yunlong Song --- fs/f2fs/segment.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 4c246e3..b48d004 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1417,6 +1417,8 @@ static int create_discard_cmd_control(struct

[PATCH] f2fs: avoid redundant f2fs_flush after remount

2017-06-24 Thread Yunlong Song
create_flush_cmd_control will create redundant issue_flush_thread after each remount with flush_merge option. Signed-off-by: Yunlong Song <yunlong.s...@huawei.com> --- fs/f2fs/segment.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index a

[PATCH] f2fs: avoid redundant f2fs_flush after remount

2017-06-24 Thread Yunlong Song
create_flush_cmd_control will create redundant issue_flush_thread after each remount with flush_merge option. Signed-off-by: Yunlong Song --- fs/f2fs/segment.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index a6d7738..57f9edc 100644 --- a/fs/f2fs

Re: [PATCH] f2fs: change the codes of checking CP_CRC_RECOVERY_FLAG to macro

2017-02-25 Thread Yunlong Song
ing code in is_recoverable_dnode, this function is called only once after mount, it's OK. -- Thanks, Yunlong Song

Re: [PATCH] f2fs: change the codes of checking CP_CRC_RECOVERY_FLAG to macro

2017-02-25 Thread Yunlong Song
ing code in is_recoverable_dnode, this function is called only once after mount, it's OK. -- Thanks, Yunlong Song

[PATCH v2] f2fs: change the codes of checking CP_CRC_RECOVERY_FLAG to macro

2017-02-24 Thread Yunlong Song
No need to check the "if" condition each time, just change it to macro codes. Signed-off-by: Yunlong Song <yunlong.s...@huawei.com> --- fs/f2fs/node.h| 10 +- fs/f2fs/segment.c | 5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/fs/f2fs/node.h

[PATCH v2] f2fs: change the codes of checking CP_CRC_RECOVERY_FLAG to macro

2017-02-24 Thread Yunlong Song
No need to check the "if" condition each time, just change it to macro codes. Signed-off-by: Yunlong Song --- fs/f2fs/node.h| 10 +- fs/f2fs/segment.c | 5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h index 3fc9c4

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

2017-02-24 Thread Yunlong Song
he amount of gc_more segments after the sync in my example, because you have to gc_more until free_sections equals to reserved_segments, so the smaller the reserved_segment is, the smaller times f2f2_gc will gc_more. Anyway, I will test the patch in device for stability. On 2017/2/24 20:46, Yun

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

2017-02-24 Thread Yunlong Song
he amount of gc_more segments after the sync in my example, because you have to gc_more until free_sections equals to reserved_segments, so the smaller the reserved_segment is, the smaller times f2f2_gc will gc_more. Anyway, I will test the patch in device for stability. On 2017/2/24 20:46, Yun

Re: [PATCH 3/3] f2fs: provide more chance for node and data to get ssr segment

2017-02-24 Thread Yunlong Song
, but if time goes by, warm segments will finally update their blocks like hot segments, but cold segments are something like which should and will never update, so I prefer to put hot and warm to one side, and put cold to the other side. On 2017/2/25 4:05, Jaegeuk Kim wrote: > On 02/25, Yunlong S

Re: [PATCH 3/3] f2fs: provide more chance for node and data to get ssr segment

2017-02-24 Thread Yunlong Song
, but if time goes by, warm segments will finally update their blocks like hot segments, but cold segments are something like which should and will never update, so I prefer to put hot and warm to one side, and put cold to the other side. On 2017/2/25 4:05, Jaegeuk Kim wrote: > On 02/25, Yunlong S

[PATCH] f2fs: add F2FS_DIRTY_DATA to has_not_enough_free_secs and need_SSR

2017-02-24 Thread Yunlong Song
used anytime for gc when ssr segments are not enough. Signed-off-by: Yunlong Song <yunlong.s...@huawei.com> --- fs/f2fs/segment.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index f4020f1..44f2a46 100644 --- a/fs/f2fs/segment

[PATCH] f2fs: add F2FS_DIRTY_DATA to has_not_enough_free_secs and need_SSR

2017-02-24 Thread Yunlong Song
used anytime for gc when ssr segments are not enough. Signed-off-by: Yunlong Song --- fs/f2fs/segment.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index f4020f1..44f2a46 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.

Re: [PATCH] f2fs: change the codes of checking CP_CRC_RECOVERY_FLAG to macro

2017-02-24 Thread Yunlong Song
On 2017/2/24 19:37, Chao Yu wrote: > On 2017/2/24 19:11, Yunlong Song wrote: >> I think we do not need to care about the CP_CRC_RECOVERY_FLAG status of old >> image, I mean we >> do not need to check the already-been-written node footer in the image, what >> we ca

Re: [PATCH] f2fs: change the codes of checking CP_CRC_RECOVERY_FLAG to macro

2017-02-24 Thread Yunlong Song
On 2017/2/24 19:37, Chao Yu wrote: > On 2017/2/24 19:11, Yunlong Song wrote: >> I think we do not need to care about the CP_CRC_RECOVERY_FLAG status of old >> image, I mean we >> do not need to check the already-been-written node footer in the image, what >> we ca

Re: [PATCH 3/3] f2fs: provide more chance for node and data to get ssr segment

2017-02-24 Thread Yunlong Song
below. On 2017/2/24 18:47, Chao Yu wrote: > On 2017/2/24 17:19, Yunlong Song wrote: >> Hi Jaegeuk and Chao, >> >> How about the question I pointed out in last mail: >> Why not take "neighboring temperature" for ssr? For example, if type == >> CUR

Re: [PATCH 3/3] f2fs: provide more chance for node and data to get ssr segment

2017-02-24 Thread Yunlong Song
below. On 2017/2/24 18:47, Chao Yu wrote: > On 2017/2/24 17:19, Yunlong Song wrote: >> Hi Jaegeuk and Chao, >> >> How about the question I pointed out in last mail: >> Why not take "neighboring temperature" for ssr? For example, if type == >> CUR

Re: [PATCH] f2fs: change the codes of checking CP_CRC_RECOVERY_FLAG to macro

2017-02-24 Thread Yunlong Song
. The already-been-written node in the old image should not appear in the node chain of recovery process, right? On 2017/2/24 18:29, Chao Yu wrote: > On 2017/2/24 18:06, Yunlong Song wrote: >> No need to check the "if" condition each time, just change it to macro codes. > We're goi

Re: [PATCH] f2fs: change the codes of checking CP_CRC_RECOVERY_FLAG to macro

2017-02-24 Thread Yunlong Song
. The already-been-written node in the old image should not appear in the node chain of recovery process, right? On 2017/2/24 18:29, Chao Yu wrote: > On 2017/2/24 18:06, Yunlong Song wrote: >> No need to check the "if" condition each time, just change it to macro codes. > We're goi

[PATCH] f2fs: change the codes of checking CP_CRC_RECOVERY_FLAG to macro

2017-02-24 Thread Yunlong Song
No need to check the "if" condition each time, just change it to macro codes. Signed-off-by: Yunlong Song <yunlong.s...@huawei.com> --- fs/f2fs/node.h| 20 ++-- fs/f2fs/segment.c | 5 +++-- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/fs/

[PATCH] f2fs: change the codes of checking CP_CRC_RECOVERY_FLAG to macro

2017-02-24 Thread Yunlong Song
No need to check the "if" condition each time, just change it to macro codes. Signed-off-by: Yunlong Song --- fs/f2fs/node.h| 20 ++-- fs/f2fs/segment.c | 5 +++-- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h ind

Re: [PATCH 3/3] f2fs: provide more chance for node and data to get ssr segment

2017-02-24 Thread Yunlong Song
> Thanks, > > On 2017/2/23 9:17, Jaegeuk Kim wrote: >> Hi Yunlong, >> >> I've been testing the similar patches as I attached. >> >> Thanks, >> >> On 02/22, Yunlong Song wrote: >>> Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>

Re: [PATCH 3/3] f2fs: provide more chance for node and data to get ssr segment

2017-02-24 Thread Yunlong Song
017/2/23 9:17, Jaegeuk Kim wrote: >> Hi Yunlong, >> >> I've been testing the similar patches as I attached. >> >> Thanks, >> >> On 02/22, Yunlong Song wrote: >>> Signed-off-by: Yunlong Song >>> --- >>> fs/f2fs/segment.c | 9 +++

Re: [PATCH] f2fs: clean up codes in f2fs_gc related with write_checkpoint

2017-02-22 Thread Yunlong Song
Ping... Since has_not_enough_free_secs(sbi, 0, 0) must be true if has_not_enough_free_secs(sbi, sec_freed, 0) is true, write_checkpoint is sure to execute in both conditions, and segno is NULL_SEGNO in both conditions. On 2017/2/21 20:43, Yunlong Song wrote: > Signed-off-by: Yunlong S

Re: [PATCH] f2fs: clean up codes in f2fs_gc related with write_checkpoint

2017-02-22 Thread Yunlong Song
Ping... Since has_not_enough_free_secs(sbi, 0, 0) must be true if has_not_enough_free_secs(sbi, sec_freed, 0) is true, write_checkpoint is sure to execute in both conditions, and segno is NULL_SEGNO in both conditions. On 2017/2/21 20:43, Yunlong Song wrote: > Signed-off-by: Yunlong S

Re: [PATCH 3/3] f2fs: provide more chance for node and data to get ssr segment

2017-02-22 Thread Yunlong Song
Hi Jay, I miss some codes from your mail, now I check all your patch codes and make clear with question 2 and 3, it's fine. But still, how about question 1? On 2017/2/23 10:13, Yunlong Song wrote: > Hi Jay, > But there are some differences: > 1 Why not take "neighbori

Re: [PATCH 3/3] f2fs: provide more chance for node and data to get ssr segment

2017-02-22 Thread Yunlong Song
Hi Jay, I miss some codes from your mail, now I check all your patch codes and make clear with question 2 and 3, it's fine. But still, how about question 1? On 2017/2/23 10:13, Yunlong Song wrote: > Hi Jay, > But there are some differences: > 1 Why not take "neighbori

Re: [PATCH 3/3] f2fs: provide more chance for node and data to get ssr segment

2017-02-22 Thread Yunlong Song
milar patches as I attached. > > Thanks, > > On 02/22, Yunlong Song wrote: >> Signed-off-by: Yunlong Song <yunlong.s...@huawei.com> >> --- >> fs/f2fs/segment.c | 9 + >> 1 file changed, 9 insertions(+) >> >> diff --git a/fs/f2fs/segment.c b/f

Re: [PATCH 3/3] f2fs: provide more chance for node and data to get ssr segment

2017-02-22 Thread Yunlong Song
milar patches as I attached. > > Thanks, > > On 02/22, Yunlong Song wrote: >> Signed-off-by: Yunlong Song >> --- >> fs/f2fs/segment.c | 9 + >> 1 file changed, 9 insertions(+) >> >> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c >> index

Re: [PATCH 1/3] f2fs: clean up codes in get_ssr_segment

2017-02-22 Thread Yunlong Song
wanted to do like this. > > >From 8d344ac45890dd95c5734fd29a19a7c19364c327 Mon Sep 17 00:00:00 2001 > From: Yunlong Song <yunlong.s...@huawei.com> > Date: Wed, 22 Feb 2017 20:50:49 +0800 > Subject: [PATCH] f2fs: do SSR for data when there is enough free space > > In allocate_segment_by_default(),

Re: [PATCH 1/3] f2fs: clean up codes in get_ssr_segment

2017-02-22 Thread Yunlong Song
wanted to do like this. > > >From 8d344ac45890dd95c5734fd29a19a7c19364c327 Mon Sep 17 00:00:00 2001 > From: Yunlong Song > Date: Wed, 22 Feb 2017 20:50:49 +0800 > Subject: [PATCH] f2fs: do SSR for data when there is enough free space > > In allocate_segment_by_default(), need_SSR() already detected it'

[PATCH 1/3] f2fs: clean up codes in get_ssr_segment

2017-02-22 Thread Yunlong Song
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com> --- fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index df2ff5c..80997f5 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1541,7 +1541,7 @@ stat

[PATCH 3/3] f2fs: provide more chance for node and data to get ssr segment

2017-02-22 Thread Yunlong Song
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com> --- fs/f2fs/segment.c | 9 + 1 file changed, 9 insertions(+) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 9d13743..5fe71b9 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1540,12 +1540,17 @@ stat

[PATCH 1/3] f2fs: clean up codes in get_ssr_segment

2017-02-22 Thread Yunlong Song
Signed-off-by: Yunlong Song --- fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index df2ff5c..80997f5 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1541,7 +1541,7 @@ static int get_ssr_segment(struct

[PATCH 3/3] f2fs: provide more chance for node and data to get ssr segment

2017-02-22 Thread Yunlong Song
Signed-off-by: Yunlong Song --- fs/f2fs/segment.c | 9 + 1 file changed, 9 insertions(+) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 9d13743..5fe71b9 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1540,12 +1540,17 @@ static int get_ssr_segment(struct

[PATCH 2/3] f2fs: provide more chance to get node ssr

2017-02-22 Thread Yunlong Song
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com> --- fs/f2fs/segment.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 80997f5..9d13743 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1541,9 +1

[PATCH 2/3] f2fs: provide more chance to get node ssr

2017-02-22 Thread Yunlong Song
Signed-off-by: Yunlong Song --- fs/f2fs/segment.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 80997f5..9d13743 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1541,9 +1541,13 @@ static int get_ssr_segment

[PATCH] f2fs: clean up codes in f2fs_gc related with write_checkpoint

2017-02-21 Thread Yunlong Song
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com> --- fs/f2fs/gc.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 88e5e7b..e5f2569 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -943,23 +943,15 @@ int f2fs_gc(

[PATCH] f2fs: clean up codes in f2fs_gc related with write_checkpoint

2017-02-21 Thread Yunlong Song
Signed-off-by: Yunlong Song --- fs/f2fs/gc.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 88e5e7b..e5f2569 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -943,23 +943,15 @@ int f2fs_gc(struct f2fs_sb_info *sbi, bool sync

[PATCH] f2fs: put allocate_segment after refresh_sit_entry

2017-02-21 Thread Yunlong Song
dirty segments inside refresh_sit_entry") puts it into wrong location. Signed-off-by: Yunlong Song <yunlong.s...@huawei.com> --- fs/f2fs/segment.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index df2ff5c..89052df 1006

[PATCH] f2fs: put allocate_segment after refresh_sit_entry

2017-02-21 Thread Yunlong Song
dirty segments inside refresh_sit_entry") puts it into wrong location. Signed-off-by: Yunlong Song --- fs/f2fs/segment.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index df2ff5c..89052df 100644 --- a/fs/f2fs/segment.c +++

[PATCH 2/2] f2fs: fix the case when there is no free segment to allocate for CURSEG_WARM_NODE

2017-02-17 Thread Yunlong Song
If the free segments are used up, then new_curseg will fail for CURSEG_WARM_NODE, in this case, we should use change_curseg instead of new_curseg. Signed-off-by: Yunlong Song <yunlong.s...@huawei.com> --- fs/f2fs/segment.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/f2fs/segme

[PATCH 2/2] f2fs: fix the case when there is no free segment to allocate for CURSEG_WARM_NODE

2017-02-17 Thread Yunlong Song
If the free segments are used up, then new_curseg will fail for CURSEG_WARM_NODE, in this case, we should use change_curseg instead of new_curseg. Signed-off-by: Yunlong Song --- fs/f2fs/segment.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index

[PATCH 1/2] mkfs.f2fs: add option to set the value of reserved segments and overprovision segments

2017-02-17 Thread Yunlong Song
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com> --- include/f2fs_fs.h | 3 +++ lib/libf2fs.c | 3 +++ mkfs/f2fs_format.c | 21 ++--- mkfs/f2fs_format_main.c | 10 +- 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/i

[PATCH 1/2] mkfs.f2fs: add option to set the value of reserved segments and overprovision segments

2017-02-17 Thread Yunlong Song
Signed-off-by: Yunlong Song --- include/f2fs_fs.h | 3 +++ lib/libf2fs.c | 3 +++ mkfs/f2fs_format.c | 21 ++--- mkfs/f2fs_format_main.c | 10 +- 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h

[PATCH 0/2] Reduce the overprovision size a lot in f2fs

2017-02-17 Thread Yunlong Song
he overprovision segments at all for this consideration. Yunlong Song (2): mkfs.f2fs: add option to set the value of reserved segments and overprovision segments f2fs: fix the case when there is no free segment to allocate for CURSEG_WARM_NODE fs/f2fs/segment.c | 2 -- 1

[PATCH 0/2] Reduce the overprovision size a lot in f2fs

2017-02-17 Thread Yunlong Song
he overprovision segments at all for this consideration. Yunlong Song (2): mkfs.f2fs: add option to set the value of reserved segments and overprovision segments f2fs: fix the case when there is no free segment to allocate for CURSEG_WARM_NODE fs/f2fs/segment.c | 2 -- 1

Re: [PATCH] f2fs: fix small discards when se->valid_blocks is zero

2017-01-04 Thread Yunlong Song
amp; !IS_CURSEG(sbi, cpc->trim_start)" is true, since the other blocks of that segment has already sent small discard when they got invalid before, and we just need to send the discard of that deleted file which is the last one taking up in the segment. On 2017/1/5 6:36, Jaegeuk Kim wrot

Re: [PATCH] f2fs: fix small discards when se->valid_blocks is zero

2017-01-04 Thread Yunlong Song
amp; !IS_CURSEG(sbi, cpc->trim_start)" is true, since the other blocks of that segment has already sent small discard when they got invalid before, and we just need to send the discard of that deleted file which is the last one taking up in the segment. On 2017/1/5 6:36, Jaegeuk Kim wrot

Re: [PATCH] f2fs: fix small discards when se->valid_blocks is zero

2017-01-03 Thread Yunlong Song
invalidate blocks of that file can not be discarded in FTL layer on time. On 2017/1/4 9:55, Jaegeuk Kim wrote: > Hi Yunlong, > > On 01/03, Yunlong Song wrote: >> In the small discard case, when se->valid_blocks is zero, the >> add_discard_addrs >> will dir

Re: [PATCH] f2fs: fix small discards when se->valid_blocks is zero

2017-01-03 Thread Yunlong Song
invalidate blocks of that file can not be discarded in FTL layer on time. On 2017/1/4 9:55, Jaegeuk Kim wrote: > Hi Yunlong, > > On 01/03, Yunlong Song wrote: >> In the small discard case, when se->valid_blocks is zero, the >> add_discard_addrs >> will dir

[PATCH] f2fs: fix small discards when se->valid_blocks is zero

2017-01-03 Thread Yunlong Song
nt, se->valid_blocks = n 3. Delete that file, se->valid_blocks = 0, add_discard_addrs will return without sending any discard of that file, and forever due to cur_map[i] ^ ckpt_map[i] = 0 after that checkpoint Signed-off-by: Yunlong Song <yunlong.s...@huawei.com> --- fs/f2fs/segmen

[PATCH] f2fs: fix small discards when se->valid_blocks is zero

2017-01-03 Thread Yunlong Song
nt, se->valid_blocks = n 3. Delete that file, se->valid_blocks = 0, add_discard_addrs will return without sending any discard of that file, and forever due to cur_map[i] ^ ckpt_map[i] = 0 after that checkpoint Signed-off-by: Yunlong Song --- fs/f2fs/segment.c | 2 +- 1 file changed, 1 ins

[PATCH] block: Change BIO_RESET_BITS to current proper value

2016-09-22 Thread Yunlong Song
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com> --- include/linux/blk_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index 436f43f..b7221b3 100644 --- a/include/linux/blk_types.h +++ b/include

[PATCH] block: Change BIO_RESET_BITS to current proper value

2016-09-22 Thread Yunlong Song
Signed-off-by: Yunlong Song --- include/linux/blk_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index 436f43f..b7221b3 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h @@ -117,7 +117,7

Re: [PATCH] f2fs: Return the errno to the caller to avoid using a wrong page

2016-05-27 Thread Yunlong Song
f2fs_put_page(page, 1); return ERR_PTR(-EIO); } @@ -967,7 +967,6 @@ repeat: goto repeat; } got_it: - f2fs_bug_on(nid != nid_of_node(page)); mark_page_accessed(page); return page; } -- Thanks, Yunlong Song

Re: [PATCH] f2fs: Return the errno to the caller to avoid using a wrong page

2016-05-27 Thread Yunlong Song
); } @@ -967,7 +967,6 @@ repeat: goto repeat; } got_it: - f2fs_bug_on(nid != nid_of_node(page)); mark_page_accessed(page); return page; } -- Thanks, Yunlong Song

[PATCH v3] f2fs: Return the errno to the caller to avoid using a wrong page

2016-05-26 Thread Yunlong Song
2FS_CHECK_FS is off when "sometimes it was reported that its contents was missing" happens. This patch restores to check node page contents all the time, and returns the errno to make the caller known something is wrong and avoid to use the page. This patch also moves f2fs_bug_on to its

[PATCH v3] f2fs: Return the errno to the caller to avoid using a wrong page

2016-05-26 Thread Yunlong Song
2FS_CHECK_FS is off when "sometimes it was reported that its contents was missing" happens. This patch restores to check node page contents all the time, and returns the errno to make the caller known something is wrong and avoid to use the page. This patch also moves f2fs_bug_on to its p

Re: [PATCH v2] f2fs: Return the errno to the caller to avoid using a wrong page

2016-05-26 Thread Yunlong Song
f2fs_put_page(page, 1); > + return ERR_PTR(-EIO); > + } > return page; > } > > -- Thanks, Yunlong Song

Re: [PATCH v2] f2fs: Return the errno to the caller to avoid using a wrong page

2016-05-26 Thread Yunlong Song
f2fs_put_page(page, 1); > + return ERR_PTR(-EIO); > + } > return page; > } > > -- Thanks, Yunlong Song

Re: [PATCH] f2fs: Return the errno to the caller to avoid using a wrong page

2016-05-25 Thread Yunlong Song
Forget this wrong version, I have re-sent a patch v2 version. -- Thanks, Yunlong Song

Re: [PATCH] f2fs: Return the errno to the caller to avoid using a wrong page

2016-05-25 Thread Yunlong Song
Forget this wrong version, I have re-sent a patch v2 version. -- Thanks, Yunlong Song

[PATCH v2] f2fs: Return the errno to the caller to avoid using a wrong page

2016-05-25 Thread Yunlong Song
2FS_CHECK_FS is off when "sometimes it was reported that its contents was missing" happens. This patch restores to check node page contents all the time, and returns the errno to make the caller known something is wrong and avoid to use the page. This patch also moves f2fs_bug_on to its

[PATCH v2] f2fs: Return the errno to the caller to avoid using a wrong page

2016-05-25 Thread Yunlong Song
2FS_CHECK_FS is off when "sometimes it was reported that its contents was missing" happens. This patch restores to check node page contents all the time, and returns the errno to make the caller known something is wrong and avoid to use the page. This patch also moves f2fs_bug_on to its p

[PATCH] f2fs: Return the errno to the caller to avoid using a wrong page

2016-05-25 Thread Yunlong Song
2FS_CHECK_FS is off when "sometimes it was reported that its contents was missing" happens. This patch restores to check node page contents all the time, and returns the errno to make the caller known something is wrong and avoid to use the page. This patch also moves f2fs_bug_on to its

[PATCH] f2fs: Return the errno to the caller to avoid using a wrong page

2016-05-25 Thread Yunlong Song
2FS_CHECK_FS is off when "sometimes it was reported that its contents was missing" happens. This patch restores to check node page contents all the time, and returns the errno to make the caller known something is wrong and avoid to use the page. This patch also moves f2fs_bug_on to its p

[PATCH] f2fs: Return the errno to the caller to avoid using a wrong page

2016-05-25 Thread Yunlong Song
2FS_CHECK_FS is off when "sometimes it was reported that its contents was missing" happens. This patch restores to check node page contents all the time, and returns the errno to make the caller known something is wrong and avoid to use the page. This patch also moves f2fs_bug_on to its

[PATCH] f2fs: Return the errno to the caller to avoid using a wrong page

2016-05-25 Thread Yunlong Song
2FS_CHECK_FS is off when "sometimes it was reported that its contents was missing" happens. This patch restores to check node page contents all the time, and returns the errno to make the caller known something is wrong and avoid to use the page. This patch also moves f2fs_bug_on to its p

<    1   2   3   4   5   6   7   8   >