Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
Reviewed-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/libvirt_private.syms | 2 +-
src/qemu/qemu_migration.c | 2 +-
src/util/virfile.c | 13 +++++++++++++
src/util/virfile.h | 1 +
src/util/virstoragefile.c | 11 -----------
src/util/virstoragefile.h | 1 -
6 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index e79dc54d33..c67bd2504a 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -2087,6 +2087,7 @@ virFileGetXAttr;
virFileGetXAttrQuiet;
virFileInData;
virFileIsCDROM;
+virFileIsClusterFS;
virFileIsDir;
virFileIsExecutable;
virFileIsLink;
@@ -3145,7 +3146,6 @@ virStorageFileGetSCSIKey;
virStorageFileGetUniqueIdentifier;
virStorageFileInit;
virStorageFileInitAs;
-virStorageFileIsClusterFS;
virStorageFileParseBackingStoreStr;
virStorageFileParseChainIndex;
virStorageFileProbeFormat;
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 90b0ec95e3..07235d6480 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1466,7 +1466,7 @@ qemuMigrationSrcIsSafe(virDomainDefPtr def,
} else if (rc == 0) {
unsafe = true;
}
- if ((rc = virStorageFileIsClusterFS(src)) < 0)
+ if ((rc = virFileIsClusterFS(src)) < 0)
return false;
else if (rc == 1)
continue;
diff --git a/src/util/virfile.c b/src/util/virfile.c
index 6e16780e30..609cafdd34 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -3709,6 +3709,19 @@ int virFileIsSharedFS(const char *path)
}
+int
+virFileIsClusterFS(const char *path)
+{
+ /* These are coherent cluster filesystems known to be safe for
+ * migration with cache != none
+ */
+ return virFileIsSharedFSType(path,
+ VIR_FILE_SHFS_GFS2 |
+ VIR_FILE_SHFS_OCFS |
+ VIR_FILE_SHFS_CEPH);
+}
+
+
#if defined(__linux__) && defined(WITH_SYS_MOUNT_H)
int
virFileSetupDev(const char *path,
diff --git a/src/util/virfile.h b/src/util/virfile.h
index 45b75a059e..733d652ac9 100644
--- a/src/util/virfile.h
+++ b/src/util/virfile.h
@@ -223,6 +223,7 @@ enum {
int virFileIsSharedFSType(const char *path, int fstypes) ATTRIBUTE_NONNULL(1);
int virFileIsSharedFS(const char *path) ATTRIBUTE_NONNULL(1);
+int virFileIsClusterFS(const char *path) ATTRIBUTE_NONNULL(1);
int virFileIsMountPoint(const char *file) ATTRIBUTE_NONNULL(1);
int virFileIsCDROM(const char *path)
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index 66694bfcc0..3db85d8b89 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -1193,17 +1193,6 @@ virStorageFileGetMetadataFromFD(const char *path,
}
-int virStorageFileIsClusterFS(const char *path)
-{
- /* These are coherent cluster filesystems known to be safe for
- * migration with cache != none
- */
- return virFileIsSharedFSType(path,
- VIR_FILE_SHFS_GFS2 |
- VIR_FILE_SHFS_OCFS |
- VIR_FILE_SHFS_CEPH);
-}
-
#ifdef WITH_UDEV
/* virStorageFileGetSCSIKey
* @path: Path to the SCSI device
diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h
index 94bb889d84..2452b967b2 100644
--- a/src/util/virstoragefile.h
+++ b/src/util/virstoragefile.h
@@ -420,7 +420,6 @@ virStorageSourcePtr virStorageFileChainLookup(virStorageSourcePtr
chain,
virStorageSourcePtr *parent)
ATTRIBUTE_NONNULL(1);
-int virStorageFileIsClusterFS(const char *path);
bool virStorageIsFile(const char *path);
bool virStorageIsRelative(const char *backing);
--
2.29.2