diff options
author | Chao Yu | 2017-07-19 00:19:05 +0800 |
---|---|---|
committer | Jaegeuk Kim | 2017-07-31 16:48:29 -0700 |
commit | f247037120ecd3dcbbc196b51ded8b57edf4904f (patch) | |
tree | 9c255f95da7eadb42d67a0c0e7563e5d8916dbb0 /fs/f2fs/super.c | |
parent | e65ef20781cbfcbfe2d62ce37e028964bc34b313 (diff) |
f2fs: make max inline size changeable
This patch tries to make below macros calculating max inline size,
inline dentry field size considerring reserving size-changeable
space:
- MAX_INLINE_DATA
- NR_INLINE_DENTRY
- INLINE_DENTRY_BITMAP_SIZE
- INLINE_RESERVED_SIZE
Then, when inline_{data,dentry} options is enabled, it allows us to
reserve inline space with different size flexibly for adding newly
introduced inode attribute.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r-- | fs/f2fs/super.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 32e4c025e97e..2d236384f938 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -446,6 +446,9 @@ static struct inode *f2fs_alloc_inode(struct super_block *sb) #endif /* Will be used by directory only */ fi->i_dir_level = F2FS_SB(sb)->dir_level; + + fi->i_inline_reserved = DEF_INLINE_RESERVED_SIZE; + return &fi->vfs_inode; } |