-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Description
When testing bita for applying changes to a ext4 formatted I've came across the following error:
Error: Size of output device (1430 MiB (1499661312 bytes)) differ from size of archive target file (142 MiB (149934080 bytes))
full command output
root@uh-qemu-x86-64:~# bita clone --seed-output updatehub-image.ext4.bita /dev/vda3
Archive:
Built with version: 0.7.1
Archive size: 29 MiB (30866271 bytes)
Header checksum: 1635e9a121ca79f2cc1fb5e1bf23da9c8a64a5d95e146ba6299c900200d74f0cede30d88f6589abd34d9d07aef580a3d1041b3e722fc3ebc69a12421e03d0511
Chunking algorithm: RollSum
Rolling hash window size: 64 bytes
Chunk minimum size: 16 KiB (16384 bytes)
Chunk maximum size: 16 MiB (16777216 bytes)
Chunk average target size: 64 KiB (65536 bytes) (mask: 0b111111111111111)
Source:
Source checksum: cf895d5a02488c426a6a60dfda220f201a19bc1ba0c7eb4a5c8113319b21e81b2f0bc45923b5d3d21ebc288c03ed134fea5b76a2e42f9c5dc995177bef6e68b0
Chunks in source: 1463 (unique: 1455)
Average chunk size: 100 KiB (102909 bytes)
Source size: 142 MiB (149934080 bytes)
Cloning archive updatehub-image.ext4.bita to /dev/vda3...
Error: Size of output device (1430 MiB (1499661312 bytes)) differ from size of archive target file (142 MiB (149934080 bytes))
Which was caused by the following piece of code:
Lines 136 to 145 in e6d3a9e
| if output.is_block_dev() { | |
| let size = output.size().await?; | |
| if size != archive.total_source_size() { | |
| return Err(anyhow!( | |
| "Size of output device ({}) differ from size of archive target file ({})", | |
| size_to_str(size), | |
| size_to_str(archive.total_source_size()) | |
| )); | |
| } | |
| } |
I believe that error should only be raised in case that the partition is smaller than the archive. A bigger partition should not be an issue.
Commenting out that block of the code in order to test the clone as a hole did work for applying the desired changes, but indexing the partition took more time than I would expect. I think the hole output device is being processed in order to perform the clone. If that's the case, wouldn't it be possible (for cases such as this) to index only the chunks up to the archive total source size?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels