Enable the use of original device block size
This commit is contained in:
parent
540062c80d
commit
a5038eb957
3 changed files with 38 additions and 4 deletions
|
|
@ -264,8 +264,14 @@ func getDevicePassthroughConfig(val string) (*vm.PassthroughConfig, error) {
|
|||
return nil, errors.Wrapf(err, "check whether device path is valid '%v'", devPath)
|
||||
}
|
||||
|
||||
blockSize, err := osspecifics.GetDeviceLogicalBlockSize(devPath)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "get logical block size for device '%v'", devPath)
|
||||
}
|
||||
|
||||
return &vm.PassthroughConfig{Block: []vm.BlockDevicePassthroughConfig{{
|
||||
Path: devPath,
|
||||
Path: devPath,
|
||||
BlockSize: blockSize,
|
||||
}}}, nil
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown device passthrough type '%v'", val)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue