зеркало из https://github.com/microsoft/docker.git
devmapper: resizepool hardcodes files as well
Signed-off-by: Vincent Batts <vbatts@redhat.com>
This commit is contained in:
Родитель
7e9ba22dc3
Коммит
636e8561a8
|
@ -466,7 +466,13 @@ func minor(device uint64) uint64 {
|
||||||
func (devices *DeviceSet) ResizePool(size int64) error {
|
func (devices *DeviceSet) ResizePool(size int64) error {
|
||||||
dirname := devices.loopbackDir()
|
dirname := devices.loopbackDir()
|
||||||
datafilename := path.Join(dirname, "data")
|
datafilename := path.Join(dirname, "data")
|
||||||
|
if len(devices.dataDevice) > 0 {
|
||||||
|
datafilename = devices.dataDevice
|
||||||
|
}
|
||||||
metadatafilename := path.Join(dirname, "metadata")
|
metadatafilename := path.Join(dirname, "metadata")
|
||||||
|
if len(devices.metadataDevice) > 0 {
|
||||||
|
metadatafilename = devices.metadataDevice
|
||||||
|
}
|
||||||
|
|
||||||
datafile, err := os.OpenFile(datafilename, os.O_RDWR, 0)
|
datafile, err := os.OpenFile(datafilename, os.O_RDWR, 0)
|
||||||
if datafile == nil {
|
if datafile == nil {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче