devmapper: resizepool hardcodes files as well

Signed-off-by: Vincent Batts <vbatts@redhat.com>
This commit is contained in:
Vincent Batts 2014-09-22 17:03:31 -04:00
parent 7e9ba22dc3
commit 636e8561a8
1 changed files with 6 additions and 0 deletions

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 {