Merge pull request #13469 from anmaxvl/blockcim-pull-fix

blockcim config and plugin initialization changes
This commit is contained in:
Samuel Karp authored and GitHub committed 2026-07-14 18:06:28 +00:00
commit 4a5b0733f5
3 files changed
+6 -6

No files matched your search

+2 -2
View File
@@ -72,8 +72,8 @@ func init() {
plugins.MetadataPlugin,
},
InitFn: func(ic *plugin.InitContext) (any, error) {
if !cimfs.IsBlockCimSupported() {
return nil, fmt.Errorf("host OS version doesn't support block CIMs: %w", plugin.ErrSkipPlugin)
if !cimfs.IsBlockCimWriteSupported() {
return nil, fmt.Errorf("host OS doesn't support writable block CIMs: %w", plugin.ErrSkipPlugin)
}
md, err := ic.GetSingle(plugins.MetadataPlugin)
+2 -2
View File
@@ -96,8 +96,8 @@ func init() {
}
func NewBlockCIMSnapshotter(root string, config *BlockCIMSnapshotterConfig) (snapshots.Snapshotter, error) {
if !cimfs.IsBlockCimSupported() {
return nil, fmt.Errorf("host windows version doesn't support block CIMs: %w", plugin.ErrSkipPlugin)
if !cimfs.IsBlockCimWriteSupported() {
return nil, fmt.Errorf("host OS doesn't support writable block CIMs: %w", plugin.ErrSkipPlugin)
}
baseSn, err := newBaseSnapshotter(root)
+2 -2
View File
@@ -83,7 +83,7 @@ func WithSize(size uint64) scratchCreationOpt {
// defaultScratchCreationOptions returns the default options for scratch VHD creation
func defaultScratchCreationOptions() *scratchCreationOptions {
return &scratchCreationOptions{
ntfsFormat: true,
ntfsFormat: false,
sizeInBytes: defaultScratchVHDSizeInBytes,
}
}
@@ -420,7 +420,7 @@ func createDifferencingScratchVHDs(ctx context.Context, path string) (err error)
}()
if !baseVHDExists {
if err = createScratchVHD(ctx, baseVHDPath); err != nil {
if err = createScratchVHD(ctx, baseVHDPath, WithNTFSFormat()); err != nil {
return fmt.Errorf("failed to create base vhd: %w", err)
}
}