vrahane commented on PR #3168:
URL: https://github.com/apache/mynewt-core/pull/3168#issuecomment-2019204070
The purpose of logging number of entries in the entry itself is that we do
not have to walk all the entries to count the number of entries. For a large
number of log entries, walking logs serially to find the end counting number of
entries is little slow. So, this gives us a way to persist number of entries
and retrieve number of entries whenever needed without having to walk the log.
This change is supposed to be backwards compatible since the base header is
the same 15 bytes but somehow entries with log version 3 are not getting read
correctly. I am still figuring out why that is happening. We wanted to open a
PR with changes sooner than later and hence I thought the backwards
compatibility fix could be added later on in a follow on PR. It does not
require any format/log header changes as such.
The ifdefs can actually be removed to be similar to image hash. The only
reason I kept them is to save us some stack space and code space.
TLV would be a good idea but wouldn't that require too many changes to the
logging code ? I wanted to keep the change backwards compatible.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]