default_options in super.c. It do
some default setting, and both mount and remount operations will
call this function to complete default setting.
Signed-off-by: Yunlei He heyun...@huawei.com
---
fs/f2fs/super.c | 32 ++--
1 file changed, 18 insertions(+), 14 deletions(-)
diff
default_options in super.c. It do
some default setting, and both mount and remount operations will
call this function to complete default setting.
Signed-off-by: Yunlei He heyun...@huawei.com
---
fs/f2fs/super.c | 31 ++-
1 file changed, 18 insertions(+), 13 deletions(-)
diff
In the process of formatting, we zero out only one copy of NAT and
SIT area, but we use both of them when the filesystem is sucessfully
mounted. So I change the code to initialize both of two copies in mkfs.
Signed-off-by: Yunlei He heyun...@huawei.com
---
mkfs/f2fs_format.c | 6 +++---
1 file
like
CURSEG_XXX_TYPE.
Signed-off-by: Yunlei He heyun...@huawei.com
---
fsck/dump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fsck/dump.c b/fsck/dump.c
index 8698b28..81a39c8 100644
--- a/fsck/dump.c
+++ b/fsck/dump.c
@@ -45,7 +45,7 @@ void sit_dump(struct f2fs_sb_info *sbi
4|0 0|166 5|39 4|101 0|111
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index cfe3f95..f794781 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -693,7
CP_DISCARD traverse all segments in fstrim_range to add small discards,
it is better to select entry->len bigger than trim_minlen.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/segment.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/segme
write_checkpoint() tries to get cp_blkaddr from superblock buffer,
if the buffer happen to be destroied by something else, it may
bring in unpredictable effect on f2fs.
this patch fix it by back-up a raw_super copy.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/checkpoint.
This patch calculate main area begin from a new zone,
avoid misalign if segments per zone is not 1.
Signed-off-by: Yunlei He <heyun...@huawei.com>
Signed-off-by: Shuoran Liu <liushuo...@huawei.com>
---
mkfs/f2fs_format.c | 20 ++--
1 file changed, 10 insertions(+),
This patch adds a max block count for f2fs_map_blocks
Signed-off-by: Yunlei He <heyun...@huawei.com>
Signed-off-by: Xue Liu <liuxueliu@huawei.com>
---
fs/f2fs/data.c | 4
fs/f2fs/f2fs.h | 3 +++
2 files changed, 7 insertions(+)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
i
This patch add a mismatch check between segment and section in
sanity_check_raw_super.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/super.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index c3070c1..b51a690 100644
--- a/f
This patch add a mismatch check between segment and section in
sanity_check_raw_super.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/super.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index c3070c1..e88af5a 100644
--- a/f
This patch adds a max block check for get_data_block_bmap.
Trinity test program will send a block number as parameter into
ioctl_fibmap, which will be used in get_node_path(), when the block
number large than f2fs max blocks, it will trigger kernel bug.
Signed-off-by: Yunlei He <he
This patch init total_zombie_tree in init_extent_cache_info.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/extent_cache.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c
index 23e7c82..b37184f 100644
--- a/fs/f2fs/extent_c
In linux 3.10, we can not make sure the return value of nd_get_link function
is valid. So this patch add a check before use it.
Signed-off-by: Yunlei He <heyun...@huawei.com>
Signed-off-by: Shuoran Liu <liushuo...@huawei.com>
---
fs/f2fs/namei.c | 7 ++-
1 file changed, 6 inse
ck:2
nid:57076 ino:57076 offset:0blkaddr: 2071232 pack:2
nid:57118 ino:57118 offset:0blkaddr: 2071233 pack:2
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fsck/dump.c | 122 ---
In some case, we need confirm node or data blkaddr is ok at first,
and then fix the conflict in ssa block. If the node blkaddr happen to
locate in data type segment caused by something error, may be we 'd
better ignore it, and it's same with data blkaddr.
Signed-off-by: Yunlei He <he
fix missing skip pages info in f2fs_writepages trace event.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/checkpoint.c | 5 +++--
fs/f2fs/data.c | 5 +++--
fs/f2fs/node.c | 5 +++--
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/checkpoint.
In some case, we need confirm node or data blkaddr is ok at first,
and then fix the conflict in ssa block. If the node blkaddr happen to
locate in data type segment caused by something error, may be we 'd
better ignore it, and it's same with data blkaddr.
Signed-off-by: Yunlei He <he
no need to wait inline file page writeback for no one
use it, so this patch delete unnecessary wait.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/inline.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index f
we should do GC or end up with checkpoint, if there
are so many dirty dir/node pages without enough free segments. But should
all theads wait for gc if the condition is not satisfied? Maybe if someone
is gcing, they can by pass it.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
f
no need to wait inline file page writeback for no one
use it, so this patch delete unnecessary wait.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/inline.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index fc4d298..ec44640 100644
--
No need inc dirty pages under inode lock
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/checkpoint.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 6402e93..3da6499 100644
--- a/fs/f2fs/checkpoint.c
+++ b/f
This patch check sector size if formatted from a regular file,
write the sector info to superblock from device info.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fsck/mount.c | 36
1 file changed, 36 insertions(+)
diff --git a/fsck/mount.c
:1710] nid[0x171e] addr[0xbd4e25d0]
ino[0x77c34c09]
One nat block may be stepped by a data block, so this patch forbid to
write if the blkaddr is illegal
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/segment.h | 4 ++--
1 file changed, 2 insertions(+), 2 del
previous segment selected may become free after write_checkpoint,
so here, we select victim again.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/gc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index de6c41c..704e2e1
This patch skip discard block range smaller than trim_minlen,
and can not be merged by neighbour
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/segment.c | 4
1 file changed, 4 insertions(+)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 6d16ecf..9e13db0
type during reset_curseg. So, we check
segment is stale or not, and select a new victim to avoid this.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/gc.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index de6c41c..e
Similar as f2fs_write_inode, f2fs_write_inline_data just
mark inode page dirty, so it's no need to write inline data
under read lock of cp_rwsem.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/data.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/da
This patch replace rw semaphore extent_tree_lock with mutex lock
for no read cases with this lock.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/extent_cache.c | 22 +++---
fs/f2fs/f2fs.h | 2 +-
2 files changed, 12 insertions(+), 12 deletions(-)
diff
It has already waited page stable in grab_cache_page_write_begin,
so we remove this unnecessary wait.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/data.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 8c61fa7..1201949 100644
--- a/f
: victim 26425 : valid blocks # 3
143.181872: f2fs_get_victim: dev = (259,30), type = No TYPE, policy =
(Foreground GC, LFS-mode, Greedy), victim = 26425 ofs_unit = 1,
pre_victim_secno = 26425, prefree = 0, free = 244
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/gc.c | 6 ++
This patch remove redundant set_page_dirty in truncate_blocks
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/file.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 36c1565..c6ca00c 100644
--- a/fs/f2fs/file.c
+++ b/f
This patch fix a error return value in truncate_partial_data_page
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index c6ca00c..c186d75 100644
--- a/fs/f2fs/file.c
+++ b/f
This patch add a function to punch discard command if one segment
reuse before discard. Split this segment from multi-segments discard
range, and discard the left bigger range.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/segment.c | 18 +-
1 file chang
This patch add a function to modify discard command if one segment
reuse before discard. Split this segment from multi-segments discard
range, and discard the left bigger range.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/segment.c | 18 +-
1 file chang
-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/file.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 37c24be..7d1c3f3 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -561,6 +561,12 @@ static int truncate_partial_data_page(struct inode
This patch remove redundant value definition in build_sit_entries
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/segment.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index e78501c..fbcc172 100644
--- a/f
No need to wait for data page writeback, wait or not
can be decided by device.
Signed-off-by: Yunlei He <heyun...@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 e78501c..71e4a0f 100644
--
This patch allow preallocates data blocks for buffered aio writes
in encrypted file.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/data.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 3e0ef2d..932166e 100644
--
For forground gc, if can't find a victim in one max_victim_search,
try it again.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/gc.c | 23 ---
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 24acbbb..19e51a5
This patch enables to do fstrim without checkpoint, if there is no fs
change.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/checkpoint.c | 11 +++
fs/f2fs/debug.c | 10 --
fs/f2fs/f2fs.h | 7 ++-
3 files changed, 25 insertions(+), 3 deletions(-)
This patch add discard block count to sys entry of f2fs status
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/debug.c | 10 --
fs/f2fs/f2fs.h | 7 ++-
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c
index b
This patch enables to do fstrim without checkpoint, if there is no fs
change.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/checkpoint.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index be1c54b..1207b91
If one block has been to written to a new place, just return
in move data process. This patch check it again with holding
page lock.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/gc.c | 16
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/fs/f2f
it better to decide resize or not by sector num.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fsck/main.c | 4 ++--
fsck/resize.c | 5 -
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/fsck/main.c b/fsck/main.c
index 7e8fdf3..64537cc 100644
--- a/fsck/main.c
+++
This patch fix an error in migrate_ssa when resize with condition
that offset is not zero && new_sum_blkaddr > old_sum_blkaddr + offset
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fsck/resize.c | 37 +++--
1 file changed, 27 insertions
to finish,
so it seems a deadlock between cp and fsync path.
This patch add a wait on page write back before set node page dirty
to avoid this problem.
Signed-off-by: Yunlei He <heyun...@huawei.com>
Signed-off-by: Pengyang Hou <houpengy...@huawei.com>
---
fs/f2fs/node.c | 1 +
1 fil
This patch add a simple check orphan inodes in -p 1 mode
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fsck/fsck.c | 21 +++--
fsck/fsck.h | 2 +-
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index 0009ea4..fd28d94
This patch fix an error in dump nat pack num
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fsck/dump.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fsck/dump.c b/fsck/dump.c
index 8e7c85c..5d0d3d9 100644
--- a/fsck/dump.c
+++ b/fsck/dump.c
@@ -34,7 +34,7 @
If one block has been to written to a new place, just return
in move data process. This patch check it again with holding
page lock.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/gc.c | 16
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/fs/f2f
If one block has been to written to a new place, just return
in move data process. This patch check it again with holding
page lock.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/gc.c | 16
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/fs/f2f
This patch add a judgment after calloc avoid memory alloc
failure
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fsck/mount.c | 20 +++-
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/fsck/mount.c b/fsck/mount.c
index f2055e4..e4adb0e 100644
--- a/fsck/m
This patch avoid to write a new cp if no journal info
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fsck/mount.c | 16 ++--
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/fsck/mount.c b/fsck/mount.c
index dd7a081..f2055e4 100644
--- a/fsck/mount.c
+++
This patch fix a missing size change in f2fs_setattr
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/file.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 4c87261..383b5c2 100644
--- a/fs/f2fs/file.c
+++ b/f
If the range we write cover the whole valid data
in the last page, we do not need to read it.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/data.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index b90fb01..d9f7339 100644
--- a/f
If userspace issue a fstrim with a range not involve prefree segments,
it will reuse these segments without discard. This patch fix it.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/segment.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/f
This patch remove unused values in function recover_fsync_data
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/recovery.c | 4
1 file changed, 4 deletions(-)
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index 981a958..4fb4471 100644
--- a/fs/f2fs/recovery.c
+++ b/f
If userspace issue a fstrim with a range not involve prefree segments,
it will reuse these segments without discard. This patch fix it.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/segment.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/seg
If userspace issue a fstrim with a range not involve prefree segments,
it will reuse these segments without discard. This patch fix it.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/segment.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/f
This patch add a judgement before read, if the page has been
uptodate, move the block directly.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/gc.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 88bfc3d..40776b4 100644
--- a/fs/f2f
If userspace issue a fstrim with a range not involve prefree segments,
it will reuse these segments without discard. This patch fix it.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/segment.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/f
This patch fix a problem of using memory after free
in the function __try_merge_extent_node.
Fixes: a03f01f2673 ("f2fs: reconstruct the code to free an extent_node")
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/extent_cache.c | 5 +++--
1 file changed, 3 insertions
This patch fix a problem of using memory after free
in function __try_merge_extent_node.
Fixes: 0f825ee6e873 ("f2fs: add new interfaces for extent tree")
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/extent_cache.c | 5 +++--
1 file changed, 3 insertions(+), 2 de
Similar as this problem:
f2fs: relax node version check for victim data in gc
But this patch fix wrong SSA nid.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/gc.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
-start atomic write
-set_page_dirty
-register_inmem_page
<--- truncate or punch hole
-commit atomic write
Here, may cause memory reclaim painc for page->mapping is null,
but private is -1.
Signed-off-by: Yunlei He <heyun...@huawei.com
This patch fix a last_victim overflow problem
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/gc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 418fd98..3b5e799a 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -361,6 +361,8 @@ stat
Use set_page_private marcro instead of operte page struct
directly
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/trace.c b/fs/f2fs/trace.c
index c82ab40..bccbbf2 100644
--- a/fs/f2fs/trace.c
++
This patch add a bug_on in is_alive in case of infinite loop.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/gc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 418fd98..c01168c 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -550,6
This patch update max_orphans inode number, remove nat bits blocks
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/checkpoint.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 9aba0bb..64dd429 100644
--
This patch add a rb tree for discard command.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/f2fs.h| 2 ++
fs/f2fs/segment.c | 35 ++-
2 files changed, 32 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 5
her threads
modify this nid concurrently. So we just obtain current_nat_addr
under nat_tree_lock, node info is always same in both nat pack.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/node.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs
This patch add a missing truncate_inode_pages_final
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/super.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index cfb40d3..7ad2606 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@
If an encrypted block has been read to memory, we just dirty it
and return directly.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/gc.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 418fd98..ca94518 100644
--
This patch allow write data to normal file when writting
new checkpoint.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/checkpoint.c | 26 +-
fs/f2fs/data.c | 23 ---
fs/f2fs/f2fs.h | 1 +
fs/f2fs/super.c | 1 +
4
This patch fix a resize faill for sector size mismatch.
The initial fs comes from an image file, with sector size
512KB, and the block device sector size is equal to block
size.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fsck/main.c | 5 +++--
1 file changed, 3 insertions(+), 2 del
This patch allow write data to normal file when writting
new checkpoint.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/checkpoint.c | 4 +++-
fs/f2fs/data.c | 23 ---
fs/f2fs/f2fs.h | 1 +
fs/f2fs/super.c | 1 +
4 files changed, 21 inse
Skip writeback meta pages if cp_mutex lock acquire failed, cp will
flush dirty pages instead.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/checkpoint.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
Skip writeback meta pages if cp_mutex lock acquire failed, cp will
flush dirty pages instead.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/checkpoint.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
This patch allow write data to normal file when writting
new checkpoint.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/checkpoint.c | 4 +++-
fs/f2fs/data.c | 23 ---
fs/f2fs/f2fs.h | 1 +
fs/f2fs/super.c | 1 +
4 files changed, 21 inse
This patch remove unused input parameter in function
new_node_page.
Signed-off-by: Yunlei He <heyun...@huawei.com>
Signed-off-by: Yong Sheng <shengyo...@huawei.com>
---
fs/f2fs/f2fs.h | 3 +--
fs/f2fs/node.c | 7 +++
fs/f2fs/xattr.c | 2 +-
3 files changed, 5 insertions(+),
);
--->bug_on for nid has
been used by file A
In recovery process, new allocated node blocks may "reuse" xattr block
nids, this patch alloc new nids for xattr blocks in recovery process to
avoid this problem.
Signed-off-by: Yunlei He <heyun...@huawei.com>
Signed
);
--->bug_on for nid has
been used by file A
In recovery process, new allocated node blocks may "reuse" xattr block
nids, this patch alloc new nids for xattr blocks in recovery process to
avoid this problem.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
-write_checkpoint
-do_checkpoint
-next_free_nid<--- something wrong with next free nid
-f2fs_fill_super
-build_node_manager
-build_free_nids
-get_current_nat_page
-__get_meta_page <--- attempt to access beyond end of device
Signed-off-by: Yun
Write back last cp block in the end in case of sudden power off
during fsck process
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fsck/mount.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/fsck/mount.c b/fsck/mount.c
index a0b0bea..700a4ff 100644
---
Came across a hungtask caused by huge number of rb tree traversing
during adding discard addrs in cp. This patch combine these consistence
checks and move it to discard thread.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/segment.c | 8 ++--
1 file changed, 2 insertions
-- -f2fs_map_blocks
-f2fs_lookup_extent_tree
-f2fs_bug_on(sbi,
!et);
The same problem with f2fs_new_inode.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/extent_cache.c | 3 +++
1 file chan
This patch add a new method get_ssr_cost to select
SSR segment more accurately.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/gc.c | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 14c71ac..8139297 100644
--- a/f
rn ret;
}
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/segment.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index a8f4c81..029b5ea 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -566,6 +
-- -f2fs_map_blocks
-f2fs_lookup_extent_tree
-f2fs_bug_on(sbi,
!et);
The same problem with f2fs_new_inode.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/extent_cache.c | 12 ++
We use f2fs_finalize_device to fsync previous data in
checkpoint area before write last CP pack, in order to avoid
cp corruption in sudden-power-off case. But this function will
close the device, so this patch introduce a function to call
fsync() only.
Signed-off-by: Yunlei He <he
int
... ...
-alloc_nid <- nid reuse
-get_node_page
-f2fs_bug_on <- nid != node_footer->nid
It's need a rw_sem to avoid the race
Signed-off-by: Yunlei He <heyun...@huawei.co
int
... ...
-alloc_nid <- nid reuse
-get_node_page
-f2fs_bug_on <- nid != node_footer->nid
It's need a rw_sem to avoid the race
Signed-off-by: Yunlei He <heyun...@huawei.co
This patch add a block validate check in dump.f2fs
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fsck/dump.c | 17 +++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/fsck/dump.c b/fsck/dump.c
index 22e2265..a33969c 100644
--- a/fsck/dump.c
+++ b/fsck/
age
-read_node_page < here return -ENOENT
This patch walk around this cause.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/node.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 2654c91..ec7a0e0 100644
-
int
... ...
-alloc_nid <- nid reuse
-get_node_page
-f2fs_bug_on <- nid != node_footer->nid
It's need a rw_sem to avoid the race
Signed-off-by: Yunlei He <heyun...@huawei.co
modify for accurate fggc node io stat
Signed-off-by: Yunlei He <heyun...@huawei.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 f44d837..daa9086 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1259,7 +
update will lost. wb_writeback is same with
fsync.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/f2fs.h | 4 ++--
fs/f2fs/inode.c | 15 +++
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 82f1dc3..38f9324 100644
--
=13597698
..
Mount process will block in dead loop and fsck can do nothing with this
error, This patch abandon recovery if node chain is cyclical.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/recovery.c | 27 +++
1 file changed, 19 insertions
Uses the same naming scheme for struct nat_entry and f2fs_nat_entry
as in function __flush_nat_entry_set. No functional change.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/node.c | 128 -
1 file changed, 64 insertions(
=13597698
..
Mount process will block in dead loop and fsck can do nothing with this
error, This patch abandon recovery if node chain is cyclical.
Signed-off-by: Yunlei He <heyun...@huawei.com>
---
fs/f2fs/data.c | 5 +
fs/f2fs/recovery.c | 23 +++
2 files c
1 - 100 of 204 matches
Mail list logo