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

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

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)

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)

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)
}
}