Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework merkle tree implementation to use io.Reader instead of byte array #1209

Merged
merged 4 commits into from
Nov 11, 2021

Conversation

anmaxvl
Copy link
Contributor

@anmaxvl anmaxvl commented Oct 27, 2021

MerkleTree implementation requires the entire content of ext4 file
system to be read into a byte array when computing cryptographic digest.

This PR reworks the existing implementation to work with io.Reader
interface instead.

Additionally update the existing usages of MerkleTree with the new
MerkleTreeWithReader implementation.

Signed-off-by: Maksim An maksiman@microsoft.com

@anmaxvl anmaxvl requested a review from a team as a code owner October 27, 2021 07:04
@anmaxvl
Copy link
Contributor Author

anmaxvl commented Oct 27, 2021

FYI @SeanTAllen

cmd/dmverity-vhd/main.go Outdated Show resolved Hide resolved
@dcantah dcantah self-assigned this Oct 27, 2021
@dcantah
Copy link
Contributor

dcantah commented Oct 27, 2021

Planning to look at this later today

ext4/tar2ext4/tar2ext4.go Outdated Show resolved Hide resolved
ext4/dmverity/dmverity.go Outdated Show resolved Hide resolved
ext4/dmverity/dmverity.go Outdated Show resolved Hide resolved
ext4/dmverity/dmverity.go Outdated Show resolved Hide resolved
ext4/tar2ext4/tar2ext4.go Outdated Show resolved Hide resolved
@anmaxvl
Copy link
Contributor Author

anmaxvl commented Nov 2, 2021

@dcantah up 😄, @microsoft/containerplat more eyes are welcome

@anmaxvl anmaxvl requested a review from a team November 2, 2021 23:27
@anmaxvl anmaxvl force-pushed the merkle-tree-with-io-reader branch 2 times, most recently from fe6df3b to 378b9d7 Compare November 5, 2021 00:05
ext4/dmverity/dmverity.go Outdated Show resolved Hide resolved
Copy link
Contributor

@msscotb msscotb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

MerkleTree implementation requires the entire content of ext4 file
system to be read into a byte array when computing cryptographic digest.

This PR reworks the existing implementation to work with io.Reader
interface instead.

Additionally update the existing usages of MerkleTree with the new
MerkleTreeWithReader implementation.

Signed-off-by: Maksim An <maksiman@microsoft.com>
Signed-off-by: Maksim An <maksiman@microsoft.com>
Separate tar to ext4 logic of Convert into a ConvertTarToExt4
function.

Signed-off-by: Maksim An <maksiman@microsoft.com>
Signed-off-by: Maksim An <maksiman@microsoft.com>
Copy link
Contributor

@dcantah dcantah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@anmaxvl anmaxvl merged commit ddab09b into microsoft:master Nov 11, 2021
@anmaxvl anmaxvl deleted the merkle-tree-with-io-reader branch November 11, 2021 23:55
@SeanTAllen
Copy link
Contributor

awesome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants