#2163 closed defect (fixed)

RFS file system : error in rtems_rfs_group_bitmap_alloc group search algorithm

Reported by: Alan Cudmore Owned by: Chris Johns
Priority: normal Milestone: 4.11
Component: fs Version: 4.11
Severity: normal Keywords:
Cc: gedare@… Blocked By:
Blocking:

Description

There is a bug in the rtems_rfs_group_bitmap_alloc function in rtems-rfs-group.c

The file system will start at a target group to search for free blocks, then alternatively search "above" and "below" that group until it finds a block. If the end of the groups are reached, it will do a linear search through the blocks.

The algorithm that searches "above" and "below" the groups will increment the group offset each time it switches direction, causing some groups to be skipped. If the group offset is incremented on every other direction switch, then the groups will be searched without being skipped.

This caused a problem in an application where there was a non-standard block size, which caused the search to skip available blocks.

I have a working patch for this, which I will submit.

Change History (4)

comment:1 Changed on 12/09/13 at 17:48:28 by Alan Cudmore

Summary: RFS file system : error in rtems_refs_group_bitmap_alloc group search algorithmRFS file system : error in rtems_rfs_group_bitmap_alloc group search algorithm

comment:2 Changed on 12/09/13 at 18:26:10 by Gedare Bloom

Cc: Gedare Bloom added
Component: cpukitfilesystem
Owner: changed from Joel Sherrill to Chris Johns

comment:4 Changed on 11/24/14 at 18:58:28 by Gedare Bloom

Version: HEAD4.11

Replace Version=HEAD with Version=4.11 for the tickets with Milestone >= 4.11

Note: See TracTickets for help on using tickets.