mirror of
https://github.com/containers/podman.git
synced 2025-12-11 09:18:34 +08:00
Bump github.com/containers/storage from 1.20.2 to 1.21.0
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.20.2 to 1.21.0. - [Release notes](https://github.com/containers/storage/releases) - [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md) - [Commits](https://github.com/containers/storage/compare/v1.20.2...v1.21.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
committed by
Daniel J Walsh
parent
d9cd0032f7
commit
e7085599f5
18
vendor/github.com/containers/storage/drivers/devmapper/device_setup.go
generated
vendored
18
vendor/github.com/containers/storage/drivers/devmapper/device_setup.go
generated
vendored
@@ -23,6 +23,7 @@ type directLVMConfig struct {
|
||||
ThinpMetaPercent uint64
|
||||
AutoExtendPercent uint64
|
||||
AutoExtendThreshold uint64
|
||||
MetaDataSize string
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -121,15 +122,19 @@ func checkDevHasFS(dev string) error {
|
||||
}
|
||||
|
||||
func verifyBlockDevice(dev string, force bool) error {
|
||||
realPath, err := filepath.Abs(dev)
|
||||
absPath, err := filepath.Abs(dev)
|
||||
if err != nil {
|
||||
return errors.Errorf("unable to get absolute path for %s: %s", dev, err)
|
||||
}
|
||||
if realPath, err = filepath.EvalSymlinks(realPath); err != nil {
|
||||
realPath, err := filepath.EvalSymlinks(absPath)
|
||||
if err != nil {
|
||||
return errors.Errorf("failed to canonicalise path for %s: %s", dev, err)
|
||||
}
|
||||
if err := checkDevAvailable(realPath); err != nil {
|
||||
return err
|
||||
if err := checkDevAvailable(absPath); err != nil {
|
||||
logrus.Infof("block device '%s' not available, checking '%s'", absPath, realPath)
|
||||
if err := checkDevAvailable(realPath); err != nil {
|
||||
return errors.Errorf("neither '%s' nor '%s' are in the output of lvmdiskscan, can't use device.", absPath, realPath)
|
||||
}
|
||||
}
|
||||
if err := checkDevInVG(realPath); err != nil {
|
||||
return err
|
||||
@@ -205,8 +210,11 @@ func setupDirectLVM(cfg directLVMConfig) error {
|
||||
if cfg.ThinpMetaPercent == 0 {
|
||||
cfg.ThinpMetaPercent = 1
|
||||
}
|
||||
if cfg.MetaDataSize == "" {
|
||||
cfg.MetaDataSize = "128k"
|
||||
}
|
||||
|
||||
out, err := exec.Command("pvcreate", "-f", cfg.Device).CombinedOutput()
|
||||
out, err := exec.Command("pvcreate", "--metadatasize", cfg.MetaDataSize, "-f", cfg.Device).CombinedOutput()
|
||||
if err != nil {
|
||||
return errors.Wrap(err, string(out))
|
||||
}
|
||||
|
||||
5
vendor/github.com/containers/storage/drivers/devmapper/deviceset.go
generated
vendored
5
vendor/github.com/containers/storage/drivers/devmapper/deviceset.go
generated
vendored
@@ -101,6 +101,7 @@ type DeviceSet struct {
|
||||
|
||||
// Options
|
||||
dataLoopbackSize int64
|
||||
metaDataSize string
|
||||
metaDataLoopbackSize int64
|
||||
baseFsSize uint64
|
||||
filesystem string
|
||||
@@ -2708,6 +2709,8 @@ func NewDeviceSet(root string, doInit bool, options []string, uidMaps, gidMaps [
|
||||
devices.mountOptions = joinMountOptions(devices.mountOptions, val)
|
||||
case "dm.metadatadev":
|
||||
devices.metadataDevice = val
|
||||
case "dm.metadata_size":
|
||||
devices.metaDataSize = val
|
||||
case "dm.datadev":
|
||||
devices.dataDevice = val
|
||||
case "dm.thinpooldev":
|
||||
@@ -2743,6 +2746,8 @@ func NewDeviceSet(root string, doInit bool, options []string, uidMaps, gidMaps [
|
||||
return nil, err
|
||||
}
|
||||
|
||||
case "dm.metaDataSize":
|
||||
lvmSetupConfig.MetaDataSize = val
|
||||
case "dm.min_free_space":
|
||||
if !strings.HasSuffix(val, "%") {
|
||||
return nil, fmt.Errorf("devmapper: Option dm.min_free_space requires %% suffix")
|
||||
|
||||
Reference in New Issue
Block a user