Re: [PATCH] f2fs: avoid f2fs_gc dead loop

2017-12-25 Thread Chao Yu
On 2017/12/25 17:56, Yunlong Song wrote: > In this case, f2fs_gc will skip all the victims and return with no dead loop. > The atomic file will > use SSR to OPU, it‘s OK. Nope, SSR trigger condition is limited, don't rely on it. Thanks, > > On 2017/12/25 17:45, Chao Yu wrote: >> On 2017/12/25

Re: [PATCH] f2fs: avoid f2fs_gc dead loop

2017-12-25 Thread Yunlong Song
In this case, f2fs_gc will skip all the victims and return with no dead loop. The atomic file will use SSR to OPU, it‘s OK. On 2017/12/25 17:45, Chao Yu wrote: On 2017/12/25 14:15, Yunlong Song wrote: What if the application starts atomic write but forgets to commit, e.g. bugs in application o

Re: [PATCH] f2fs: avoid f2fs_gc dead loop

2017-12-25 Thread Chao Yu
On 2017/12/25 14:15, Yunlong Song wrote: > What if the application starts atomic write but forgets to commit, e.g. > bugs in application or the application > is a malicious software itself? I agree we should consider robustness of f2fs in security aspect, but please consider more scenario of thes

Re: [PATCH] f2fs: avoid f2fs_gc dead loop

2017-12-24 Thread Yunlong Song
What if the application starts atomic write but forgets to commit, e.g. bugs in application or the application is a malicious software itself? On 2017/12/25 11:44, Chao Yu wrote: On 2017/12/23 21:09, Yunlong Song wrote: For some corner case, f2fs_gc selects one target victim but cannot free th

Re: [PATCH] f2fs: avoid f2fs_gc dead loop

2017-12-24 Thread Chao Yu
On 2017/12/23 21:09, Yunlong Song wrote: > For some corner case, f2fs_gc selects one target victim but cannot free > that victim segment due to some reason (e.g. the segment has some blocks > of atomic file which is not commited yet), in this case, the victim File should not be atomic opened for l

[PATCH] f2fs: avoid f2fs_gc dead loop

2017-12-23 Thread Yunlong Song
For some corner case, f2fs_gc selects one target victim but cannot free that victim segment due to some reason (e.g. the segment has some blocks of atomic file which is not commited yet), in this case, the victim segment may probably be selected over and over, and then f2fs_gc will go to dead loop.