Re: [PATCH] f2fs: check segment type before recover data

2018-01-03 Thread Chao Yu
On 2018/1/2 19:02, Yunlong Song wrote: > > > On 2018/1/2 14:49, Chao Yu wrote: >> On 2017/12/30 15:42, Yunlong Song wrote: >>> In some case, the node blocks has wrong blkaddr whose segment type is >> You mean *data block* has wrong blkaddr whose segment type is NODE? > Yes. >> >>> NODE, e.g.,

Re: [PATCH] f2fs: check segment type before recover data

2018-01-03 Thread Chao Yu
On 2018/1/2 19:02, Yunlong Song wrote: > > > On 2018/1/2 14:49, Chao Yu wrote: >> On 2017/12/30 15:42, Yunlong Song wrote: >>> In some case, the node blocks has wrong blkaddr whose segment type is >> You mean *data block* has wrong blkaddr whose segment type is NODE? > Yes. >> >>> NODE, e.g.,

Re: [PATCH] f2fs: check segment type before recover data

2018-01-03 Thread Jaegeuk Kim
On 12/30, Yunlong Song wrote: > In some case, the node blocks has wrong blkaddr whose segment type is > NODE, e.g., recover inode has missing xattr flag and the blkaddr is in > the xattr range. Since fsck.f2fs does not check the recovery nodes, this > will cause __f2fs_replace_block change the

Re: [PATCH] f2fs: check segment type before recover data

2018-01-03 Thread Jaegeuk Kim
On 12/30, Yunlong Song wrote: > In some case, the node blocks has wrong blkaddr whose segment type is > NODE, e.g., recover inode has missing xattr flag and the blkaddr is in > the xattr range. Since fsck.f2fs does not check the recovery nodes, this > will cause __f2fs_replace_block change the

Re: [PATCH] f2fs: check segment type before recover data

2018-01-02 Thread Yunlong Song
On 2018/1/2 14:49, Chao Yu wrote: On 2017/12/30 15:42, Yunlong Song wrote: In some case, the node blocks has wrong blkaddr whose segment type is You mean *data block* has wrong blkaddr whose segment type is NODE? Yes. NODE, e.g., recover inode has missing xattr flag and the blkaddr is in

Re: [PATCH] f2fs: check segment type before recover data

2018-01-02 Thread Yunlong Song
On 2018/1/2 14:49, Chao Yu wrote: On 2017/12/30 15:42, Yunlong Song wrote: In some case, the node blocks has wrong blkaddr whose segment type is You mean *data block* has wrong blkaddr whose segment type is NODE? Yes. NODE, e.g., recover inode has missing xattr flag and the blkaddr is in

Re: [PATCH] f2fs: check segment type before recover data

2018-01-01 Thread Chao Yu
On 2017/12/30 15:42, Yunlong Song wrote: > In some case, the node blocks has wrong blkaddr whose segment type is You mean *data block* has wrong blkaddr whose segment type is NODE? > NODE, e.g., recover inode has missing xattr flag and the blkaddr is in > the xattr range. Since fsck.f2fs does

Re: [PATCH] f2fs: check segment type before recover data

2018-01-01 Thread Chao Yu
On 2017/12/30 15:42, Yunlong Song wrote: > In some case, the node blocks has wrong blkaddr whose segment type is You mean *data block* has wrong blkaddr whose segment type is NODE? > NODE, e.g., recover inode has missing xattr flag and the blkaddr is in > the xattr range. Since fsck.f2fs does

[PATCH] f2fs: check segment type before recover data

2017-12-29 Thread Yunlong Song
In some case, the node blocks has wrong blkaddr whose segment type is NODE, e.g., recover inode has missing xattr flag and the blkaddr is in the xattr range. Since fsck.f2fs does not check the recovery nodes, this will cause __f2fs_replace_block change the curseg of node and do the

[PATCH] f2fs: check segment type before recover data

2017-12-29 Thread Yunlong Song
In some case, the node blocks has wrong blkaddr whose segment type is NODE, e.g., recover inode has missing xattr flag and the blkaddr is in the xattr range. Since fsck.f2fs does not check the recovery nodes, this will cause __f2fs_replace_block change the curseg of node and do the