Re: [Yaffs] qestion about yaffs_find_gc_block() in yaffs_gut…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: yaffs
CC: EzioZhang
Subject: Re: [Yaffs] qestion about yaffs_find_gc_block() in yaffs_guts.c
On Friday 30 December 2011 19:27:24 EzioZhang wrote:
> yaffs_find_gc_block is used to find a suitable block to gc,but the first
> “for” loop that finding a prioritised block may have error.
>
>
>
> for (i = dev->internal_start_block;
>
>       i <= dev->internal_end_block && !selected; i++) {

>
>
>
>      if (bi->gc_prioritise) {

>
>          prioritised_exist = 1;

>
>          if (bi->block_state == YAFFS_BLOCK_STATE_FULL &&

>
>              yaffs_block_ok_for_gc(dev, bi)) {

>
>              selected = i;

>
>              prioritised = 1;

>
>          }

>
>      }

>
>
>
> For dev->internal_start_block may start from 0


No. Internal start block cannot be zero it can be one or more.