Skip to content

Commit b9f1697

Browse files
committed
overlay: allow unknown backing fs with mountProgram
if a mountProgram is specified, let it deal with an unknown backing file system instead of failing early. The error is kept when we use native overlay. Closes: #1511 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
1 parent cfffdac commit b9f1697

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/overlay/overlay.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,10 @@ func Init(home string, options graphdriver.Options) (graphdriver.Driver, error)
315315
}
316316
fsName, ok := graphdriver.FsNames[fsMagic]
317317
if !ok {
318-
return nil, fmt.Errorf("filesystem type %#x reported for %s is not supported with 'overlay': %w", fsMagic, filepath.Dir(home), graphdriver.ErrIncompatibleFS)
318+
if opts.mountProgram == "" {
319+
return nil, fmt.Errorf("filesystem type %#x reported for %s is not supported with 'overlay': %w", fsMagic, filepath.Dir(home), graphdriver.ErrIncompatibleFS)
320+
}
321+
fsName = "<unknown>"
319322
}
320323
backingFs = fsName
321324

0 commit comments

Comments
 (0)