#2362 closed defect (wontfix)

ramdisk_initialize() returns an error code and driver initialization error code is ignored in general

Reported by: mw Owned by: Chris Johns
Priority: normal Milestone: 4.11.3
Component: lib/block Version: 4.11
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

If CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS is set too large, the initialization of the block device buffer can fail without any notice, causing problems downstream that are seemingly unrelated (such as trying to read from the device) and with misleading error codes.

Tested on pc386 BSP

Ran testsuites/samples/fileio/fileio.exe fine, initializing partition /dev/hda with result = 0

Modified testsuites/samples/fileio/system.h, setting CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS to 32 (rather than 2).

Re-ran, and initializing partition /dev/hda fails with result = 3 (Invalid Name).

Change History (6)

comment:1 Changed on Jun 9, 2015 at 3:49:59 PM by Gedare Bloom

Milestone: 4.11.1
Owner: set to Chris Johns
Status: newassigned

comment:2 Changed on Jun 9, 2015 at 7:38:43 PM by Sebastian Huber

Summary: Configuration/initialization of block device buffer fails silentlyramdisk_initialize() returns an error code and driver initialization error code is ignored in general

The rtems_bdbuf_init() doesn't fail silently. It returns an error code. We even have a test case for this libtests/block17.

The real problem is that ramdisk_initialize() returns an error code which nobody evaluates. This is a device driver API flaw.

comment:3 Changed on Jan 26, 2017 at 7:16:00 AM by Sebastian Huber

Milestone: 4.11.14.11.2

comment:4 Changed on Mar 23, 2017 at 1:03:28 AM by Chris Johns

Milestone: 4.11.24.11.3

The 4.11.2 milestone is closing.

comment:5 Changed on Feb 5, 2018 at 5:50:27 AM by Chris Johns

Resolution: wontfix
Status: assignedclosed

comment:6 Changed on Feb 12, 2018 at 3:56:35 AM by Chris Johns

Component: unspecifiedlib/block
Note: See TracTickets for help on using tickets.