Re: [f2fs-dev] [PATCH] f2fs:fix truncate_partial_nodes bug

2013-10-29 Thread shifei10.ge
-Original Message- From: Jaegeuk Kim [mailto:jaegeuk@samsung.com] Sent: Monday, October 28, 2013 6:22 PM To: shifei10...@samsung.com Cc: ??; linux-fsde...@vger.kernel.org; linux-ker...@vger.kernel.org; linux- f2fs-de...@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH] f2fs:fix

Re: [f2fs-dev] [PATCH] f2fs:fix truncate_partial_nodes bug

2013-10-29 Thread Jaegeuk Kim
Hi, 2013-10-29 (화), 15:32 +0800, shifei10.ge: Hi,I think we don't need to put the invalid page that get_node_page returned. So I add idx = i-- based on your version.Following is the patch: --- fs/f2fs/node.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff

Re: [f2fs-dev] [PATCH] f2fs:fix truncate_partial_nodes bug

2013-10-29 Thread shifei10.ge
-Original Message- From: Jaegeuk Kim [mailto:jaegeuk@samsung.com] Sent: Tuesday, October 29, 2013 3:43 PM To: shifei10.ge Cc: '??'; linux-fsde...@vger.kernel.org; linux-ker...@vger.kernel.org; linux- f2fs-de...@lists.sourceforge.net Subject: RE: [f2fs-dev] [PATCH] f2fs:fix

[f2fs-dev] [PATCH] f2fs:fix truncate_partial_nodes bug

2013-10-28 Thread Shifei Ge
truncate_partial_nodes puts pages incorrectly in two cases.note that the value for argc 'depth' can only be 2 or 3(see truncate_inode_blocks ---truncate_partial_nodes ). first case:err happened in the first 'for' loop assume depth is 2,when err happened,pages[0] is invalid,so this page