diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2017-03-24 17:52:48 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-03-31 18:43:53 +0200 |
commit | a081eb840ed12eff6256a5497771a8c3168fc95b (patch) | |
tree | f868e990afbdcb0ac19548eb028dbd5b6581dcf8 | |
parent | 95e2e0e487a083a4c9bf13a1918120fbc2a9cd2b (diff) | |
download | barebox-a081eb840ed12eff6256a5497771a8c3168fc95b.tar.gz barebox-a081eb840ed12eff6256a5497771a8c3168fc95b.tar.xz |
state: backend bucket circular: Explain metadata
Explain why we have metadata and where it is used.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | common/state/backend_bucket_circular.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/state/backend_bucket_circular.c b/common/state/backend_bucket_circular.c index 5a525f68e1..d99ba39126 100644 --- a/common/state/backend_bucket_circular.c +++ b/common/state/backend_bucket_circular.c @@ -61,6 +61,11 @@ struct state_backend_storage_bucket_circular { struct device_d *dev; }; +/* + * The metadata will be written directly before writesize aligned offsets. + * When searching backwards through the pages it allows us to find the + * beginning of the data. + */ struct __attribute__((__packed__)) state_backend_storage_bucket_circular_meta { uint32_t magic; uint32_t written_length; |