mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Revert fs pool formatting
* We are reverting this patch pending a discussion of the right way to implement.
This commit is contained in:
parent
bd3ff6b348
commit
b2111ba3cd
@ -1252,15 +1252,12 @@ AM_CONDITIONAL([WITH_STORAGE_DIR], [test "$with_storage_dir" = "yes"])
|
|||||||
if test "$with_storage_fs" = "yes" -o "$with_storage_fs" = "check"; then
|
if test "$with_storage_fs" = "yes" -o "$with_storage_fs" = "check"; then
|
||||||
AC_PATH_PROG([MOUNT], [mount], [], [$PATH:/sbin:/usr/sbin])
|
AC_PATH_PROG([MOUNT], [mount], [], [$PATH:/sbin:/usr/sbin])
|
||||||
AC_PATH_PROG([UMOUNT], [umount], [], [$PATH:/sbin:/usr/sbin])
|
AC_PATH_PROG([UMOUNT], [umount], [], [$PATH:/sbin:/usr/sbin])
|
||||||
AC_PATH_PROG([MKFS], [mkfs], [], [$PATH:/sbin:/usr/sbin])
|
|
||||||
if test "$with_storage_fs" = "yes" ; then
|
if test "$with_storage_fs" = "yes" ; then
|
||||||
if test -z "$MOUNT" ; then AC_MSG_ERROR([We need mount for FS storage driver]) ; fi
|
if test -z "$MOUNT" ; then AC_MSG_ERROR([We need mount for FS storage driver]) ; fi
|
||||||
if test -z "$UMOUNT" ; then AC_MSG_ERROR([We need umount for FS storage driver]) ; fi
|
if test -z "$UMOUNT" ; then AC_MSG_ERROR([We need umount for FS storage driver]) ; fi
|
||||||
if test -z "$MKFS" ; then AC_MSG_ERROR([We need mkfs for FS storage driver]) ; fi
|
|
||||||
else
|
else
|
||||||
if test -z "$MOUNT" ; then with_storage_fs=no ; fi
|
if test -z "$MOUNT" ; then with_storage_fs=no ; fi
|
||||||
if test -z "$UMOUNT" ; then with_storage_fs=no ; fi
|
if test -z "$UMOUNT" ; then with_storage_fs=no ; fi
|
||||||
if test -z "$MKFS" ; then with_storage_fs=no ; fi
|
|
||||||
|
|
||||||
if test "$with_storage_fs" = "check" ; then with_storage_fs=yes ; fi
|
if test "$with_storage_fs" = "check" ; then with_storage_fs=yes ; fi
|
||||||
fi
|
fi
|
||||||
@ -1271,8 +1268,6 @@ if test "$with_storage_fs" = "yes" -o "$with_storage_fs" = "check"; then
|
|||||||
[Location or name of the mount program])
|
[Location or name of the mount program])
|
||||||
AC_DEFINE_UNQUOTED([UMOUNT],["$UMOUNT"],
|
AC_DEFINE_UNQUOTED([UMOUNT],["$UMOUNT"],
|
||||||
[Location or name of the mount program])
|
[Location or name of the mount program])
|
||||||
AC_DEFINE_UNQUOTED([MKFS],["$MKFS"],
|
|
||||||
[Location or name of the mkfs program])
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL([WITH_STORAGE_FS], [test "$with_storage_fs" = "yes"])
|
AM_CONDITIONAL([WITH_STORAGE_FS], [test "$with_storage_fs" = "yes"])
|
||||||
|
@ -209,8 +209,6 @@ BuildRequires: util-linux
|
|||||||
# For showmount in FS driver (netfs discovery)
|
# For showmount in FS driver (netfs discovery)
|
||||||
BuildRequires: nfs-utils
|
BuildRequires: nfs-utils
|
||||||
Requires: nfs-utils
|
Requires: nfs-utils
|
||||||
# For mkfs
|
|
||||||
Requires: util-linux
|
|
||||||
# For glusterfs
|
# For glusterfs
|
||||||
%if 0%{?fedora} >= 11
|
%if 0%{?fedora} >= 11
|
||||||
Requires: glusterfs-client >= 2.0.1
|
Requires: glusterfs-client >= 2.0.1
|
||||||
|
@ -45,7 +45,6 @@
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "xml.h"
|
#include "xml.h"
|
||||||
#include "logging.h"
|
|
||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_STORAGE
|
#define VIR_FROM_THIS VIR_FROM_STORAGE
|
||||||
|
|
||||||
@ -501,7 +500,6 @@ virStorageBackendFileSystemBuild(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
virStoragePoolObjPtr pool,
|
virStoragePoolObjPtr pool,
|
||||||
unsigned int flags ATTRIBUTE_UNUSED)
|
unsigned int flags ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
const char *mke2fsargv[5], *device = NULL, *format = NULL;
|
|
||||||
int err, ret = -1;
|
int err, ret = -1;
|
||||||
char *parent;
|
char *parent;
|
||||||
char *p;
|
char *p;
|
||||||
@ -542,26 +540,6 @@ virStorageBackendFileSystemBuild(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
pool->def->target.path);
|
pool->def->target.path);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
device = pool->def->source.devices[0].path;
|
|
||||||
format = virStoragePoolFormatFileSystemTypeToString(pool->def->source.format);
|
|
||||||
|
|
||||||
VIR_DEBUG("source device: '%s' format: '%s'", device, format);
|
|
||||||
|
|
||||||
mke2fsargv[0] = MKFS;
|
|
||||||
mke2fsargv[1] = "-t";
|
|
||||||
mke2fsargv[2] = format;
|
|
||||||
mke2fsargv[3] = device;
|
|
||||||
mke2fsargv[4] = NULL;
|
|
||||||
|
|
||||||
if (virRun(mke2fsargv, NULL) < 0) {
|
|
||||||
virReportSystemError(errno,
|
|
||||||
_("Failed to make filesystem of "
|
|
||||||
"type '%s' on device '%s'"),
|
|
||||||
format, device);
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
error:
|
error:
|
||||||
VIR_FREE(parent);
|
VIR_FREE(parent);
|
||||||
|
Loading…
Reference in New Issue
Block a user