Opened on 12/09/13 at 17:47:15
Closed on 04/21/14 at 15:08:51
#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: | cpukit → filesystem |
Owner: | changed from Joel Sherrill to Chris Johns |
comment:2 Changed on 04/21/14 at 15:08:51 by Gedare Bloom
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 Changed on 11/24/14 at 18:58:28 by Gedare Bloom
Version: | HEAD → 4.11 |
---|
Replace Version=HEAD with Version=4.11 for the tickets with Milestone >= 4.11
http://git.rtems.org/rtems/commit/?id=a9619f3cb6b181f781aaf1f77931b32d0137145f