Commit 089842de ("f2fs: remove codes of unused wio_mutex") removes codes
of unused wio_mutex, but missing the comment, so delete it.
Signed-off-by: Yunlong Song
---
fs/f2fs/f2fs.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 7cec897..03e7
v1->v2: delete comments in f2fs.h: "/* bio ordering for NODE/DATA */"
Signed-off-by: Yunlong Song
Reviewed-by: Chao Yu
Signed-off-by: Jaegeuk Kim
---
fs/f2fs/f2fs.h | 2 --
fs/f2fs/super.c | 5 +
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/fs/f2fs/f2f
when the whole section is invalid, which can issue discard
aligned to section size as much as possible and avoid redundant discard.
Signed-off-by: Yunlong Song
Signed-off-by: Chao Yu
---
fs/f2fs/segment.c | 24 +++-
1 file changed, 19 insertions(+), 5 deletions(-)
diff
to change zone_align_start_offset to u64, because
zone_align_start_offset is always
smaller than zone_size_bytes, which is u32.
Thanks,
Junling
On 2018/5/26 16:09, Yunlong Song wrote:
zone_align_start_offset should be u64, but config.start_sector is u32,
so it may be overflow when computing
ping...
On 2018/5/7 10:15, Yunlong Song wrote:
f2fs-tools uses ioctl BLKSSZGET to get sector_size, however, this ioctl
will return a value which may be larger than 512 (according to the value
of q->limits.logical_block_size), then this will be inconsistent with
the start_sector, si
zone_align_start_offset should be u64, but config.start_sector is u32,
so it may be overflow when computing zone_align_start_offset.
Signed-off-by: Yunlong Song
---
fsck/resize.c | 7 ---
mkfs/f2fs_format.c | 4 ++--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/fsck
in 512 size unit for a sector. To fix this problem, just
change the sector_size to the default value when computing with
start_sector. And fix sectors_per_blk as well.
Signed-off-by: Yunlong Song
---
fsck/resize.c | 4 ++--
mkfs/f2fs_format.c | 12 ++--
2 files changed, 8 inserti
in 512 size unit for a sector. To fix this problem, just set
the sector_size to the default value 512.
Signed-off-by: Yunlong Song
---
lib/libf2fs.c | 7 ---
1 file changed, 7 deletions(-)
diff --git a/lib/libf2fs.c b/lib/libf2fs.c
index 102e579..e160f2a 100644
--- a/lib/libf2fs.c
+++ b/
Please avoid this patch, I make a mistake.
On 2018/5/3 15:45, Yunlong Song wrote:
Commit 6f890df0 ("f2fs: fix out-of-order execution in f2fs_issue_flush")
uses waitqueue_active to wake up issue_flush thread, but there is no
wait entry to wake in this queue, so change it back to use th
Commit 6f890df0 ("f2fs: fix out-of-order execution in f2fs_issue_flush")
uses waitqueue_active to wake up issue_flush thread, but there is no
wait entry to wake in this queue, so change it back to use the original
fcc->dispatch_list to wake up issue_flush thread.
Signed-off-by:
zero_user_segment is OK.
Signed-off-by: Yunlong Song
---
fs/f2fs/inline.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index 3b77d64..573ec2f 100644
--- a/fs/f2fs/inline.c
+++ b/fs/f2fs/inline.c
@@ -367,7 +367,6 @@ static int f2fs_move_inline_dirents(struct inode *dir
In make_dentry_ptr_block, it is confused with "&" for t->dentry_bitmap
but without "&" for t->dentry, so delete "&" to make code more readable.
Signed-off-by: Yunlong Song
---
fs/f2fs/f2fs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(
Since f2fs_inode_info is allocated with flag GFP_F2FS_ZERO, so we do not
need to initialize zero value for its member any more.
Signed-off-by: Yunlong Song
---
fs/f2fs/super.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 0c1fe9b..42d564c 100644
Since f2fs_inode_info is allocated with flag GFP_F2FS_ZERO, so we do not
need to initialize zero value for its member any more.
Signed-off-by: Yunlong Song
---
fs/f2fs/super.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 0c1fe9b..3a7fa03
OK, got it.
On 2018/3/19 14:23, Jaegeuk Kim wrote:
On 03/19, Yunlong Song wrote:
Hi, Jaegeuk,
I find this patch is removed from current branch of dev-test
recently, why? Any bugs?
Moved into the beginning of the tree for cherry-picking into f2fs-stable.
Thanks,
On 2018/2/28 20:31
Hi, Jaegeuk,
I find this patch is removed from current branch of dev-test
recently, why? Any bugs?
On 2018/2/28 20:31, Yunlong Song wrote:
Previous dentry page uses highmem, which will cause panic in platforms
using highmem (such as arm), since the address space of dentry pages
from highmem
On 2018/2/28 13:48, Jaegeuk Kim wrote:
Hi Yunlong,
As Eric pointed out, how do you think using nohighmem for directory likewise
ext4, which looks like more efficient?
OK, I have sent out another patch like this.
Actually, we don't need to do this in
most of recent kernels, right?
Why? I
then cause panic since it doesn't call kmap_high but
kunmap_high is triggered at the end. To fix this problem in a simple
way, this patch avoids to put dentry page in pagecache into highmem.
Signed-off-by: Yunlong Song
---
fs/f2fs/dir.c | 23 +--
fs/f2fs/f
0x30)
Howerver, later patch:
commit e06f86e61d7a ("f2fs crypto: avoid unneeded memory allocation in
->readdir")
reverts the codes, which causes panic again in arm, so fix it back to the old
version.
Signed-off-by: Yunlong Song
Reviewed-by: Chao Yu
---
fs/f2fs/dir.c | 7 +++
ypto: avoid
unneeded memory allocation in ->readdir")
reverts the codes, which causes panic again in arm, so let's add part of
the old patch again for dentry page.
Signed-off-by: Yunlong Song
---
fs/f2fs/dir.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/fs/f2fs/dir.c b/fs/
, Eric Biggers wrote:
Hi Yunlong,
On Sat, Feb 24, 2018 at 05:14:58PM +0800, Yunlong Song wrote:
In some platforms (such as arm), high memory is used, then the
decrypting filename will cause panic, the reason see commit
569cf1876a32e574ba8a7fb825cd91bafd003882 ("f2fs crypto: allocate buffe
ypto: avoid
unneeded memory allocation in ->readdir")
reverts the codes, which causes panic again in arm, so let's add part of
the old patch again for dentry page.
Signed-off-by: Yunlong Song
---
fs/f2fs/dir.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/fs/f2fs/dir.c b/fs/
ypto: avoid
unneeded memory allocation when {en/de}crypting symlink")
commit e06f86e61d7a67fe6e826010f57aa39c674f4b1b ("f2fs crypto: avoid
unneeded memory allocation in ->readdir")
reverts the codes, which causes panic again in arm, so let's add the old
patch again.
Signed-off-
OK, Got it.
On 2018/2/11 11:50, Chao Yu wrote:
On 2018/2/11 11:34, Yunlong Song wrote:
Ping...
move_data_block misses set_cold_data, then the F2FS_WB_CP_DATA will
lack these data pages in move_data_block, and write_checkpoint can
not make sure this pages committed to the flash.
Hmm.. data
Ping...
move_data_block misses set_cold_data, then the F2FS_WB_CP_DATA will
lack these data pages in move_data_block, and write_checkpoint can
not make sure this pages committed to the flash.
On 2018/2/8 20:33, Yunlong Song wrote:
Signed-off-by: Yunlong Song
---
fs/f2fs/gc.c | 1 +
1 file
that it has run time out, and should
handle the inmem pages
Back to these two patches, why not use them to separate inmem pages
and GCed data pages in such a simple way.
On 2018/2/9 21:38, Chao Yu wrote:
On 2018/2/9 21:29, Yunlong Song wrote:
Back to the problem, if we skip out, then the
Back to the problem, if we skip out, then the f2fs_gc will go
into dead loop if the apps only atomic start but never atomic
commit. The main aim of my two patches is to remove the skip
action to avoid the dead loop.
On 2018/2/9 21:26, Chao Yu wrote:
On 2018/2/9 20:56, Yunlong Song wrote:
As
ter __commit_inmem_pages->do_write_data_page.
On 2018/2/9 20:44, Chao Yu wrote:
On 2018/2/8 11:11, Yunlong Song wrote:
Then the GCed data pages are totally mixed with the inmem atomic pages,
If we add dio_rwsem, GC flow is exclude with atomic write flow. There
will be not race case to mix GCed page into
Signed-off-by: Yunlong Song
---
fs/f2fs/gc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index b9d93fd..2095630 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -692,6 +692,7 @@ static void move_data_block(struct inode *inode, block_t
bidx,
fio.op
this patch to fix the
dnode page problem (dnode page commited but data page are not committed
for the GCed page)?
On 2018/2/7 20:16, Chao Yu wrote:
On 2018/2/6 11:49, Yunlong Song wrote:
This patch adds fi->commit_lock to avoid the case that GCed node pages
are committed but GCed data pages
This patch adds fi->commit_lock to avoid the case that GCed node pages
are committed but GCed data pages are not committed. This can avoid the
db file run into inconsistent state when sudden-power-off happens if
data pages of atomic file is allowed to be GCed before.
Signed-off-by: Yunlong S
. These patches and the locks can make sure the GCed data
pages are all committed to nand flash with their nodes.
On 2018/2/5 19:10, Chao Yu wrote:
On 2018/2/5 17:37, Yunlong Song wrote:
OK, details as I explained before:
atomic_commit GC
- file_write_and_wait_range
E] during atomic committing to exclude
GCing data block of atomic opened file?
Thanks,
Signed-off-by: Yunlong Song
---
fs/f2fs/data.c | 5 ++---
fs/f2fs/gc.c | 6 --
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 7435830..edafcb6
/5 14:29, Chao Yu wrote:
On 2018/2/5 10:53, Yunlong Song wrote:
Is it necessary to add a lock here? What's the problem of this patch (no
lock at all)? Anyway, the problem is expected to be fixed asap, since
attackers can easily write an app with only atomic start and no atomic
commit, which
which will block all the fs ops (all the fs ops
will hang up in f2fs_balance_fs).
On 2018/2/4 22:56, Chao Yu wrote:
On 2018/2/3 10:47, Yunlong Song wrote:
If inode has already started to atomic commit, then set_page_dirty will
not mix the gc pages with the inmem atomic pages, so the page can be
This patch enables to gc atomic file by adding GC_WRITTEN_PAGE to
identify the gced pages of atomic file, which can avoid
register_inmem_page in set_page_dirty, so the gced pages will not mix
with the inmem pages.
Signed-off-by: Yunlong Song
---
fs/f2fs/data.c| 7 ++-
fs/f2fs/gc.c
If inode has already started to atomic commit, then set_page_dirty will
not mix the gc pages with the inmem atomic pages, so the page can be
gced safely.
Signed-off-by: Yunlong Song
---
fs/f2fs/data.c | 5 ++---
fs/f2fs/gc.c | 6 --
2 files changed, 6 insertions(+), 5 deletions(-)
diff
29 11:37, Yunlong Song wrote:
Commit 7a20b8a61eff81bdb7097a578752a74860e9d142 ("f2fs: allocate node
and hot data in the beginning of partition") introduces another mount
option, heap, to reset it back. But it does not do anything for heap
mode, so fix it.
I think Jaegeuk did three things in
Commit 7a20b8a61eff81bdb7097a578752a74860e9d142 ("f2fs: allocate node
and hot data in the beginning of partition") introduces another mount
option, heap, to reset it back. But it does not do anything for heap
mode, so fix it.
Signed-off-by: Yunlong Song
---
fs/f2fs/gc.c | 5 +++-
f2fs_put_dnode(&dn);
}
--
Thanks,
Yunlong Song
valid_block_count > sbi->user_block_count)) {
spin_unlock(&sbi->stat_lock);
goto enospc;
}
--
Thanks,
Yunlong Song
sbi->current_reserved_blocks;
+ buf->f_bavail = buf->f_bfree;
avail_node_count = sbi->total_node_count - sbi->nquota_files -
F2FS_RESERVED_NODE_NUM;
--
Thanks,
Yunlong Song
update_sit_entry(sbi, new_blkaddr, 1) with no next_blkoff refresh, as a
result, when recovery process write checkpoint and sync nodes, the
next_blkoff of curseg is used in the segment bit map, then it will
cause f2fs_bug_on. So let's check segment type in __f2fs_replace_block.
Signed-off-by: Yunlong Song
--
update_sit_entry(sbi, new_blkaddr, 1) with no next_blkoff refresh, as a
result, when recovery process write checkpoint and sync nodes, the
next_blkoff of curseg is used in the segment bit map, then it will
cause f2fs_bug_on. So let's check segment type in __f2fs_replace_block.
Signed-off-by: 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 890d483..e3bbabf 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -2719,6 +2719,8 @@ void __f2fs_replace_block(struct f2fs_sb_info *sbi
On 2018/1/2 14:49, Chao Yu wrote:
On 2017/12/30 15:42, Yunlong Song wrote:
In some case, the node blocks has wrong blkaddr whose segment type is
You mean *data block* has wrong blkaddr whose segment type is NODE?
Yes.
NODE, e.g., recover inode has missing xattr flag and the blkaddr is in
DATA segment.
Signed-off-by: Yunlong Song
---
fs/f2fs/recovery.c | 3 ++-
fs/f2fs/segment.h | 3 +++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index 7d63faf..e8fee4a 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -478,7 +
In this case, f2fs_gc will skip all the victims and return with no dead
loop. The atomic file will
use SSR to OPU, it‘s OK.
On 2017/12/25 17:45, Chao Yu wrote:
On 2017/12/25 14:15, Yunlong Song wrote:
What if the application starts atomic write but forgets to commit, e.g.
bugs in application
What if the application starts atomic write but forgets to commit, e.g.
bugs in application or the application
is a malicious software itself?
On 2017/12/25 11:44, Chao Yu wrote:
On 2017/12/23 21:09, Yunlong Song wrote:
For some corner case, f2fs_gc selects one target victim but cannot free
. This patch identifies the dead-loop segment, and skips
it in __get_victim next time.
Signed-off-by: Yunlong Song
---
fs/f2fs/f2fs.h | 8
fs/f2fs/gc.c| 34 ++
fs/f2fs/super.c | 3 +++
3 files changed, 45 insertions(+)
diff --git a/fs/f2fs/f2fs.h b
And there is en[namelen] = '\0', should fix namelen to its right value.
On 2017/12/23 11:35, Chao Yu wrote:
On 2017/12/23 11:19, Yunlong Song wrote:
Double free problem:
Since ddr bit jump makes i_namelen a larger value (> 255),when file is
not encrypted,
the convert_encrypted_nam
Both are OK, since nid < root_ino cannot trigger segmentation fault
(nat_block->entries[nid%NAT_ENTRY_PER_BLOCK]).
On 2017/12/23 11:14, Chao Yu wrote:
On 2017/12/18 19:53, Yunlong Song wrote:
Signed-off-by: Yunlong Song
How about introducing IS_AVAILABLE_NID as below, and use it i
Double free problem:
Since ddr bit jump makes i_namelen a larger value (> 255),when file is
not encrypted,
the convert_encrypted_name will memcpy out range of en[255], when en is
freed, there
will be double free problem.
On 2017/12/23 11:05, Chao Yu wrote:
On 2017/12/18 21:25, Yunlong S
v1 -> v2: use child_info to pass dentry namelen
v2 -> v3: check child != NULL to include the F2FS_FT_ORPHAN file type
v3 -> v4: fix the i_namelen problem of dump.f2fs
Signed-off-by: Yunlong Song
---
fsck/fsck.c | 28 +++-
fsck/fsck.h | 3 ++-
2 files ch
Signed-off-by: Yunlong Song
---
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 +539,7 @@ int fsck_chk_node_blk
Signed-off-by: Yunlong Song
---
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_sb_info *sbi, u32 nid,
for
Signed-off-by: Yunlong Song
---
fsck/fsck.c | 23 ++-
fsck/fsck.h | 3 ++-
2 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index 2212aa3..f25799c 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -539,7 +539,7 @@ int fsck_chk_node_blk
Signed-off-by: Yunlong Song
---
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_inode_blk(struct f2fs_sb_info *sbi
Signed-off-by: Yunlong Song
---
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;
uint32_t tree_mark_size = 256;
+static
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
---
fs
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
ping again...
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
ping again...
On 2017/11/17 9:09, Yunlong Song wrote:
This can help to find potential bugs on some corner case.
Signed-off-by: Yunlong Song
---
fs/f2fs/gc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 5d5bba4..c89128b 100644
--- a/fs/f2fs/gc.c
e
write with REQ_PREFLUSH | REQ_FUA.
On 2017/11/17 11:20, Chao Yu wrote:
On 2017/11/17 11:04, Yunlong Song wrote:
The atomic commit will trigger:
-f2fs_do_sync_file(filp, 0, LLONG_MAX, 0, true)
-file_write_and_wait_range(file, 0, LLONG_MAX)
-fsync_no
with
REQ_PREFLUSH | REQ_FUA,
we do not need to worry about the inconsistent problem. Right?
On 2017/11/17 10:49, Chao Yu wrote:
On 2017/11/17 8:58, Yunlong Song wrote:
Is there any problem if just deleting the judgement condition in this patch?
IIRC, dirty node comes from data segment GC can be
This can help to find potential bugs on some corner case.
Signed-off-by: Yunlong Song
---
fs/f2fs/gc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 5d5bba4..c89128b 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -1035,6 +1035,7 @@ int f2fs_gc(struct
Is there any problem if just deleting the judgement condition in this patch?
On 2017/11/8 17:28, Chao Yu wrote:
On 2017/11/8 10:34, Yunlong Song wrote:
If some files are opened with atomic flag and have not commited yet, at
the same time, if all the target victim segments have at least one
atomicity. As a result, we should do f2fs_balance_fs
for all the inmem pages together.
Signed-off-by: Yunlong Song
---
fs/f2fs/debug.c | 5 +++--
fs/f2fs/f2fs.h| 26 --
fs/f2fs/segment.c | 30 --
fs/f2fs/segment.h | 4 +++-
4 files
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
Agree.
On 2017/11/10 1:59, Jaegeuk Kim wrote:
On 11/08, Yunlong Song wrote:
So we should use f2fs_bug_on(sbi, !total_freed && !sync && gc_type ==
FG_GC);
f2fs_bug_on(sbi, !total_freed && has_not_enough_free_secs(sbi, 0, 0)); ?
On 2017/11/7 14:56, Chao Yu wrote:
On
So we should use f2fs_bug_on(sbi, !total_freed && !sync && gc_type ==
FG_GC);
On 2017/11/7 14:56, Chao Yu wrote:
On 2017/11/7 12:01, Yunlong Song wrote:
Sorry, misunderstanding, because I think when sync == true, FG_GC does not
check has_not_enough_free_secs, so maybe it doe
get_valid_blocks will never be 0, then do_garbage_collect will
always return 0.
Signed-off-by: Yunlong Song
---
fs/f2fs/gc.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 5d5bba4..3fdcd04 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -621,9 +621,6 @@ static
atomicity. As a result, we should do f2fs_balance_fs
for all the inmem pages together.
Signed-off-by: Yunlong Song
---
fs/f2fs/debug.c | 5 +++--
fs/f2fs/f2fs.h| 26 --
fs/f2fs/segment.c | 30 --
fs/f2fs/segment.h | 4 +++-
4 files
get victim.
On 2017/11/7 11:26, Jaegeuk Kim wrote:
On 11/07, Yunlong Song wrote:
Because I find that some out-of-free problem is caused by the failure
of get victim target. For example, chao has pointed out that he has
found out a bug when adding this bug_on last week.
That's NOT what I
Because I find that some out-of-free problem is caused by the failure
of get victim target. For example, chao has pointed out that he has
found out a bug when adding this bug_on last week.
On 2017/11/7 10:40, Jaegeuk Kim wrote:
On 11/06, Jaegeuk Kim wrote:
On 11/06, Yunlong Song wrote:
Agree
I test it in an old kernel and find it hangs in gc process, maybe it is
a bug of
old kernel.
On 2017/11/7 10:49, Jaegeuk Kim wrote:
On 11/07, Yunlong Song wrote:
This patch tries its best to collect prefree segments and make it free to be
used
in the commit process, or it will use up free
am afraid that will lead to long latency if the atomic file
is large and the
device is almost full and fragmented.
On 2017/11/7 9:55, Jaegeuk Kim wrote:
On 11/06, 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
atomicity. As a result, we should collect prefree
segments if needed.
Signed-off-by: Yunlong Song
---
fs/f2fs/f2fs.h| 1 +
fs/f2fs/segment.c | 24 +++-
2 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 13a96b8..04ce48f
So there is no connection between sbi->user_block_count -
valid_user_blocks(sbi)
and fi->inmem_blocks. It is sensible that sbi->user_block_count -
valid_user_blocks(sbi)
is smaller than fi->inmem_blocks.
On 2017/11/3 23:23, Chao Yu wrote:
On 2017/11/3 22:40, Yunlong Song wrote:
Agree.
On 2017/11/3 11:44, Jaegeuk Kim wrote:
On 10/13, Yunlong Song wrote:
This can help us to debug on some corner case.
Signed-off-by: Yunlong Song
Signed-off-by: Chao Yu
---
fs/f2fs/gc.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/gc.c b/fs/f2fs
0006b7160
[ 136.953162] R10: 0022 R11: 0202 R12:
7f491a1c4010
[ 136.953162] R13: 02001000 R14: 0200 R15:
006b7938
So I think we should add the check code.
On 2017/11/3 12:48, Yunlong Song wrote:
Because I found that it will still lead to out-of-fre
Kim wrote:
On 10/30, 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 f2fs_balance_fs
ping...
On 2017/10/30 21:04, 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/10/13 21:31, Yunlong Song wrote:
This can help us to debug on some corner case.
Signed-off-by: Yunlong Song
Signed-off-by: Chao Yu
---
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..2b03202
So it seems it is really useful to add this bug_on in gc.
On 2017/10/31 11:17, Chao Yu wrote:
On 2017/10/31 9:32, Yunlong Song wrote:
I think there may be bugs somewhere, since no victim is selected but it
really needs gc.
What is the size of the data image?
I have providered the testcase
So I use CHECK_FS config to control it. When CHECK_FS is off, all the
other f2fs_bug_on also
only printk WARNING info rather than trigger BUG_ON.
On 2017/10/31 9:59, Chao Yu wrote:
On 2017/10/31 9:33, Yunlong Song wrote:
ping...
On 2017/9/1 20:00, Yunlong Song wrote:
In come corner case
ping...
On 2017/9/1 20:00, Yunlong Song wrote:
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
I think there may be bugs somewhere, since no victim is selected but it
really needs gc.
What is the size of the data image?
On 2017/10/16 11:25, Chao Yu wrote:
On 2017/10/14 20:34, Yunlong Song wrote:
Do you mean check out-of-space test? I have tried that but no bugon.
Yes, test recent f2fs
atomicity. As a result, we should collect prefree
segments if needed and stop atomic commit when there are not enough
available blocks to write atomic pages.
Signed-off-by: Yunlong Song
---
fs/f2fs/f2fs.h| 1 +
fs/f2fs/segment.c | 29 -
2 files changed, 29
ned-off-by: Yunlong Song
---
fs/f2fs/f2fs.h| 1 -
fs/f2fs/segment.c | 20 +---
2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 13a96b8..f166112 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -2567,7 +2567,6 @@ int restore_no
erent opinion, let
me know.
Thanks,
On 2017/10/16 11:43, Chao Yu wrote:
On 2017/10/14 20:53, Yunlong Song wrote:
Oh, yes it is. I found that problem in a kernel tree which does not have
commit
c6f82fe90d7458e5fa190a6820bfc24f96b0de4e (Revert "f2fs: put allocate_segment
after refresh_sit_entry&
segment status, it needs to be updated after segment allocation
since we can skip updating current opened segment status.
Fixes: 5e443818fa0b ("f2fs: handle dirty segments inside refresh_sit_entry")
Suggested-by: Chao Yu
Signed-off-by: Yunlong Song
---
fs/f2fs/f2fs.h| 1 -
fs/f2fs/segm
.
Signed-off-by: Yunlong Song
Signed-off-by: Chao Yu
---
Documentation/ABI/testing/sysfs-fs-f2fs | 13 -
fs/f2fs/f2fs.h | 13 +++--
fs/f2fs/super.c | 3 ++-
fs/f2fs/sysfs.c | 15 ---
4 files changed
.
Signed-off-by: Yunlong Song
Signed-off-by: Chao Yu
---
Documentation/ABI/testing/sysfs-fs-f2fs | 15 +--
fs/f2fs/f2fs.h | 13 +++--
fs/f2fs/super.c | 3 ++-
fs/f2fs/sysfs.c | 15 ---
4 files
which have already been reserved.
Signed-off-by: Yunlong Song
Signed-off-by: Chao Yu
---
Documentation/ABI/testing/sysfs-fs-f2fs | 15 +--
fs/f2fs/f2fs.h | 15 ---
fs/f2fs/super.c | 5 +++--
fs/f2fs/sysfs.c
: Yunlong Song
---
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 46dfbca..fa2c36b 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -384,6 +384,9 @@ static int __commit_inmem_pages(struct inode *inode
wrote:
On 2017/10/26 17:07, Jaegeuk Kim wrote:
On 10/26, Chao Yu wrote:
From: Yunlong Song
It supports to extend reserved_blocks sysfs interface to be soft
threshold, which allows user configure it exceeding current available
user space.
So, how can we change sbi->reserved_blocks?
Cou
Agree
On 2017/10/26 11:26, Chao Yu wrote:
On 2017/10/26 11:07, Yunlong Song wrote:
Yes, I agree with the soft semantic you introduce, it is too slow to
increase cur_reserved_blocks only in
dec_valid_block(,node)_count, e.g. if users want to set
cur_reserved_blocks to 10G.
Yup,
Then how
1 - 100 of 359 matches
Mail list logo