@@ -22,6 +22,7 @@ import (
2222
2323const (
2424 type9pFs = "9p"
25+ typeVirtioFS = "virtio_fs"
2526 typeTmpFs = "tmpfs"
2627 devPrefix = "/dev/"
2728 timeoutHotplug = 3
@@ -98,7 +99,7 @@ func mount(source, destination, fsType string, flags int, options string) error
9899
99100 var err error
100101 switch fsType {
101- case type9pFs :
102+ case type9pFs , typeVirtioFS :
102103 if err = createDestinationDir (destination ); err != nil {
103104 return err
104105 }
@@ -191,6 +192,7 @@ type storageHandler func(storage pb.Storage, s *sandbox) (string, error)
191192// storageHandlerList lists the supported drivers.
192193var storageHandlerList = map [string ]storageHandler {
193194 driver9pType : virtio9pStorageHandler ,
195+ driverVirtioFSType : virtioFSStorageHandler ,
194196 driverBlkType : virtioBlkStorageHandler ,
195197 driverMmioBlkType : virtioMmioBlkStorageHandler ,
196198 driverSCSIType : virtioSCSIStorageHandler ,
@@ -223,6 +225,11 @@ func virtioMmioBlkStorageHandler(storage pb.Storage, s *sandbox) (string, error)
223225 return commonStorageHandler (storage )
224226}
225227
228+ // virtioFSStorageHandler handles the storage for virtio-fs.
229+ func virtioFSStorageHandler (storage pb.Storage , s * sandbox ) (string , error ) {
230+ return commonStorageHandler (storage )
231+ }
232+
226233// virtioBlkStorageHandler handles the storage for blk driver.
227234func virtioBlkStorageHandler (storage pb.Storage , s * sandbox ) (string , error ) {
228235 // Get the device node path based on the PCI address provided
0 commit comments