[f2fs-dev] [PATCH] f2fs: slightly reorganize read_raw_super_block

2016-02-16 Thread Shawn Lin
consistent with what it actually does. Also, the origin code use two tags to round the err cases, which isn't so readable. So this patch amend the comment and slightly reorganize it. Signed-off-by: Shawn Lin --- fs/f2fs/super.c | 73 -

[f2fs-dev] [PATCH] f2fs: move sanity checking of cp into get_valid_checkpoint

2016-02-16 Thread Shawn Lin
procedure if failing the sanity checking. Signed-off-by: Shawn Lin --- fs/f2fs/checkpoint.c | 4 fs/f2fs/f2fs.h | 1 + fs/f2fs/super.c | 10 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 536bec9..c374cc1 10

[f2fs-dev] [PATCH] f2fs: add new wraper function for reading inline data

2016-02-18 Thread Shawn Lin
This patch add __read_inline_data which will no check PageUptodate and page->index. This can be reused by f2fs_convert_inline_page to reduce the redundant code copied from read_inline_data. Signed-off-by: Shawn Lin --- fs/f2fs/inline.c | 26 -- 1 file changed,

Re: [f2fs-dev] [PATCH] f2fs: add new wraper function for reading inline data

2016-02-18 Thread Shawn Lin
On 2016/2/19 15:35, Chao Yu wrote: > Hi Shawn, > >> -Original Message----- >> From: Shawn Lin [mailto:shawn@rock-chips.com] >> Sent: Friday, February 19, 2016 10:50 AM >> To: Jaegeuk Kim; Changman Lee >> Cc: Chao Yu; linux-f2fs-devel@lists.sourceforge.n

[f2fs-dev] [PATCH v2] f2fs: reuse read_inline_data for f2fs_convert_inline_page

2016-02-19 Thread Shawn Lin
f2fs_convert_inline_page introduce what read_inline_data already does for copying out the inline data from inode_page. We can use read_inline_data instead to simplify the code. Signed-off-by: Shawn Lin --- Changes in v2: - rework the commit msg to fit the changes - further simplify the code

Re: [f2fs-dev] [PATCH] f2fs: avoid hungtask problem caused by losing wake_up

2016-02-23 Thread Shawn Lin
On 2016/2/23 15:02, He YunLei wrote: > On 2016/2/23 13:44, Chao Yu wrote: >> Hi Yunlei, > Hi Chao, >> >>> -Original Message- >>> From: Yunlei He [mailto:heyun...@huawei.com] >>> Sent: Tuesday, February 23, 2016 12:08 PM >>> To: chao2...@samsung.com; jaeg...@kernel.org; >>> linux-f2fs-devel

[f2fs-dev] [PATCH 1/2] f2fs: check inline flag ahead for f2fs_read_inline_data

2016-03-10 Thread Shawn Lin
No matter inline data flag is set or not, get_node_page is going work now. But actually we can avoid it by puting the check of inline data flag in advance to save this cpu cycle. Signed-off-by: Shawn Lin --- fs/f2fs/inline.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff

[f2fs-dev] [PATCH 2/2] f2fs: remove redundant checking of inline data flag

2016-03-10 Thread Shawn Lin
Remove the f2fs_has_inline_data for f2fs_read_data_page, and let f2fs_read_inline_data take over gatekeeper of checking inline data flag. Signed-off-by: Shawn Lin --- fs/f2fs/data.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index

[f2fs-dev] [PATCH 1/2] f2fs: check inline flag ahead for f2fs_write_inline_data

2016-03-10 Thread Shawn Lin
No matter inline data flag is set or not, current code is going to new a dnode. But actually we can avoid it by puting the check of inline data flag in advance to save this cpu cycle. Signed-off-by: Shawn Lin --- fs/f2fs/inline.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions

[f2fs-dev] [PATCH 2/2] f2fs: remove checing inline data flag for f2fs_write_data_page

