The original segment_info's show is a bit out-of-format:
[root@guz Demoes]# cat /proc/fs/f2fs/loop0/segment_info
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
..
0 0 0 0 0 0 0 0 0 0
0 0 1 0 0 1 [root@guz Demoes]#
so we fix it here for better legibility.
[root@guz Demoes]# cat
Previously, when we try to alloc free nid while the build free nid
is going, the allocer will be run into the flow that waiting for
"nm_i->build_lock", see following:
/* We should not use stale free nids created by build_free_nids */
> if (nm_i->fcnt && !on_build_free_nids(nm_i)) {
Previously, we ra_sum_pages to pre-read contiguous pages as more
as possible, and if we fail to alloc more pages, an ENOMEM error
will be reported upstream, even though we have alloced some pages
yet. In fact, we can use the available pages to do the job partly,
and continue the rest in the followi
Gu Zheng (5):
f2fs: update start nid once each circle
f2fs: remove the unused ctor argument of f2fs_kmem_cache_create()
f2fs: format segment_info's show for better legibility
f2fs: optimize restore_node_summary slightly
f2fs: add a wait queue to avoid unnecessary build_free_nid
fs/f2fs
Signed-off-by: Gu Zheng
---
fs/f2fs/node.c |6 +-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 8c14110..9653096 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1875,11 +1875,15 @@ void destroy_node_manager(struct f2fs_sb_info *
Signed-off-by: Gu Zheng
---
fs/f2fs/checkpoint.c |4 ++--
fs/f2fs/f2fs.h |4 ++--
fs/f2fs/gc.c |2 +-
fs/f2fs/node.c |4 ++--
fs/f2fs/recovery.c |2 +-
fs/f2fs/segment.c|2 +-
fs/f2fs/super.c |2 +-
7 files changed, 10 insertions(+), 10