mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 12:05:17 +00:00
storage: Error out if the target is already mounted for netfs pool
mnt_fsname can not be the same, as we check the duplicate pool sources earlier before, means it can't be the same pool, moreover, a pool can't be started if it's already active anyway. So no reason to act as success. (cherry picked from commit 8116529409357c82824fb280165ea0ee6f2d6277)
This commit is contained in:
parent
2a71d969e4
commit
aa57eae7b1
@ -407,10 +407,10 @@ virStorageBackendFileSystemMount(virStoragePoolObjPtr pool) {
|
|||||||
|
|
||||||
/* Short-circuit if already mounted */
|
/* Short-circuit if already mounted */
|
||||||
if ((ret = virStorageBackendFileSystemIsMounted(pool)) != 0) {
|
if ((ret = virStorageBackendFileSystemIsMounted(pool)) != 0) {
|
||||||
if (ret < 0)
|
virStorageReportError(VIR_ERR_OPERATION_INVALID,
|
||||||
return -1;
|
_("Target '%s' is already mounted"),
|
||||||
else
|
pool->def->target.path);
|
||||||
return 0;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pool->def->type == VIR_STORAGE_POOL_NETFS) {
|
if (pool->def->type == VIR_STORAGE_POOL_NETFS) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user