devmapper: resizepool hardcodes files as well

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 636e8561a86ffba909790e9188ffe282770570f0
Component: engine
This commit is contained in:
Vincent Batts
2014-09-22 17:03:31 -04:00
parent b69ca50509
commit dd5abc97c6

View File

@ -466,7 +466,13 @@ func minor(device uint64) uint64 {
func (devices *DeviceSet) ResizePool(size int64) error {
dirname := devices.loopbackDir()
datafilename := path.Join(dirname, "data")
if len(devices.dataDevice) > 0 {
datafilename = devices.dataDevice
}
metadatafilename := path.Join(dirname, "metadata")
if len(devices.metadataDevice) > 0 {
metadatafilename = devices.metadataDevice
}
datafile, err := os.OpenFile(datafilename, os.O_RDWR, 0)
if datafile == nil {