Re: [f2fs-dev] [PATCH] fsck.f2fs: avoid fix ssa in some case

2016-01-29 Thread Jaegeuk Kim
Hi Yunlei, On Thu, Jan 28, 2016 at 04:18:16PM +0800, Yunlei He wrote: > In some case, we need confirm node or data blkaddr is ok at first, > and then fix the conflict in ssa block. If the node blkaddr happen to > locate in data type segment caused by something error, may be we 'd > better ignore

[f2fs-dev] [RFC PATCH 0/4] do more check in sanity_check_nid and clean up

2016-01-29 Thread Sheng Yong
PATCH 1/4 cleans up get_{sb|cp} and set_{sb|cp} to integrate them into get_val and set_val to avoid dumplicated definition of macro. PATCH 3/4 and 4/4 check nat_entry->ino. If it is wrong, we drop corresponding nodes. thanks, Sheng Sheng Yong (4): f2fs-tools: simplify get_{sb|cp} and

Re: [f2fs-dev] [RFC PATCH 1/4] f2fs-tools: simplify get_{sb|cp} and set_{sb|cp}

2016-01-29 Thread Jaegeuk Kim
Hi Sheng, This is not a good way. You're asking to change all the pending patches as well. Why not just adding two definitions like these? #define get_sb(member) get_val(sb, member) #define set_sb(member, val) set_sb(sb, member, val) #define get_cp(member) get_val(cp,

[f2fs-dev] [RFC PATCH 1/4] f2fs-tools: simplify get_{sb|cp} and set_{sb|cp}

2016-01-29 Thread Sheng Yong
* Remove dumplicated definitions of get_{sb|cp} and set_{sb|cp}, and introduce micros get_val and set_val instead. * Add a new parameter to get_val and set_val so that they are not depended on implied definition of `sb' and `cp'. Signed-off-by: Sheng Yong ---

[f2fs-dev] [RFC PATCH 3/4] fsck.f2fs: check ino of an used nat entry

2016-01-29 Thread Sheng Yong
If a nid is valid, the ino in its nat entry should record its parent nid. However if the ino is zero, we should drop the node. Signed-off-by: Sheng Yong Signed-off-by: Xue Liu --- fsck/fsck.c | 5 + 1 file changed, 5 insertions(+) diff

[f2fs-dev] [RFC PATCH 4/4] fsck.f2fs: check ino of an inode

2016-01-29 Thread Sheng Yong
If the node is an inode, its ino in the nat entry should be equal to the ino in its node footer. Otherwise, we drop the file. Signed-off-by: Sheng Yong Signed-off-by: Xue Liu --- fsck/fsck.c | 5 + 1 file changed, 5 insertions(+) diff --git

[f2fs-dev] [RFC PATCH 2/4] f2fs-tools: fix endianness of on-disk check_sum in summary_footer

2016-01-29 Thread Sheng Yong
Signed-off-by: Sheng Yong --- include/f2fs_fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h index 2ab9f49..1b02d16 100644 --- a/include/f2fs_fs.h +++ b/include/f2fs_fs.h @@ -677,7 +677,7 @@ struct f2fs_summary {

[f2fs-dev] [PATCH 3/3] f2fs: fix conflict on page->private usage

2016-01-29 Thread Jaegeuk Kim
This patch fixes confilct on page->private value between f2fs_trace_pid and atomic page. Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index ee44d34..cd7111b 100644

[f2fs-dev] [PATCH 1/3] f2fs: wait on page's writeback in writepages path

2016-01-29 Thread Jaegeuk Kim
Likewise f2fs_write_cache_pages, let's do for node and meta pages too. Especially, for node blocks, we should do this before marking its fsync and dentry flags. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 4 +++- fs/f2fs/node.c | 5 +++-- 2 files changed, 6

Re: [f2fs-dev] [PATCH] fsck.f2fs: avoid fix ssa in some case

2016-01-29 Thread He YunLei
On 2016/1/30 1:12, Jaegeuk Kim wrote: > Hi Yunlei, > > On Thu, Jan 28, 2016 at 04:18:16PM +0800, Yunlei He wrote: >> In some case, we need confirm node or data blkaddr is ok at first, >> and then fix the conflict in ssa block. If the node blkaddr happen to >> locate in data type segment caused by

Re: [f2fs-dev] [RFC PATCH 1/4] f2fs-tools: simplify get_{sb|cp} and set_{sb|cp}

2016-01-29 Thread Sheng Yong
Hi, Kim On 1/30/2016 9:46 AM, Jaegeuk Kim wrote: > Hi Sheng, > > This is not a good way. > You're asking to change all the pending patches as well. > > Why not just adding two definitions like these? > > #define get_sb(member)get_val(sb, member) > #define set_sb(member, val)

[f2fs-dev] [PATCH v2] fsck.f2fs: avoid fix ssa in some case

2016-01-29 Thread Yunlei He
In some case, we need confirm node or data blkaddr is ok at first, and then fix the conflict in ssa block. If the node blkaddr happen to locate in data type segment caused by something error, may be we 'd better ignore it, and it's same with data blkaddr. Signed-off-by: Yunlei He

[f2fs-dev] test

2016-01-29 Thread xiakaixu
test -- Regards Kaixu Xia -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take