mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
f2fs: increase the limit for reserve_root
commit da35fe96d1
upstream.
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.
Cc: stable@vger.kernel.org
Reported-by: Aran Dalton <arda@allwinnertech.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0c8de0680b
commit
eb2a976d1f
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue