Re: [PATCH] f2fs: fix small discards when se->valid_blocks is zero

2017-01-04 Thread Yunlong Song
Hi Kim, I am afraid your fix still has some problems when the section/segment != 1, when the segment has zero valid blocks but the section does not, the blocks of that deleted file can still not notify the FTL by the small discards in your fix. And even in the case section/segment == 1, the

Re: [PATCH] f2fs: fix small discards when se->valid_blocks is zero

2017-01-04 Thread Yunlong Song
Hi Kim, I am afraid your fix still has some problems when the section/segment != 1, when the segment has zero valid blocks but the section does not, the blocks of that deleted file can still not notify the FTL by the small discards in your fix. And even in the case section/segment == 1, the

Re: [PATCH] f2fs: fix small discards when se->valid_blocks is zero

2017-01-04 Thread Jaegeuk Kim
On 01/04, Yunlong Song wrote: > Hi Kim, > Although the blocks of that file will finally be discarded when it is not > current segment any more and almost fully invalidate, > but the point is that the blocks of that file can only be discarded along > with the whole segment now, which violates

Re: [PATCH] f2fs: fix small discards when se->valid_blocks is zero

2017-01-04 Thread Jaegeuk Kim
On 01/04, Yunlong Song wrote: > Hi Kim, > Although the blocks of that file will finally be discarded when it is not > current segment any more and almost fully invalidate, > but the point is that the blocks of that file can only be discarded along > with the whole segment now, which violates

Re: [PATCH] f2fs: fix small discards when se->valid_blocks is zero

2017-01-03 Thread Yunlong Song
Hi Kim, Although the blocks of that file will finally be discarded when it is not current segment any more and almost fully invalidate, but the point is that the blocks of that file can only be discarded along with the whole segment now, which violates the meaning of small discard. Look at

Re: [PATCH] f2fs: fix small discards when se->valid_blocks is zero

2017-01-03 Thread Yunlong Song
Hi Kim, Although the blocks of that file will finally be discarded when it is not current segment any more and almost fully invalidate, but the point is that the blocks of that file can only be discarded along with the whole segment now, which violates the meaning of small discard. Look at

Re: [PATCH] f2fs: fix small discards when se->valid_blocks is zero

2017-01-03 Thread Jaegeuk Kim
Hi Yunlong, On 01/03, Yunlong Song wrote: > In the small discard case, when se->valid_blocks is zero, the > add_discard_addrs > will directly return without __add_discard_entry. This will cause the file > delete have no small discard. The case is like this: > > 1. Allocate free 2M segment > 2.

Re: [PATCH] f2fs: fix small discards when se->valid_blocks is zero

2017-01-03 Thread Jaegeuk Kim
Hi Yunlong, On 01/03, Yunlong Song wrote: > In the small discard case, when se->valid_blocks is zero, the > add_discard_addrs > will directly return without __add_discard_entry. This will cause the file > delete have no small discard. The case is like this: > > 1. Allocate free 2M segment > 2.

Re: [PATCH] f2fs: fix small discards when se->valid_blocks is zero

2017-01-03 Thread Chao Yu
On 2017/1/3 17:01, Yunlong Song wrote: > In the small discard case, when se->valid_blocks is zero, the > add_discard_addrs > will directly return without __add_discard_entry. This will cause the file > delete have no small discard. The case is like this: > > 1. Allocate free 2M segment > 2.

Re: [PATCH] f2fs: fix small discards when se->valid_blocks is zero

2017-01-03 Thread Chao Yu
On 2017/1/3 17:01, Yunlong Song wrote: > In the small discard case, when se->valid_blocks is zero, the > add_discard_addrs > will directly return without __add_discard_entry. This will cause the file > delete have no small discard. The case is like this: > > 1. Allocate free 2M segment > 2.

[PATCH] f2fs: fix small discards when se->valid_blocks is zero

2017-01-03 Thread Yunlong Song
In the small discard case, when se->valid_blocks is zero, the add_discard_addrs will directly return without __add_discard_entry. This will cause the file delete have no small discard. The case is like this: 1. Allocate free 2M segment 2. Write a file (size n blocks < 512) in that 2M segment,

[PATCH] f2fs: fix small discards when se->valid_blocks is zero

2017-01-03 Thread Yunlong Song
In the small discard case, when se->valid_blocks is zero, the add_discard_addrs will directly return without __add_discard_entry. This will cause the file delete have no small discard. The case is like this: 1. Allocate free 2M segment 2. Write a file (size n blocks < 512) in that 2M segment,