提交 98bbc8d5 编写于 作者: P Peter Krempa

Revert "storage: Introduce internal pool support"

The internal pools were an idea in one of the first iterations of the
gluster series, which we decided not to use. Somehow the patch still
got pushed. Remove it as the internal flag isn't needed.

This reverts commit 362da820.
上级 665344da
...@@ -2172,9 +2172,6 @@ static bool ...@@ -2172,9 +2172,6 @@ static bool
virStoragePoolMatch(virStoragePoolObjPtr poolobj, virStoragePoolMatch(virStoragePoolObjPtr poolobj,
unsigned int flags) unsigned int flags)
{ {
if (poolobj->internal)
return false;
/* filter by active state */ /* filter by active state */
if (MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ACTIVE) && if (MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ACTIVE) &&
!((MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVE) && !((MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVE) &&
......
...@@ -332,7 +332,6 @@ struct _virStoragePoolObj { ...@@ -332,7 +332,6 @@ struct _virStoragePoolObj {
int active; int active;
int autostart; int autostart;
unsigned int asyncjobs; unsigned int asyncjobs;
bool internal;
virStoragePoolDefPtr def; virStoragePoolDefPtr def;
virStoragePoolDefPtr newDef; virStoragePoolDefPtr newDef;
......
...@@ -376,8 +376,7 @@ storageConnectNumOfStoragePools(virConnectPtr conn) { ...@@ -376,8 +376,7 @@ storageConnectNumOfStoragePools(virConnectPtr conn) {
virStoragePoolObjPtr obj = driver->pools.objs[i]; virStoragePoolObjPtr obj = driver->pools.objs[i];
virStoragePoolObjLock(obj); virStoragePoolObjLock(obj);
if (virConnectNumOfStoragePoolsCheckACL(conn, obj->def) && if (virConnectNumOfStoragePoolsCheckACL(conn, obj->def) &&
virStoragePoolObjIsActive(obj) && virStoragePoolObjIsActive(obj))
!obj->internal)
nactive++; nactive++;
virStoragePoolObjUnlock(obj); virStoragePoolObjUnlock(obj);
} }
...@@ -402,8 +401,7 @@ storageConnectListStoragePools(virConnectPtr conn, ...@@ -402,8 +401,7 @@ storageConnectListStoragePools(virConnectPtr conn,
virStoragePoolObjPtr obj = driver->pools.objs[i]; virStoragePoolObjPtr obj = driver->pools.objs[i];
virStoragePoolObjLock(obj); virStoragePoolObjLock(obj);
if (virConnectListStoragePoolsCheckACL(conn, obj->def) && if (virConnectListStoragePoolsCheckACL(conn, obj->def) &&
virStoragePoolObjIsActive(obj) && virStoragePoolObjIsActive(obj)) {
!obj->internal) {
if (VIR_STRDUP(names[got], obj->def->name) < 0) { if (VIR_STRDUP(names[got], obj->def->name) < 0) {
virStoragePoolObjUnlock(obj); virStoragePoolObjUnlock(obj);
goto cleanup; goto cleanup;
...@@ -437,8 +435,7 @@ storageConnectNumOfDefinedStoragePools(virConnectPtr conn) { ...@@ -437,8 +435,7 @@ storageConnectNumOfDefinedStoragePools(virConnectPtr conn) {
virStoragePoolObjPtr obj = driver->pools.objs[i]; virStoragePoolObjPtr obj = driver->pools.objs[i];
virStoragePoolObjLock(obj); virStoragePoolObjLock(obj);
if (virConnectNumOfDefinedStoragePoolsCheckACL(conn, obj->def) && if (virConnectNumOfDefinedStoragePoolsCheckACL(conn, obj->def) &&
!virStoragePoolObjIsActive(obj) && !virStoragePoolObjIsActive(obj))
!obj->internal)
nactive++; nactive++;
virStoragePoolObjUnlock(obj); virStoragePoolObjUnlock(obj);
} }
...@@ -463,8 +460,7 @@ storageConnectListDefinedStoragePools(virConnectPtr conn, ...@@ -463,8 +460,7 @@ storageConnectListDefinedStoragePools(virConnectPtr conn,
virStoragePoolObjPtr obj = driver->pools.objs[i]; virStoragePoolObjPtr obj = driver->pools.objs[i];
virStoragePoolObjLock(obj); virStoragePoolObjLock(obj);
if (virConnectListDefinedStoragePoolsCheckACL(conn, obj->def) && if (virConnectListDefinedStoragePoolsCheckACL(conn, obj->def) &&
!virStoragePoolObjIsActive(obj) && !virStoragePoolObjIsActive(obj)) {
!obj->internal) {
if (VIR_STRDUP(names[got], obj->def->name) < 0) { if (VIR_STRDUP(names[got], obj->def->name) < 0) {
virStoragePoolObjUnlock(obj); virStoragePoolObjUnlock(obj);
goto cleanup; goto cleanup;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册