TauLabs/TauLabs — pull request #717 by solidgoldbomb (2013-07-06 23:56:33+00:00)
Title: Minimal fix for flash slowness

Computing the partition's extents within the chip's address space is
a relatively expensive operation and it was being done on every read
and write operation.

This per read/write cost slowed the initialization of the board
sufficiently that it was causing watchdog expiry leaving boards in
a reboot loop as the cost of traversing the logfs increased due to
an increase in the number of dirty file slots.

This has an unfortunate side-effect of requiring that all boards
express both the sector numbers as well as the byte offsets of the
start and end of each partition. Since these values must agree,
they are still compared at runtime as a final precaution against
typos.