- Move error messages to stderr
- Fix the transaction_id and data_block_size in test fixture,
and check the data_block_size in thin_restore.
- Disable the missing_something tests for Rust. The transaction_id
and nr_data_blocks now could be recovered automatically.
- Limit the use of override options in test cases. Only broken
superblocks could be overridden, and the provided values
should be compatible to the original metadata.
- Remove unused option
- Move error messages to stderr (fixes unwritable_output_file,
input_file_not_found, and missing_input_option)
- Validate XML structures implicitly (fixes corrupted_input_data)
- Check output file size (fixes tiny_output_file)
- Allow restoring XML without the hints (for creating test fixtures)
- Provide XML error context
- Remove unused option
While rebuilding a superblock, the transaction_id, data_block_size, and
nr_data_blocks could be inherited from the current superblock if available
(assumed it's a multiple-activated copy, so supposed partially valid),
or derived from the probed data mappings and device details, that saves
the hassle of manual input.
Note that either the current superblock or user-overrides must be compatible
with the probed values, thus the filters are applied.
A pre-built node could be under populated (less than half-full) due to
following reasons:
- A single shared leaf generated by dm-thin key removal. The residency
could drop below 50%, until it reaches the merge threshold (33% or 44%,
depends on its context).
- A shared root, which could have any possible nr_entries.
- Underfull shared nodes (less than 33% residency) caused by kernel issues.
To avoid producing under populated nodes, those kinds of pre-built nodes,
except the roots, will be merged into their siblings.
The ref counts now are handled in a straightforward method:
The pre-built subtrees serve as snapshots of potentially shared nodes.
They hold an initial ref count on the pre-built nodes and their children.
The temporary ref counts are later dropped at the end of device building.
This way fixes the ref counts of unshifted nodes, thus the 'reserve'
operation introduced by commit 6d16c58 is reverted.
- Do not use shared internals as Defs
- Build Defs with common leaf sequences only, that could forms
more common Defs between partially shared subtrees.