2016-03-10 Thread Shawn Lin
Remove the f2fs_has_inline_data for f2fs_write_data_page, and let f2fs_write_inline_data take over gatekeeper of checking inline data flag. Signed-off-by: Shawn Lin --- fs/f2fs/data.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index

[f2fs-dev] [PATCH 0/8] some cleanup of inline flag checking

2016-03-10 Thread Shawn Lin
This patchset is going to remove some redunant checking of inline data flag and also going to avoid some unnecessary cpu waste when doing inline stuff. Note: Sorry for sending previous four patches in separate, let drop them and make them in this thread for better review. Shawn Lin (8

[f2fs-dev] [PATCH 1/8] f2fs: check inline flag ahead for f2fs_write_inline_data

2016-03-10 Thread Shawn Lin
No matter inline data flag is set or not, current code is going to new a dnode. But actually we can avoid it by puting the check of inline data flag in advance to save this cpu cycle. Signed-off-by: Shawn Lin --- fs/f2fs/inline.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions

[f2fs-dev] [PATCH 7/8] f2fs: remove unnecessary inline checking for f2fs_convert_inline_inode

2016-03-10 Thread Shawn Lin
If failing to check inline data flag for f2fs_convert_inline_inode, it will return 0. So we don't need to check it twice before we are going to do f2fs_convert_inline_page. Signed-off-by: Shawn Lin --- fs/f2fs/inline.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[f2fs-dev] [PATCH 5/8] f2fs: f2fs: check inline flag ahead for f2fs_inline_data_fiemap

2016-03-10 Thread Shawn Lin
No matter inline data flag is set or not, get_node_page is going work now. But actually we can avoid it by puting the check of inline data flag in advance to save this cpu cycle. Signed-off-by: Shawn Lin --- fs/f2fs/inline.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff

[f2fs-dev] [PATCH 2/8] f2fs: remove checing inline data flag for f2fs_write_data_page

2016-03-10 Thread Shawn Lin
Remove the f2fs_has_inline_data for f2fs_write_data_page, and let f2fs_write_inline_data take over gatekeeper of checking inline data flag. Signed-off-by: Shawn Lin --- fs/f2fs/data.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index

[f2fs-dev] [PATCH 6/8] f2fs: remove checing inline data flag for f2fs_fiemap

2016-03-10 Thread Shawn Lin
Remove the f2fs_has_inline_data for f2fs_fiemap, and let f2fs_inline_data_fiemap take over gatekeeper of checking inline data flag. Signed-off-by: Shawn Lin --- fs/f2fs/data.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index

[f2fs-dev] [PATCH 3/8] f2fs: check inline flag ahead for f2fs_read_inline_data

2016-03-10 Thread Shawn Lin
No matter inline data flag is set or not, get_node_page is going work now. But actually we can avoid it by puting the check of inline data flag in advance to save this cpu cycle. Signed-off-by: Shawn Lin --- fs/f2fs/inline.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff

[f2fs-dev] [PATCH 8/8] f2fs: check inline flag ahead for get_dnode_of_data

2016-03-10 Thread Shawn Lin
Check inline data flag ahead, so we can save some cpu cycle. Signed-off-by: Shawn Lin --- fs/f2fs/node.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 771166d..69467bd 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c

[f2fs-dev] [PATCH 4/8] f2fs: remove redundant checking of inline data flag

2016-03-10 Thread Shawn Lin
Remove the f2fs_has_inline_data for f2fs_read_data_page, and let f2fs_read_inline_data take over gatekeeper of checking inline data flag. Signed-off-by: Shawn Lin --- fs/f2fs/data.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index

Re: [f2fs-dev] [PATCH 0/8] some cleanup of inline flag checking

2016-03-10 Thread Shawn Lin
Hi Chao Yu, On 2016/3/11 13:29, Chao Yu wrote: > Hi Shawn, > >> -Original Message----- >> From: Shawn Lin [mailto:shawn@rock-chips.com] >> Sent: Friday, March 11, 2016 11:28 AM >> To: Jaegeuk Kim >> Cc: Shawn Lin; linux-ker...@vger.kernel.org; >&