mirror of
https://github.com/containerd/containerd.git
synced 2026-08-03 22:50:44 +00:00
use IsBlockCimWriteSupported for block CIM plugin init checks
Switch block CIM snapshotter and diff plugin init checks from IsBlockCimSupported() to IsBlockCimWriteSupported() to allow plugins to load when the CimWriter.dll is available, even on OS builds without native block CIM support. Signed-off-by: Maksim An <maksiman@microsoft.com>
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)
|
||||
|
||||
Reference in New Issue
Block a user