[f2fs-dev] [f2fs-dev 1/1] f2fs-tools: add inline data check

2013-10-25 Thread Huajun Li
From: Huajun Li Add inline data check Signed-off-by: Weihong Xu Signed-off-by: Huajun Li Signed-off-by: Haicheng Li --- fsck/fsck.c |4 include/f2fs_fs.h |5 + 2 files changed, 9 insertions(+) diff --git a/fsck/fsck.c b/fsck/fsck.c index cdf68ab..7e263ed 100644 --- a/

[f2fs-dev] [f2fs-dev 5/5] f2fs: Handle inline data operations

2013-10-25 Thread Huajun Li
From: Huajun Li Hook inline data read/write, truncate, fallocate, setattr, etc. Files need meet following 2 requirement to inline: 1) file size is not greater than MAX_INLINE_DATA; 2) file doesn't pre-allocate data blocks by fallocate(). FI_INLINE_DATA will not be set while creating a new reg

[f2fs-dev] [f2fs-dev 4/5] f2fs: Key functions to handle inline data

2013-10-25 Thread Huajun Li
From: Huajun Li Functions to implement inline data read/write, and move inline data to normal data block when file size exceeds inline data limitation. Signed-off-by: Huajun Li Signed-off-by: Haicheng Li Signed-off-by: Weihong Xu --- fs/f2fs/Makefile |2 +- fs/f2fs/f2fs.h |7 +++ f

[f2fs-dev] [f2fs-dev 3/5] f2fs: Add a new function: f2fs_reserve_block()

2013-10-25 Thread Huajun Li
From: Huajun Li Add the function f2fs_reserve_block() to easily reserve new blocks. Signed-off-by: Huajun Li Signed-off-by: Haicheng Li Signed-off-by: Weihong Xu --- fs/f2fs/data.c | 29 ++--- fs/f2fs/f2fs.h |1 + 2 files changed, 19 insertions(+), 11 deletions(

[f2fs-dev] [f2fs-dev 1/5] f2fs: Add flags and helpers to support inline data

2013-10-25 Thread Huajun Li
From: Huajun Li Add new inode flags F2FS_INLINE_DATA and FI_INLINE_DATA to indicate whether the inode has inline data. Inline data makes use of inode block's data indices region to save small file. Currently there are 923 data indices in an inode block. Since inline xattr has made use of the las

[f2fs-dev] [f2fs-dev 0/5] f2fs: Enable f2fs support inline data

2013-10-25 Thread Huajun Li
From: Huajun Li f2fs inode is so large, so small files can be stored directly in the inode, rather than just storing a single block address and storing the data elsewhere. This patch set makes files less than ~3.4K store directly in inode block. a) space saving Test with kernel src(without re

[f2fs-dev] [f2fs-dev 2/5] f2fs: Add a new mount option: inline_data

2013-10-25 Thread Huajun Li
From: Huajun Li Add a mount option: inline_data. If the mount option is set, data of New created small files can be stored in their inode. Signed-off-by: Huajun Li Signed-off-by: Haicheng Li Signed-off-by: Weihong Xu --- fs/f2fs/super.c |8 +++- 1 file changed, 7 insertions(+), 1 del