]> xenbits.xensource.com Git - libvirt.git/commitdiff
storage: backend: Log uid/gid when initializing storage file backend
authorPeter Krempa <pkrempa@redhat.com>
Tue, 14 Oct 2014 13:55:09 +0000 (15:55 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 5 Dec 2014 09:07:17 +0000 (10:07 +0100)
To ease debugging permission problems add uid/gid values to the debug
message when initializing a storage file backend.

src/storage/storage_backend_fs.c
src/storage/storage_backend_gluster.c

index 0ee1d0938b2e6fe224e27c1e01f7d4d600812533..34f21538abff3dc442e098a3394b52071f32d4e1 100644 (file)
@@ -1370,9 +1370,10 @@ virStorageFileBackendFileInit(virStorageSourcePtr src)
 {
     virStorageFileBackendFsPrivPtr priv = NULL;
 
-    VIR_DEBUG("initializing FS storage file %p (%s:%s)", src,
+    VIR_DEBUG("initializing FS storage file %p (%s:%s)[%u:%u]", src,
               virStorageTypeToString(virStorageSourceGetActualType(src)),
-              src->path);
+              src->path,
+              (unsigned int)src->drv->uid, (unsigned int)src->drv->gid);
 
     if (VIR_ALLOC(priv) < 0)
         return -1;
index b79b6342045b1903725518f43384e2038d744279..53e4632ab3478bfe6d9bcd3626c234498506fbea 100644 (file)
@@ -582,9 +582,10 @@ virStorageFileBackendGlusterInit(virStorageSourcePtr src)
 
     hostname = host->name;
 
-    VIR_DEBUG("initializing gluster storage file %p (gluster://%s:%s/%s%s)",
+    VIR_DEBUG("initializing gluster storage file %p (gluster://%s:%s/%s%s)[%u:%u]",
               src, hostname, host->port ? host->port : "0",
-              NULLSTR(src->volume), src->path);
+              NULLSTR(src->volume), src->path,
+              (unsigned int)src->drv->uid, (unsigned int)src->drv->gid);
 
     if (!src->volume) {
         virReportError(VIR_ERR_INTERNAL_ERROR,