Hi Jaegeuk,

On 2017/12/20 7:57, Jaegeuk Kim wrote:
> On 12/18, Yunlei He wrote:
>> Use free segments if free segments is enough
> 
> It doesn't matter with large section?
> 
I couldn't find any special constraint with the large section
    after I read GC and SSR selection flow... :(
And since now f2fs has aggressive SSR, different types of node
or different types of data will be mixed in a segment...

I have turned to Yun Lei and Yong for help, but we still cannot
get any conclusion on it.

Could you give me some hints on the large section?

Thanks again

>>
>> Signed-off-by: Yunlei He <[email protected]>
>> ---
>>   fsck/mount.c | 21 ++++++---------------
>>   1 file changed, 6 insertions(+), 15 deletions(-)
>>
>> diff --git a/fsck/mount.c b/fsck/mount.c
>> index 678eeae..3e25165 100644
>> --- a/fsck/mount.c
>> +++ b/fsck/mount.c
>> @@ -1890,23 +1890,14 @@ int find_next_free_block(struct f2fs_sb_info *sbi, 
>> u64 *to, int left, int type)
>>                      continue;
>>              }
>>   
>> -            if (se->valid_blocks == 0 && not_enough) {
>> -                    *to = left ? START_BLOCK(sbi, segno) - 1:
>> +            if (se->valid_blocks == 0) {
>> +                    if (not_enough) {
>> +                            *to = left ? START_BLOCK(sbi, segno) - 1:
>>                                              START_BLOCK(sbi, segno + 1);
>> -                    continue;
>> -            }
>> -
>> -            if (se->valid_blocks == 0 && !(segno % sbi->segs_per_sec)) {
>> -                    struct seg_entry *se2;
>> -                    unsigned int i;
>> -
>> -                    for (i = 1; i < sbi->segs_per_sec; i++) {
>> -                            se2 = get_seg_entry(sbi, segno + i);
>> -                            if (se2->valid_blocks)
>> -                                    break;
>> -                    }
>> -                    if (i == sbi->segs_per_sec)
>> +                            continue;
>> +                    } else {
>>                              return 0;
>> +                    }
>>              }
>>   
>>              if (se->type == type &&
>> -- 
>> 1.9.1
> 
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Linux-f2fs-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
> 
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to