mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
Revert "storage: For FS pool check for properly formatted target volume"
The check does not work properly (crashes) with netfs filesystems and also checking that a device is not empty when attempting to mount a filesystem is not very usefull since the mount will fail anyways. As the code would improve only a very minor corner case I don't really see a reason to have this code at all. This code would also fail if libvirt is compiled without support for blkid and without parted. This reverts commit a11fd69735e6951cda9bf256d8e423696a441aa4.
This commit is contained in:
parent
ecb587e4ca
commit
9538dff96f
@ -605,17 +605,8 @@ static int
|
|||||||
virStorageBackendFileSystemStart(virConnectPtr conn ATTRIBUTE_UNUSED,
|
virStorageBackendFileSystemStart(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||||
virStoragePoolObjPtr pool)
|
virStoragePoolObjPtr pool)
|
||||||
{
|
{
|
||||||
const char *format =
|
if (pool->def->type != VIR_STORAGE_POOL_DIR &&
|
||||||
virStoragePoolFormatFileSystemTypeToString(pool->def->source.format);
|
virStorageBackendFileSystemMount(pool) < 0)
|
||||||
const char *path = pool->def->source.devices[0].path;
|
|
||||||
|
|
||||||
if (pool->def->type == VIR_STORAGE_POOL_DIR)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (!virStorageBackendDeviceIsEmpty(path, format, false))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (virStorageBackendFileSystemMount(pool) < 0)
|
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user