summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/data.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2017-07-19 00:19:05 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2017-07-31 16:48:29 -0700
commitf247037120ecd3dcbbc196b51ded8b57edf4904f (patch)
tree9c255f95da7eadb42d67a0c0e7563e5d8916dbb0 /fs/f2fs/data.c
parente65ef20781cbfcbfe2d62ce37e028964bc34b313 (diff)
downloadblackbird-obmc-linux-f247037120ecd3dcbbc196b51ded8b57edf4904f.tar.gz
blackbird-obmc-linux-f247037120ecd3dcbbc196b51ded8b57edf4904f.zip
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/data.c')
-rw-r--r--fs/f2fs/data.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 87c1f4150c64..ca978c32ae00 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -813,7 +813,7 @@ int f2fs_preallocate_blocks(struct kiocb *iocb, struct iov_iter *from)
F2FS_GET_BLOCK_PRE_AIO :
F2FS_GET_BLOCK_PRE_DIO);
}
- if (iocb->ki_pos + iov_iter_count(from) > MAX_INLINE_DATA) {
+ if (iocb->ki_pos + iov_iter_count(from) > MAX_INLINE_DATA(inode)) {
err = f2fs_convert_inline_inode(inode);
if (err)
return err;
@@ -1857,7 +1857,7 @@ restart:
set_new_dnode(&dn, inode, ipage, ipage, 0);
if (f2fs_has_inline_data(inode)) {
- if (pos + len <= MAX_INLINE_DATA) {
+ if (pos + len <= MAX_INLINE_DATA(inode)) {
read_inline_data(page, ipage);
set_inode_flag(inode, FI_DATA_EXIST);
if (inode->i_nlink)
OpenPOWER on IntegriCloud