Skip to content

Add blurb about the MBR and other utility block devices #80

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

Merged
merged 2 commits into from
Jun 12, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/APIs/storage/block_device.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ Block devices indicate their block sizes through the `get_read_size`, `get_progr

As a rule of thumb, you can use the erase size for applications that use a single block size (for example, the FAT file system).

## Utility block devices

mbed OS contains several utility block devices to give you better control over how storage is allocated.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest changing "how storage is allocated" to "the allocation of storage" to eliminate the passive voice.


- The [slicing block device](https://github.com/ARMmbed/mbed-os/blob/master/features/filesystem/bd/SlicingBlockDevice.h) allows you to partition storage into smaller block devices that you can use independentally.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, we try to avoid "allows". What do you think about changing this bullets to "With the slicing block, you can partition storage..."? Does that still keep the meaning the same?

Please apply this change to the following two bullets, too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me

- The [chaining block device](https://github.com/ARMmbed/mbed-os/blob/master/features/filesystem/bd/ChainingBlockDevice.h) allows you to chain multiple block devices together and extend the usable amount of storage.
- The [MBR block device](https://github.com/ARMmbed/mbed-os/blob/master/features/filesystem/bd/MBRBlockDevice.h) allows you to partition storage with a [Master Boot Record](https://en.wikipedia.org/wiki/Master_boot_record). The MBR allows the partitions to be configured seperately from outside the application.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Please use "Master Boot Record (MBR)" for first use and "MBR" for other uses.
  • Please use a source other than wikipedia if possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, so:

With the Master Boot Record (MBR) block device, you can partition storage with a master boot record. The MBR allows the partitions to be configured seperately from outside the application.

Seems a bit weird since the acronym is a part of the name.

How about something like this?

mbed OS comes with support for storing partitions on disk with a Master Boot Record (MBR). The MBR block device provides this functionality and supports creating partitions at runtime or using preformatted partitions configured seperately from outside the application.

Also I'm not really aware of a better source than wikipedia for the MBR. The MBR came about as an ad hoc portability layer between competing companies, so there never was a governing standard published by any authority. The MBR design has been mostly reverse engineered and I think wikipedia has the best collection of info. I'm open for a different source, but I don't think we can beat the wikipedia article in terms of being up to date.

There is the os-dev wiki entry on MBRs, but it's also a wiki (and is more focused on the linux point of view):
http://wiki.osdev.org/MBR_(x86)


## Example block devices

- [SDBlockDevice](https://github.com/armmbed/sd-driver) - Block device for SD cards.
Expand Down