Skip to content

FATFileSystem might call BlockDevice::init() multiple times when storage device is failing. #12621

@SeppoTakalo

Description

@SeppoTakalo

Description of defect

FATFileSystem might call init() multiple times, when device is failing. This causes internal reference counters to be incremented, which in turn causes deinit() to skip the deinitialization, because it looks like there are multiple users of the class.
This has been verified on at least SDBlockDevice when card is removed on a mounted filesystem.

See: https://forums.mbed.com/t/detrmining-mounting-status-of-sdblockdevice/7575/3

LittleFileSystem is not affected with the same behaviour.

Target(s) affected by this defect ?

All devices using FATFileSystem on SDBlockDevice

Toolchain(s) (name and version) displaying this defect ?

any

What version of Mbed-os are you using (tag or sha) ?

5.15 and master.

What version(s) of tools are you using. List all that apply (E.g. mbed-cli)

any

How is this defect reproduced ?

See https://forums.mbed.com/t/detrmining-mounting-status-of-sdblockdevice/7575/3 for example code listing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions