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
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 pa
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
Forget this wrong version, I have re-sent a patch v2 version.
--
Thanks,
Yunlong Song
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users
f2fs_put_page(page, 1);
> + return ERR_PTR(-EIO);
> + }
> return page;
> }
>
>
--
Thanks,
Yunlong Song
--
What NetFlow Analyzer can do for you? Monitors network bandwidth an
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
t err to 0.
This will cause getdents64 incorretly return -ENOENT when lastdirent is
NULL in getdents64. This will lead to a wrong return value for syscall
caller.
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
fs/f2fs/dir.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/f2fs/dir.c
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
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
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
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
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
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
> 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>
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
,
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
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/
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
. 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
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(),
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
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
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
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
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
ing code in
is_recoverable_dnode,
this function is called only once after mount, it's OK.
--
Thanks,
Yunlong Song
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slash
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
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
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
fsck/fsck.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index e2081c8..2a4df7b 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -1696,6 +1696,7 @@ static void fix_hard_links(struct f2fs_sb_inf
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
fsck/fsck.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index e2081c8..301685b 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -1240,7 +1240,6 @@ static int __chk_dentries(struct f2fs_sb_info *sbi,
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
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
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
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
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
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
When cur_valid_map passes the f2fs_test_and_set(,clear)_bit test,
cur_valid_map_mir update is skipped unlikely, so fix it. The fix
now changes the mirror check together with cur_valid_map all the
time.
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
Signed-off-by: Chao Yu
wrote:
On 08/02, Yunlong Song wrote:
Hi Jay,
The case is like this:
write_checkpoint: normal dentry
page writeback of inodeB:
-block_operations -f2fs_write_data_pages
-SBI_BLOCK_OPS is set -f2fs_write_cache_pages
-sync_dirty_
Chao has pointed out that, maybe writebacking dentry page can redirty
dnode page
which may be clean previously, so it is more safe to call
f2fs_balance_fs to make sure
dirty metadatas of filesystem will not exceed the threshold.
On 2017/8/4 11:34, Jaegeuk Kim wrote:
On 08/04, Yunlong Song
ite to reserved segments
inodeA <- list_first_entry(dirty_list)
filemap_fdatawrite(inodeA)
go to retry
--SBI_BLOCK_OPS is clear
On 2017/8/4 9:57, Jaegeuk Kim wrote:
On 08/02, Yunlong Song wrote:
Hi Jay,
The case i
The current size value is not correct and will miss bitmap check.
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
fs/f2fs/segment.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index f336f8c..45fb534 100644
--
free_use_blocks should use reserved_segments instead, rather than directly use
overprovision_segments. BTW, we also add the constraint of sbi->reserved_blocks.
On 2017/8/15 11:32, Jaegeuk Kim wrote:
On 08/14, Yunlong Song wrote:
The part (overprovision_segments - reserved_segments) can st
than directly use
overprovision_segments. BTW, we also add the constraint of sbi->reserved_blocks.
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
fs/f2fs/gc.h | 18 +++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/gc.h b/fs/f2fs/gc.h
inde
ping...
On 2017/8/11 19:43, Yunlong Song wrote:
In this patch, we add a new sysfs interface, we can use it to gradually achieve
the reserved_blocks finally, even when reserved_blocks is initially set over
user_block_count - total_valid_block_count. This is very useful, especially when
we
The usage message shows a wrong message for ovp option, so fix it.
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
mkfs/f2fs_format_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mkfs/f2fs_format_main.c b/mkfs/f2fs_format_main.c
index a3652a9..3279829
happens, android
should change the value dynamically, it is fine, since we make
reserved_blocks to a soft version.
On 2017/8/10 11:15, Chao Yu wrote:
On 2017/8/8 21:43, Yunlong Song wrote:
In this patch, we add a new sysfs interface, we can use it to gradually achieve
the reserved_blocks finally
The usage message gives a wrong number, so fix it.
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
mkfs/f2fs_format_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mkfs/f2fs_format_main.c b/mkfs/f2fs_format_main.c
index a3652a9..6712b5c 100644
---
v2 I resent.
On 2017/8/11 18:18, Chao Yu wrote:
On 2017/8/10 19:41, Yunlong Song wrote:
It may block the system in such case, but so does the hard version
design. In the hard version,
We'd better not let soft/hard reserved_blocks to eat all left free space, at
least needs to leave enough space
there is enough space for supporting system's activation, we safely
increase cur_reserved_blocks in dev_valid_block(,node)_count to only take up the
blocks which are just obsoleted.
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
Documentation/ABI/testing/sysfs-fs-f2fs | 6 ++
f
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
fs/f2fs/segment.h | 5 -
1 file changed, 5 deletions(-)
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index 7f700e5..b9b4f85 100644
--- a/fs/f2fs/segment.h
+++ b/fs/f2fs/segment.h
@@ -492,11 +492,6 @@ static inli
The part (overprovision_segments - reserved_segments) can still be used for LFS,
so free_use_blocks should use reserved_segments instead, rather than use
overprovision_segments.
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
fs/f2fs/gc.h | 4 ++--
1 file changed, 2 insertions
this responsibility, it's android's responsibility.
On 2017/8/10 19:26, Chao Yu wrote:
On 2017/8/10 11:58, Yunlong Song wrote:
I think the aim of reserved_blocks function is to leave space for f2fs
and FTL, so I change it to a
soft version so that it can be used to fit to the data image which does
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
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
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
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
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 +-
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
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
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
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
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
/8/8 12:12, Yunlong Song wrote:
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
fs/f2fs/recovery.c | 3 ++-
fs/f2fs/super.c| 9 +
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index a3d0261..e288319 100644
--
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
fs/f2fs/recovery.c | 3 ++-
fs/f2fs/super.c| 9 +
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index a3d0261..e288319 100644
--- a/fs/f2fs/recovery.c
+++ b/f
:
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
-by: Yunlong Song <yunlong.s...@huawei.com>
---
Documentation/ABI/testing/sysfs-fs-f2fs | 6 ++
fs/f2fs/f2fs.h | 9 +++--
fs/f2fs/super.c | 4 +++-
fs/f2fs/sysfs.c | 15 ++-
4 files changed, 26 insertions
ping...
On 2017/8/15 15:14, Yunlong Song wrote:
The part (overprovision_segments - reserved_segments) can still be used for LFS
in some case, e.g., there are lots of invalid block from dirty segments, then
the part (overprovision_segments - reserved_segments) can be safely used. So
ping...
On 2017/8/15 12:08, Yunlong Song wrote:
ping...
On 2017/8/11 19:43, Yunlong Song wrote:
In this patch, we add a new sysfs interface, we can use it to
gradually achieve
the reserved_blocks finally, even when reserved_blocks is initially
set over
user_block_count
to the configured reserved_blocks value at once, instead, it safely
increase cur_reserved_blocks in dev_valid_block(,node)_count to only take
up the blocks which are just obsoleted.
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
Signed-off-by: Chao Yu <yuch...@huawei.com>
---
Documentation
I send a v3 patch, please review, and the main difference is shown below.
On 2017/8/18 18:20, Chao Yu wrote:
Hi Yunlong,
IMO, we don't need additional sysfs entry, how about changing a bit as below?
>From 3fc8206871fe457859f1537c9dc8918b45f14601 Mon Sep 17 00:00:00 2001
From: Yunlong S
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
This reverts commit b9cd20619e359d199b755543474c3d853c8e3415.
That patch causes much fewer node segments (which can be used for SSR)
than before, and in the corner case (e.g. create and delete *.txt files in
one same directory, there will be very few node segments but many data
segments), if the
Correct, I will update the patch.
On 2017/10/13 19:08, Chao Yu wrote:
Hi Yunlong,
On 2017/10/11 21:25, Yunlong Song wrote:
Without this patch, it will cause all the free segments using up in some
corner case. For example, there are 100 segments, and 20 of them are
reserved for ovp. If 79
Yep, both are OK, since I do not care it is foreground or background.
Here it just needs to do gc.
On 2017/10/13 19:09, Chao Yu wrote:
On 2017/10/11 21:51, Yunlong Song wrote:
This can help us to debug on some corner case.
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
f
segment, write 512 blocks and delete
511 blocks, the dirty_segments(sbi) is 0 and f2fs_gc fail again. This
can finally use up all the free segments and cause panic.
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
fs/f2fs/segment.c | 4 ++--
1 file changed, 2 insertions(+), 2 del
This can help us to debug on some corner case.
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
Signed-off-by: Chao Yu <yuch...@huawei.com>
---
fs/f2fs/gc.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 197ebf4..2b
Do you mean check out-of-space test? I have tried that but no bugon.
On 2017/10/14 8:17, Chao Yu wrote:
On 2017/10/13 21:31, Yunlong Song wrote:
This can help us to debug on some corner case.
I can hit this bugon with generic/015 of fstest easily, could have a look at
this?
Thanks,
Signed
ds unnecessary check.
On 2017/10/14 8:14, Chao Yu wrote:
On 2017/10/13 21:21, Yunlong Song wrote:
Without this patch, it will cause all the free segments using up in some
corner case. For example, there are 100 segments, and 20 of them are
reserved for ovp. If 79 segments are full of data, segme
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
.gitignore | 4
1 file changed, 4 insertions(+)
diff --git a/.gitignore b/.gitignore
index abe1336..d5ca55d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -50,3 +50,7 @@ stamp-h1
/tools/fibmap.f2fs
/tools/parse.f2fs
/tools/f2f
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
fsck/fsck.c | 3 +++
fsck/mount.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index cb341ba..f63a609 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -1786,6 +1786,9 @@ static void fix_checkpoint(
Current design will lose recovery process when check_curseg_offset is OK.
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
fsck/fsck.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index cb341ba..56a47be 100644
--- a/fsck/
If flag bit to check is in 0xFF00, then the return value will be false,
this is not correct, so fix it.
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
fsck/f2fs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fsck/f2fs.h b/fsck/f2fs.h
index 871cffc..d
In come corner case, the reserved segments are used to do gc, and there are
not enough free segments for write checkpoint to finish its job, then the
gc process will fail to change the prefree segments to free segments.
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
fs/f2fs/gc
as a candidate
for small discards.
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
fs/f2fs/segment.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 8375257..a2e7c8f 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/seg
How? Can the invalid blocks of file A be discarded, if file B is alive
all the time and fggc_threshold is 507 ?
On 2017/8/28 17:59, Chao Yu wrote:
On 2017/8/26 20:49, Yunlong Song wrote:
1. write file A with 5 blocks to current empty active segment
2. remove file A
3. write checkpoint
4
se->ckpt_valid_blocks is always larger than se->valid_blocks, so
get_ssr_cost can be cleared.
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
fs/f2fs/gc.c | 11 +--
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index cd14
In come corner case, the reserved segments are used to do gc, and there are
not enough free segments for write checkpoint to finish its job, then the
gc process will fail to change the prefree segments to free segments.
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
fs/f2fs/gc.
r than ckpt_valid_blocks?
On 2017/9/4 9:17, Chao Yu wrote:
On 2017/9/1 20:14, Yunlong Song wrote:
se->ckpt_valid_blocks is always larger than se->valid_blocks, so
get_ssr_cost can be cleared.
I think this is not correct.
Thanks,
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
This reverts commit b7b7c4cf1c9ef0272a65f1480457cbfdadcda19d.
se->ckpt_valid_blocks will never be smaller than se->valid_blocks, so just
remove get_ssr_cost.
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
Signed-off-by: Chao Yu <yuch...@huawei.com>
---
fs/f2fs/gc.c |
segment, write 512 blocks and delete
511 blocks, the dirty_segments(sbi) is 0 and f2fs_gc fail again. This
can finally use up all the free segments and cause panic.
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
fs/f2fs/segment.c | 4
1 file changed, 4 deletions(-)
diff --git a/f
Hi, Jay,
I think it should not happen when need_gc == true but total_freed
==0, so I add it as bug_on to let it panic at once. And even CHECK_FS is
closed, this can also printk WARNING message for notice.
On 2017/10/13 7:23, Jaegeuk Kim wrote:
Hi Yunlong,
On 10/11, Yunlong Song wrote
ping...
On 2017/11/8 10:17, Yunlong Song wrote:
f2fs_balance_fs only actives once in the commit_inmem_pages, but there
are more than one page to commit, so all the other pages will miss the
check. This will lead to out-of-free problem when commit a very large
file. However, we cannot do
ping...
On 2017/11/17 8:54, Yunlong Song wrote:
f2fs_balance_fs only actives once in the commit_inmem_pages, but there
are more than one page to commit, so all the other pages will miss the
check. This will lead to out-of-free problem when commit a very large
file. However, we cannot do
SSR can make hot/warm/cold nodes written together, so why should we account
them different?
On 2017/11/29 19:56, Chao Yu wrote:
On 2017/11/27 14:54, Yunlong Song wrote:
Sometimes f2fs_gc is called with no target victim (e.g. xfstest
generic/027, ndirty_node:545 ndiry_dent:1 ndirty_imeta:513
Sometimes f2fs_gc is called with no target victim (e.g. xfstest
generic/027, ndirty_node:545 ndiry_dent:1 ndirty_imeta:513 rsvd_segs:21
free_segs:27, has_not_enough_free_secs will return true). This patch
first merges pages and then converts into sections.
Signed-off-by: Yunlong Song <yunlon
0b 41 8b 96 fc 03 00 00 41 8b be f4 03 00 00 4c 8b 21 45 8b
[ 5250.628467] RIP: f2fs_gc+0x9da/0xa80 RSP: c9000acd3b48
[ 5250.685538] ---[ end trace 00b8c84c59632b32 ]---
Let me fix it one by one.
On 2017/11/23 21:05, Chao Yu wrote:
On 2017/11/22 11:50, Yunlong Song wrote:
ping again...
On 2
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
fsck/fsck.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index 11b8b0b..faf0663 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -740,7 +740,7 @@ void fsck_chk_inode_blk(struct f2fs_s
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
fsck/fsck.c | 26 +-
fsck/fsck.h | 3 ++-
2 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index 2212aa3..b52b6e4 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -539,7
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
fsck/fsck.c | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index 11b8b0b..2212aa3 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -14,6 +14,15 @@
char *tree_mark;
ui
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com>
---
fsck/fsck.c | 19 ---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index 2212aa3..8ff4e4b 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -643,7 +643,7 @@ void fsck_chk_ino
1 - 100 of 228 matches
Mail list logo