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

Add HCS storage APIs #881

Merged
merged 1 commit into from
Nov 6, 2020
Merged

Add HCS storage APIs #881

merged 1 commit into from
Nov 6, 2020

Conversation

dcantah
Copy link
Contributor

@dcantah dcantah commented Oct 6, 2020

  • Add bindings for the HCS storage APIs from computestorage.dll

Signed-off-by: Daniel Canter [email protected]

@dcantah dcantah requested a review from a team as a code owner October 6, 2020 16:34
@katiewasnothere
Copy link
Contributor

Can you add information on what this is used for and how the bindings will be used in the future?

@dcantah
Copy link
Contributor Author

dcantah commented Oct 6, 2020

@katiewasnothere Yep. Truth be told I opened the PR and went on an errand 😃

@dcantah
Copy link
Contributor Author

dcantah commented Oct 6, 2020

For the immediate future these bindings will be used to create a cache of scratch layers of different sizes to be used if a user asks for a scratch layer of a different size than the default that is made by the graph driver APIs (20GB). If the size requested is not in the cache, we will make a new scratch layer of that size using these binds as well.

For the future, we may move containerd off of the old graphdriver (wclayer) calls and onto these for the windows snapshotter. No scenarios come to mind, but it gives more freedom in how layers are managed and especially how the writable layers are handled.

@dcantah dcantah force-pushed the hcs-storage branch 2 times, most recently from 14e87c6 to 29760c7 Compare October 28, 2020 22:54
@ambarve
Copy link
Contributor

ambarve commented Nov 4, 2020

One small suggestion but LGTM otherwise!

Copy link
Contributor

@ambarve ambarve left a comment

Choose a reason for hiding this comment

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

LGTM

@kevpar
Copy link
Member

kevpar commented Nov 6, 2020

Are these not in internal so that the snapshotter can use them?

@dcantah
Copy link
Contributor Author

dcantah commented Nov 6, 2020

Are these not in internal so that the snapshotter can use them?

Correct

computestorage/attach.go Outdated Show resolved Hide resolved
* Add bindings for the HCS storage APIs from computestorage.dll

Signed-off-by: Daniel Canter <[email protected]>
Copy link
Member

@kevpar kevpar left a comment

Choose a reason for hiding this comment

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

LGTM

@dcantah dcantah merged commit 1432f9c into microsoft:master Nov 6, 2020
dcantah added a commit to dcantah/go-winio that referenced this pull request Nov 10, 2020
This change adds bindings for AttachVirtualDisk and GetVirtualDiskPhysicalPath, some helper functions including
one to create a differencing vhd, exports the create and open parameters, exports the create flags and adds a couple
of missing flags. This will be used mainly to go hand in hand with the new computestorage calls added to hcsshim as all of the
vhd creation and setup needs to be done manually for these calls. microsoft/hcsshim#881.

Signed-off-by: Daniel Canter <[email protected]>
dcantah added a commit to dcantah/go-winio that referenced this pull request Nov 20, 2020
This change adds bindings for AttachVirtualDisk and GetVirtualDiskPhysicalPath, some helper functions including
one to create a differencing vhd, exports the create and open parameters, exports the create flags and adds a couple
of missing flags. This will be used mainly to go hand in hand with the new computestorage calls added to hcsshim as all of the
vhd creation and setup needs to be done manually for these calls. microsoft/hcsshim#881.

Signed-off-by: Daniel Canter <[email protected]>
//
// `layerPath` is a path to a directory containing the layer.
//
// `vhdHandle` is an empty file handle of `options.Type == OsLayerTypeContainer`
Copy link
Contributor

Choose a reason for hiding this comment

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

"empty file handle if" I think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct :)

dcantah added a commit to dcantah/go-winio that referenced this pull request Nov 25, 2020
This change adds bindings for AttachVirtualDisk and GetVirtualDiskPhysicalPath, some helper functions including
one to create a differencing vhd, exports the create and open parameters, exports the create flags and adds a couple
of missing flags. This will be used mainly to go hand in hand with the new computestorage calls added to hcsshim as all of the
vhd creation and setup needs to be done manually for these calls. microsoft/hcsshim#881.

Signed-off-by: Daniel Canter <[email protected]>
dcantah added a commit to dcantah/go-winio that referenced this pull request Nov 25, 2020
This change adds bindings for AttachVirtualDisk and GetVirtualDiskPhysicalPath, some helper functions including
one to create a differencing vhd, exports the create and open parameters, exports the create flags and adds a couple
of missing flags. This will be used mainly to go hand in hand with the new computestorage calls added to hcsshim as all of the
vhd creation and setup needs to be done manually for these calls. microsoft/hcsshim#881.

Signed-off-by: Daniel Canter <[email protected]>
TBBle referenced this pull request in nbdd0121/wsld Nov 30, 2020
dcantah added a commit to dcantah/go-winio that referenced this pull request Nov 30, 2020
This change adds bindings for AttachVirtualDisk and GetVirtualDiskPhysicalPath, some helper functions including
one to create a differencing vhd, exports the create and open parameters, exports the create flags and adds a couple
of missing flags. This will be used mainly to go hand in hand with the new computestorage calls added to hcsshim as all of the
vhd creation and setup needs to be done manually for these calls. microsoft/hcsshim#881.

Signed-off-by: Daniel Canter <[email protected]>
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.

5 participants