From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH] f2fs: increase the limit for reserve_root
Date: Tue, 23 Aug 2022 19:26:50 -0700 [thread overview]
Message-ID: <YwWMavPwLhAcUklv@google.com> (raw)
In-Reply-To: <20220823172124.2285995-1-jaegeuk@kernel.org>
On 08/23, Jaegeuk Kim wrote:
> This patch increases the threshold that limits the reserved root space from 0.2%
> to 12.5% by using simple shift operation.
>
> Typically Android sets 128MB, but if the storage capacity is 32GB, 0.2% which is
> around 64MB becomes too small. Let's relax it.
>
Added:
Reported-by: Aran Dalton <arda@allwinnertech.com>
Thanks,
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
> fs/f2fs/super.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index 09972b709cdd..d1b4de5b4083 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -301,10 +301,10 @@ static void f2fs_destroy_casefold_cache(void) { }
>
> static inline void limit_reserve_root(struct f2fs_sb_info *sbi)
> {
> - block_t limit = min((sbi->user_block_count << 1) / 1000,
> + block_t limit = min((sbi->user_block_count >> 3),
> sbi->user_block_count - sbi->reserved_blocks);
>
> - /* limit is 0.2% */
> + /* limit is 12.5% */
> if (test_opt(sbi, RESERVE_ROOT) &&
> F2FS_OPTION(sbi).root_reserved_blocks > limit) {
> F2FS_OPTION(sbi).root_reserved_blocks = limit;
> --
> 2.37.1.595.g718a3a8f04-goog
next prev parent reply other threads:[~2022-08-24 2:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-23 17:21 [PATCH] f2fs: increase the limit for reserve_root Jaegeuk Kim
2022-08-24 2:26 ` Jaegeuk Kim [this message]
2022-09-13 3:15 ` [f2fs-dev] " Chao Yu
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=YwWMavPwLhAcUklv@google.com \
--to=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).