Skip to content

storage: Add util classes for composing block devices #3569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from

Conversation

geky
Copy link
Contributor

@geky geky commented Jan 12, 2017

  • ChainingBlockDevice
    • Supports chaining multiple block devices together with a
      sequential address space. Useful for combining multiple
      memory devices together to expand storage capacity.
  • SlicingBlockDevice
    • Supports mapping a slice of a block device to a new block
      device. Useful for repurposing regions of a block device
      for less aware algorithms.
  • ClusteringBlockDevice
    • Supports clustering small blocks into larger blocks.
      Useful for matching the required block size of less aware
      algorithms.
  • DividingBlockDevice
    • Supports dividing large blocks into smaller blocks.
      Uses internal buffer to hold large blocks.

Not sure if these should be included in mbed OS or provided in an external library, but I did find them quite useful for adding flexibility to the block devices.

dependent on #3449, #3564
relevant commit range 882d9d4...geky:bd-util
cc @simonqhughes, @c1728p9, @theotherjimmy

geky added 9 commits January 10, 2017 15:18
Adopted in the SDBlockDevice and MemBlockDevice taken from mbed 2
Enables persistant storage between de/reinitialization cycles
Relatively unmodified, except for the addition of support for
interchangeable block devices
options:
MemBlockDevice - Same as mbed 2 class, but ambiguous
RAMBlockDevice - May be ambiguous with BD on unmanaged RAM
HeapBlockDevice - Seems the most reasonable name
- Changed name to I2CEepromBlockDevice
- Renamed functions
- Reduced handling of block borders
- Reduced trust of I2C::write array function, may have issues
- Conformed to mbed style guide where necessary
ChainingBlockDevice
    - Supports chaining multiple block devices together with a
      sequential address space. Useful for combining multiple
      memory devices together to expand storage capacity.
SlicingBlockDevice
    - Supports mapping a slice of a block device to a new block
      device. Useful for repurposing regions of a block device
      for less aware algorithms.
ClusteringBlockDevice
    - Supports clustering small blocks into larger blocks.
      Useful for matching the required block size of less aware
      algorithms.
DividingBlockDevice
    - Supports dividing large blocks into smaller blocks.
      Uses internal buffer to hold large blocks.
@geky
Copy link
Contributor Author

geky commented Jan 31, 2017

Merged/continued over here #3671

Chaining/Slicing is still around, but clustering/dividing have been integrated implicitly into the core block device interface.

@geky geky closed this Jan 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant