#2164 closed defect (fixed)

RFS file system : error in rtems_rfs_bitmap_create_search in rtems-rfs-bitmaps.c

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

In rtems_rfs_bitmap_create_search, the main loop has a "one off" bug that ends up propagating an error through the bitmap search.

This caused RFS to not find blocks in a file system that had non-standard block sizes.

At the end of the function, the following clause:

if (bit == rtems_rfs_bitmap_element_bits ())

{

bit = 0;
search_map++;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;

}
else

bit++;

Should be:

if (bit == (rtems_rfs_bitmap_element_bits () - 1))

{

bit = 0;
search_map++;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;

}
else

bit++;

I will submit a patch with this fix.

Change History (3)

comment:1 Changed on 12/09/13 at 18:26:24 by Gedare Bloom

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

comment:3 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.