mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
storage: Attempt to refresh volume after successful wipe volume
https://bugzilla.redhat.com/show_bug.cgi?id=1270709 When a volume wipe is successful, perform a volume refresh afterwards to update any volume data that may be used in future volume commands, such as volume resize. For a raw file volume, a wipe could truncate the file and a followup volume resize the capacity may fail because the volume target allocation isn't updated to reflect the wipe activity.
This commit is contained in:
parent
f61770a169
commit
80ca86e54d
@ -2436,7 +2436,14 @@ storageVolWipePattern(virStorageVolPtr obj,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = backend->wipeVol(obj->conn, pool, vol, algorithm, flags);
|
if (backend->wipeVol(obj->conn, pool, vol, algorithm, flags) < 0)
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
|
if (backend->refreshVol &&
|
||||||
|
backend->refreshVol(obj->conn, pool, vol) < 0)
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virStoragePoolObjUnlock(pool);
|
virStoragePoolObjUnlock(pool);
|
||||||
|
Loading…
Reference in New Issue
Block a user