]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ocfs2: give ocfs2 the ability to reclaim suballocator free bg
authorHeming Zhao <heming.zhao@suse.com>
Fri, 12 Dec 2025 07:45:03 +0000 (15:45 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 21 Jan 2026 03:44:16 +0000 (19:44 -0800)
commit4a54331616b309934d46e255a9f1fdd890e77ebe
treea51c7c15db2d0f47931a1fdcc2804f555f6f82a7
parentb11052be3ea7c1dfc81804b203bc4369edafd040
ocfs2: give ocfs2 the ability to reclaim suballocator free bg

Patch series "ocfs2: give ocfs2 the ability to reclaim suballocator free
bg", v6.

This patch (of 2):

The current ocfs2 code can't reclaim suballocator block group space.  In
some cases, this causes ocfs2 to hold onto a lot of space.  For example,
when creating lots of small files, the space is held/managed by the
'//inode_alloc'.  After the user deletes all the small files, the space
never returns to the '//global_bitmap'.  This issue prevents ocfs2 from
providing the needed space even when there is enough free space in a small
ocfs2 volume.

This patch gives ocfs2 the ability to reclaim suballocator free space when
the block group is freed.  For performance reasons, this patch keeps the
first suballocator block group active.

Link: https://lkml.kernel.org/r/20251212074505.25962-2-heming.zhao@suse.com
Signed-off-by: Heming Zhao <heming.zhao@suse.com>
Reviewed-by: Su Yue <glass.su@suse.com>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Jun Piao <piaojun@huawei.com>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Mark Fasheh <mark@fasheh.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ocfs2/suballoc.c