aboutsummaryrefslogtreecommitdiff
path: root/fs/f2fs/inline.c
AgeCommit message (Collapse)AuthorFilesLines
2014-01-06f2fs: handle errors correctly during f2fs_reserve_blockJaegeuk Kim1-4/+2
The get_dnode_of_data nullifies inode and node page when error is occurred. There are two cases that passes inode page into get_dnode_of_data(). 1. make_empty_dir() -> get_new_data_page() -> f2fs_reserve_block(ipage) -> get_dnode_of_data() 2. f2fs_convert_inline_data() -> __f2fs_convert_inline_data() -> f2fs_reserve_block(ipage) -> get_dnode_of_data() This patch adds correct error handling codes when get_dnode_of_data() returns an error. At first, f2fs_reserve_block() calls f2fs_put_dnode() whenever reserve_new_block returns an error. So, the rule of f2fs_reserve_block() is to nullify inode page when there is any error internally. Finally, two callers of f2fs_reserve_block() should call f2fs_put_dnode() appropriately if they got an error since successful f2fs_reserve_block(). Signed-off-by: Jaegeuk Kim <[email protected]>
2014-01-06f2fs: add inline_data recovery routineJaegeuk Kim1-0/+48
This patch adds a inline_data recovery routine with the following policy. [prev.] [next] of inline_data flag o o -> recover inline_data o x -> remove inline_data, and then recover data blocks x o -> remove inline_data, and then recover inline_data x x -> recover data blocks Signed-off-by: Jaegeuk Kim <[email protected]>
2014-01-06f2fs: add the number of inline_data files to status infoJaegeuk Kim1-5/+2
This patch adds the number of inline_data files into the status information. Note that the number is reset whenever the filesystem is newly mounted. Signed-off-by: Jaegeuk Kim <[email protected]>
2014-01-06f2fs: refactor f2fs_convert_inline_dataJaegeuk Kim1-14/+12
Change log from v1: o handle NULL pointer of grab_cache_page_write_begin() pointed by Chao Yu. This patch refactors f2fs_convert_inline_data to check a couple of conditions internally for deciding whether it needs to convert inline_data or not. So, the new f2fs_convert_inline_data initially checks: 1) f2fs_has_inline_data(), and 2) the data size to be changed. If the inode has inline_data but the size to fill is less than MAX_INLINE_DATA, then we don't need to convert the inline_data with data allocation. Signed-off-by: Jaegeuk Kim <[email protected]>
2013-12-26f2fs: key functions to handle inline dataHuajun Li1-0/+176
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 <[email protected]> Signed-off-by: Haicheng Li <[email protected]> Signed-off-by: Weihong Xu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>