Re: [f2fs-dev] [PATCH] f2fs: remove race condition in releasing cblocks

2020-05-08 Thread Daeho Jeong
Oops, I will re-check it. Thanks, 2020년 5월 8일 (금) 오후 4:09, Chao Yu 님이 작성: > > On 2020/5/8 14:58, Daeho Jeong wrote: > > I moved checking i_compr_blocks phrase after calling inode_lock() > > already, because we should check this after writing pages. > > > > So, if it fails to check

Re: [f2fs-dev] [PATCH] f2fs: remove race condition in releasing cblocks

2020-05-08 Thread Chao Yu
On 2020/5/8 14:58, Daeho Jeong wrote: > I moved checking i_compr_blocks phrase after calling inode_lock() > already, because we should check this after writing pages. > > So, if it fails to check i_compr_blocks, we need to call inode_unlock(). > > Am I missing something? After applying this

Re: [f2fs-dev] [PATCH] f2fs: remove race condition in releasing cblocks

2020-05-08 Thread Daeho Jeong
I moved checking i_compr_blocks phrase after calling inode_lock() already, because we should check this after writing pages. So, if it fails to check i_compr_blocks, we need to call inode_unlock(). Am I missing something? 2020년 5월 8일 (금) 오후 3:50, Chao Yu 님이 작성: > > On 2020/5/8 12:25, Daeho

Re: [f2fs-dev] [PATCH] f2fs: remove race condition in releasing cblocks

2020-05-08 Thread Chao Yu
On 2020/5/8 12:25, Daeho Jeong wrote: > From: Daeho Jeong > > Now, if writing pages and releasing compress blocks occur > simultaneously, and releasing cblocks is executed more than one time > to a file, then total block count of filesystem and block count of the > file could be incorrect and

[PATCH] f2fs: remove race condition in releasing cblocks

2020-05-07 Thread Daeho Jeong
From: Daeho Jeong Now, if writing pages and releasing compress blocks occur simultaneously, and releasing cblocks is executed more than one time to a file, then total block count of filesystem and block count of the file could be incorrect and damaged. We have to execute releasing compress