Closed gabriel-samfira closed 1 year ago
Cross-tagging from https://github.com/microsoft/go-winio/pull/187#issuecomment-1419296718: I suggest that once this lands, hcsshim be updated to use this for wclayer mount
and wclayer unmount
replacing the Volume Mount Point APIs that #187 was deduplicating, and hence allowing #187 to be sunset as "No current users": The lowest-maintenance-cost code is the code never committed. ^_^
I realise the current layout of this repo is... adventurous... but should this API be somewhere under pkg/
rather than in the root?
I realise the current layout of this repo is... adventurous... but should this API be somewhere under
pkg/
rather than in the root?
I am extremely malleable in regard to this. Any suggestions or preferences are fine with me.
I added some tests. It would be nice to add some tests with volume mount points, but I am not sure if pulling in computestorage
dependencies (I think it requires additional windows features?) in order to format a VHD and make it mountable, is desirable.
Thinking more about my earlier thought regarding hcsshim, I just remembered that there's already code in hcsshim that uses Bind Filter (and a syscall wrapper for the one call they use), so converting that to use this API would be a good validation of the API, including questions about generalisation.
Thinking more about my earlier thought regarding hcsshim, I just remembered that there's already code in hcsshim that uses Bind Filter (and a syscall wrapper for the one call they use), so converting that to use this API would be a good validation of the API, including questions about generalisation.
Yup. It's in use in hcsshim. I think we can replace some things in hcsshim with this, but the BfGetMappings
seems to only be available in ltsc2022. The tests seem to fail on 2019. Initially, this will be used in containerd
to allow us to add support for buildkitd
. Come to think of it, we may need to put the containerd
windows snapshotter behind a feature flag or a check that the OS version is supported. We'll circle back to that later, though.
Come to think of it, we may need to put the
containerd
windows snapshotter behind a feature flag or a check that the OS version is supported. We'll circle back to that later, though.
There is no way to list mappings on ltsc2019. We can however blindly try to remove a mapping and ignore the error if it's The parameter is incorrect
. That way we can support this starting with RS5.
This change adds the ability to mount a a single folder or a volume inside another folder, using the bind filter API.
While the API allows mounting multiple sources inside a single mount point, acting as an overlay, we disable this functionality in the
ApplyFileBinding()
function. We could add anotherflags
parameter to this function to allow using any of the existing flags, making it more generic. Let me know if this is preferred.Tests will be added shortly.
Signed-off-by: Gabriel Adrian Samfira gsamfira@cloudbasesolutions.com