Changeset e60b7b1 in rtems


Ignore:
Timestamp:
Dec 18, 2013, 4:39:19 PM (5 years ago)
Author:
Alan Cudmore <alan.cudmore@…>
Branches:
4.11, master
Children:
9b48dc6
Parents:
540a635
git-author:
Alan Cudmore <alan.cudmore@…> (12/18/13 16:39:19)
git-committer:
Chris Johns <chrisj@…> (12/19/13 00:03:27)
Message:

For PR 2163 - RFS File System - fix group search algorithm bug

This is for the RFS file system. There is a bug in the group search
algorithm where it will skip groups, causing blocks to remain
unallocated. This is dependant on the size of the blocks and number
of blocks in a group, so it does not always show up. The fix corrects
the skipping of groups during the search, allowing all of the blocks
to be found.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libfs/src/rfs/rtems-rfs-group.c

    r540a635 re60b7b1  
    233233    }
    234234
     235    /*
     236     * If we are still looking back and forth around the
     237     * group_start, then alternate the direction and
     238     * increment the offset on every other iteration.
     239     * Otherwise we are marching through the groups, so just
     240     * increment the offset.
     241     */
    235242    if (updown)
     243    {
    236244      direction = direction > 0 ? -1 : 1;
    237 
    238     offset++;
     245      if ( direction == -1 )
     246        offset++;
     247    }
     248    else
     249    {
     250       offset++;
     251    }
     252
    239253  }
    240254
Note: See TracChangeset for help on using the changeset viewer.