提交 aa57eae7 编写于 作者: O Osier Yang 提交者: Cole Robinson

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 81165294)
上级 2a71d969
......@@ -407,10 +407,10 @@ virStorageBackendFileSystemMount(virStoragePoolObjPtr pool) {
/* Short-circuit if already mounted */
if ((ret = virStorageBackendFileSystemIsMounted(pool)) != 0) {
if (ret < 0)
return -1;
else
return 0;
virStorageReportError(VIR_ERR_OPERATION_INVALID,
_("Target '%s' is already mounted"),
pool->def->target.path);
return -1;
}
if (pool->def->type == VIR_STORAGE_POOL_NETFS) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册