From: jiangyiwen <jiangyiwen@huawei.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] About ocfs2 inode/extent meta file allocation problem
Date: Thu, 20 Dec 2018 10:56:26 +0800 [thread overview]
Message-ID: <5C1B04DA.4080104@huawei.com> (raw)
In-Reply-To: <5C19DB62020000F90004970B@prv1-mh.provo.novell.com>
On 2018/12/19 13:47, Gang He wrote:
> Hello Guys,
>
> When you read ocfs2 kernel code, you can find that ocfs2 uses inode_alloc:N / extent_alloc:N meta files to manage inode block/extent block allocation.
> The meta file per node will be increased via getting some blocks from global_bitmap meta file when the user create new files(inodes).
> But the meta files ( inode_alloc:N or extent_alloc:N) will not shrink back when these inode/extent blocks are deleted (e.g. these files are removed by the user).
> Then, if the user creates lots of files until the file system is full, next, the user deletes all the files.
> At this moment, the inode_alloc:N file is very big and occupy the whole file system, since this meta file can not shrink back.
> The user can not create a file with some data clusters, since the global_bitmap meta file has not more available cluster bits.
> I did not do this testing in my machine, but from the code logic, I feel my idea should be true.
> Do you have any ideas for this problem?
> My suggestion is,
> we should return some blocks to global_bitmap meta file from inode_alloc:N / extent_alloc:N meta files when there are enough free blocks.
>
> Thanks
> Gang
>
>
>
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/ocfs2-devel
>
>
Hi Gang,
I feel the problem what you described will be exist. When there
are a lot of small files in the ocfs2 volume, it will use plentiful
enough space as inode/extent allocs' group descriptors.
I agree your idea, in addition, I think we need to fix it use
two steps as follows:
- Online fix, start a delayed work to check inode/extent alloc if
exceeding a certain percentage, then return spaces to global_bitmap.
- Offline fix, to some extreme scenario, inode/extent alloc occupy
enough spaces but none of gd can be freed, metadata should be
moved in this case.
Thanks,
Yiwen.
next prev parent reply other threads:[~2018-12-20 2:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 5:47 [Ocfs2-devel] About ocfs2 inode/extent meta file allocation problem Gang He
2018-12-20 2:56 ` jiangyiwen [this message]
2018-12-20 3:25 ` Gang He
2018-12-20 6:41 ` jiangyiwen
2018-12-21 1:51 ` Gang He
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5C1B04DA.4080104@huawei.com \
--to=jiangyiwen@huawei.com \
--cc=ocfs2-devel@oss.oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.