[libvirt] [PATCH] Revert "storage: Introduce internal pool support"

The internal pools were an idea in one of the first iterations of the gluster series that deemed unused. Somehow still this got pushed. Remove it as the internal flag isn't needed. This reverts commit 362da8209d760fc1acd3a1c8df5b04aa676492eb. --- src/conf/storage_conf.c | 3 --- src/conf/storage_conf.h | 1 - src/storage/storage_driver.c | 12 ++++-------- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index eaa9325..e4232e9 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -2172,9 +2172,6 @@ static bool virStoragePoolMatch(virStoragePoolObjPtr poolobj, unsigned int flags) { - if (poolobj->internal) - return false; - /* filter by active state */ if (MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ACTIVE) && !((MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVE) && diff --git a/src/conf/storage_conf.h b/src/conf/storage_conf.h index cada861..251b968 100644 --- a/src/conf/storage_conf.h +++ b/src/conf/storage_conf.h @@ -332,7 +332,6 @@ struct _virStoragePoolObj { int active; int autostart; unsigned int asyncjobs; - bool internal; virStoragePoolDefPtr def; virStoragePoolDefPtr newDef; diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 64451c5..e0ebdb0 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -376,8 +376,7 @@ storageConnectNumOfStoragePools(virConnectPtr conn) { virStoragePoolObjPtr obj = driver->pools.objs[i]; virStoragePoolObjLock(obj); if (virConnectNumOfStoragePoolsCheckACL(conn, obj->def) && - virStoragePoolObjIsActive(obj) && - !obj->internal) + virStoragePoolObjIsActive(obj)) nactive++; virStoragePoolObjUnlock(obj); } @@ -402,8 +401,7 @@ storageConnectListStoragePools(virConnectPtr conn, virStoragePoolObjPtr obj = driver->pools.objs[i]; virStoragePoolObjLock(obj); if (virConnectListStoragePoolsCheckACL(conn, obj->def) && - virStoragePoolObjIsActive(obj) && - !obj->internal) { + virStoragePoolObjIsActive(obj)) { if (VIR_STRDUP(names[got], obj->def->name) < 0) { virStoragePoolObjUnlock(obj); goto cleanup; @@ -437,8 +435,7 @@ storageConnectNumOfDefinedStoragePools(virConnectPtr conn) { virStoragePoolObjPtr obj = driver->pools.objs[i]; virStoragePoolObjLock(obj); if (virConnectNumOfDefinedStoragePoolsCheckACL(conn, obj->def) && - !virStoragePoolObjIsActive(obj) && - !obj->internal) + !virStoragePoolObjIsActive(obj)) nactive++; virStoragePoolObjUnlock(obj); } @@ -463,8 +460,7 @@ storageConnectListDefinedStoragePools(virConnectPtr conn, virStoragePoolObjPtr obj = driver->pools.objs[i]; virStoragePoolObjLock(obj); if (virConnectListDefinedStoragePoolsCheckACL(conn, obj->def) && - !virStoragePoolObjIsActive(obj) && - !obj->internal) { + !virStoragePoolObjIsActive(obj)) { if (VIR_STRDUP(names[got], obj->def->name) < 0) { virStoragePoolObjUnlock(obj); goto cleanup; -- 1.8.5.3

On 02/14/2014 08:08 AM, Peter Krempa wrote:
The internal pools were an idea in one of the first iterations of the gluster series that deemed unused. Somehow still this got pushed. Remove
grammar is off, but I'm not sure of the best fix. Maybe one of: of the gluster series, which we decided not to use. of the gluster series, deemed unused by later iterations.
it as the internal flag isn't needed.
This reverts commit 362da8209d760fc1acd3a1c8df5b04aa676492eb. --- src/conf/storage_conf.c | 3 --- src/conf/storage_conf.h | 1 - src/storage/storage_driver.c | 12 ++++-------- 3 files changed, 4 insertions(+), 12 deletions(-)
ACK to the revert. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 02/14/14 16:26, Eric Blake wrote:
On 02/14/2014 08:08 AM, Peter Krempa wrote:
The internal pools were an idea in one of the first iterations of the gluster series that deemed unused. Somehow still this got pushed. Remove
grammar is off, but I'm not sure of the best fix. Maybe one of:
of the gluster series, which we decided not to use. of the gluster series, deemed unused by later iterations.
it as the internal flag isn't needed.
This reverts commit 362da8209d760fc1acd3a1c8df5b04aa676492eb. --- src/conf/storage_conf.c | 3 --- src/conf/storage_conf.h | 1 - src/storage/storage_driver.c | 12 ++++-------- 3 files changed, 4 insertions(+), 12 deletions(-)
ACK to the revert.
I've fixed the commit message and pushed the patch. Thanks. Peter
participants (2)
-
Eric Blake
-
Peter Krempa