#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 Dec 9, 2013 at 5:48:28 PM 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 Dec 9, 2013 at 6:26:10 PM by Gedare Bloom

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

comment:4 Changed on Nov 24, 2014 at 6:58:28 PM 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.