Changeset 08b9d534 in rtems


Ignore:
Timestamp:
Mar 30, 2012, 9:00:37 AM (8 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
1fec9e0
Parents:
ac50df2
git-author:
Sebastian Huber <sebastian.huber@…> (03/30/12 09:00:37)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/16/12 09:06:45)
Message:

libblock: PR2040: Fix recycle destination update

Check the availablity of a recycle destination segment only when it is
necessary to avoid missing resycle source segment erasures.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libblock/src/flashdisk.c

    rac50df2 r08b9d534  
    12621262  for (spage = 0; spage < ssc->pages; spage++)
    12631263  {
    1264     uint32_t               dst_pages;
    12651264    rtems_fdisk_page_desc* spd = &ssc->page_descriptors[spage];
     1265
     1266    if (!dsc && ssc->pages_active > 0)
     1267    {
     1268      rtems_fdisk_error ("recycle: no available dst segment");
     1269      return EIO;
     1270    }
    12661271
    12671272    if (rtems_fdisk_page_desc_flags_set (spd, RTEMS_FDISK_PAGE_ACTIVE) &&
    12681273        !rtems_fdisk_page_desc_flags_set (spd, RTEMS_FDISK_PAGE_USED))
    12691274    {
     1275      uint32_t               dst_pages;
    12701276      rtems_fdisk_page_desc* dpd;
    12711277      uint32_t               dpage;
     
    13531359      dst_pages = rtems_fdisk_seg_pages_available (dsc);
    13541360      if (dst_pages == 0)
    1355       {
    13561361        dsc = rtems_fdisk_seg_most_available (&fd->available);
    1357         if (!dsc)
    1358         {
    1359           rtems_fdisk_error ("recycle: no available dst segment");
    1360           return EIO;
    1361         }
    1362       }
    13631362
    13641363      (*pages)--;
Note: See TracChangeset for help on using the changeset viewer.