mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
f2fs: add a new limit for reserve root
The reserved root blocks is not enough for booting Android due to the limit of 0.2% if the fs size too small. so we add a new mini- mum limit is 128MB. Change-Id: I5af3b182001d27e4d18b4090c5270bbb2ac6253b Signed-off-by: Cliff Chen <cliff.chen@rock-chips.com>
This commit is contained in:
@@ -69,6 +69,8 @@ extern const char *f2fs_fault_name[FAULT_MAX];
|
||||
#define IS_FAULT_SET(fi, type) ((fi)->inject_type & (1 << (type)))
|
||||
#endif
|
||||
|
||||
#define MIN_ROOT_RESERVED_BLOCKS (128 * 1024 * 1024)
|
||||
|
||||
/*
|
||||
* For mount options
|
||||
*/
|
||||
|
||||
@@ -280,7 +280,8 @@ static inline void limit_reserve_root(struct f2fs_sb_info *sbi)
|
||||
|
||||
/* limit is 0.2% */
|
||||
if (test_opt(sbi, RESERVE_ROOT) &&
|
||||
F2FS_OPTION(sbi).root_reserved_blocks > limit) {
|
||||
F2FS_OPTION(sbi).root_reserved_blocks > limit &&
|
||||
F2FS_OPTION(sbi).root_reserved_blocks > MIN_ROOT_RESERVED_BLOCKS) {
|
||||
F2FS_OPTION(sbi).root_reserved_blocks = limit;
|
||||
f2fs_info(sbi, "Reduce reserved blocks for root = %u",
|
||||
F2FS_OPTION(sbi).root_reserved_blocks);
|
||||
|
||||
Reference in New Issue
Block a user