mirror of
https://github.com/containerd/containerd.git
synced 2026-08-09 01:21:15 +00:00
Merge pull request #13469 from anmaxvl/blockcim-pull-fix
blockcim config and plugin initialization changes
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user