[libvirt] [PATCH 0/2] Gluster: tweak two small issues

Peter Krempa (2): conf: storage: Add volume feature formatter for gluster pools storage: gluster: Fix header reader function src/conf/storage_conf.c | 2 ++ src/storage/storage_backend_gluster.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) -- 1.9.3

Libvirt didn't output feature flags for images stored on native gluster. Fix this trivially by adding a feature formatter callback. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1095035 --- src/conf/storage_conf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 8b6fd79..c8df5b2 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -258,6 +258,8 @@ static virStoragePoolTypeInfo poolTypeInfo[] = { .defaultFormat = VIR_STORAGE_FILE_RAW, .formatToString = virStorageFileFormatTypeToString, .formatFromString = virStorageVolumeFormatFromString, + .featureFromString = virStorageFileFeatureTypeFromString, + .featureToString = virStorageFileFeatureTypeToString, } }, {.poolType = VIR_STORAGE_POOL_MPATH, -- 1.9.3

Advance the right pointer to actually append to the buffer. We were lucky that all reads were completed in one try. --- src/storage/storage_backend_gluster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storage/storage_backend_gluster.c b/src/storage/storage_backend_gluster.c index cab23b0..1a2b4ec 100644 --- a/src/storage/storage_backend_gluster.c +++ b/src/storage/storage_backend_gluster.c @@ -173,7 +173,7 @@ virStorageBackendGlusterReadHeader(glfs_fd_t *fd, } if (r == 0) return nread; - buf += r; + s += r; maxlen -= r; nread += r; } -- 1.9.3

On 07/01/2014 04:57 PM, Peter Krempa wrote:
Peter Krempa (2): conf: storage: Add volume feature formatter for gluster pools storage: gluster: Fix header reader function
src/conf/storage_conf.c | 2 ++ src/storage/storage_backend_gluster.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
ACK for 1.2.6 Jan

On 07/01/14 17:22, Ján Tomko wrote:
On 07/01/2014 04:57 PM, Peter Krempa wrote:
Peter Krempa (2): conf: storage: Add volume feature formatter for gluster pools storage: gluster: Fix header reader function
src/conf/storage_conf.c | 2 ++ src/storage/storage_backend_gluster.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
ACK for 1.2.6
Jan
Pushed; Thanks. Peter
participants (2)
-
Ján Tomko
-
Peter Krempa