#3689 assigned enhancement

bdbuf: Replace automatic read-ahead with rtems_bdbuf_peek()

Reported by: Sebastian Huber Owned by: Sebastian Huber
Priority: normal Milestone: 6.1
Component: lib/block Version: 5
Severity: normal Keywords:
Cc: Blocked By:


The block device cache (bdbuf) tries to deduce a read ahead opportunity from the read access pattern. Using real world FAT file systems showed that this is not very reliable and the read ahead seldom happens. One way to fix this issue is let file systems give a hint to the block device cache that they will likely read a certain block in the future, e.g. the next block in a sequential file read. Remove the existing read ahead logic and add a new function rtems_bdbuf_peek() instead.

Attachments (1)

0001-FIXME-bdbuf-Add-rtems_bdbuf_peek.patch (5.2 KB) - added by Sebastian Huber on Feb 11, 2019 at 10:49:48 AM.
Prototoype implementation.

Download all attachments as: .zip

Change History (5)

Changed on Feb 11, 2019 at 10:49:48 AM by Sebastian Huber

Prototoype implementation.

comment:1 Changed on Feb 11, 2019 at 11:03:03 AM by Chris Johns

Why is the status returned from the peek in fat_file_read not checked?

comment:2 Changed on Feb 11, 2019 at 11:04:30 AM by Sebastian Huber

The data is not used yet. It is just a hint, maybe we should remove a return code from rtems_bdbuf_peek().

comment:3 Changed on Feb 11, 2019 at 11:09:51 AM by Chris Johns

I would not remove the return code, it may be used in another file system.

comment:4 Changed on Dec 19, 2019 at 8:07:34 AM by Sebastian Huber

Milestone: 5.16.1
Note: See TracTickets for help on using tickets.