]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virstoragefile: move virStorageFileIsClusterFS into virfile
authorPavel Hrdina <phrdina@redhat.com>
Mon, 7 Dec 2020 11:04:41 +0000 (12:04 +0100)
committerPavel Hrdina <phrdina@redhat.com>
Wed, 6 Jan 2021 12:15:17 +0000 (13:15 +0100)
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/libvirt_private.syms
src/qemu/qemu_migration.c
src/util/virfile.c
src/util/virfile.h
src/util/virstoragefile.c
src/util/virstoragefile.h

index e79dc54d331d813886eba76c206039d77aaff97b..c67bd2504aff33b701809f47462484bbd73fca0a 100644 (file)
@@ -2087,6 +2087,7 @@ virFileGetXAttr;
 virFileGetXAttrQuiet;
 virFileInData;
 virFileIsCDROM;
+virFileIsClusterFS;
 virFileIsDir;
 virFileIsExecutable;
 virFileIsLink;
@@ -3145,7 +3146,6 @@ virStorageFileGetSCSIKey;
 virStorageFileGetUniqueIdentifier;
 virStorageFileInit;
 virStorageFileInitAs;
-virStorageFileIsClusterFS;
 virStorageFileParseBackingStoreStr;
 virStorageFileParseChainIndex;
 virStorageFileProbeFormat;
index 90b0ec95e35a25bf0b00f245848f1e7fdb0c762e..07235d64807e277666ab0dc5faecac2ed4da7ae9 100644 (file)
@@ -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;
index 6e16780e3098ed9912611d0ca833a04ea9ceb9d5..609cafdd3481871bcdba30c1136aaf9eb29271ca 100644 (file)
@@ -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,
index 45b75a059e54f7a73d2ac6a88edb3e6bc9b38ca6..733d652ac90c4ae30dd9a2f120e7c0aab198ab9f 100644 (file)
@@ -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;
index 66694bfcc0e368b2acbd9ddd41cef16d74260fd5..3db85d8b898d5287abe04ced67d0259685ea998a 100644 (file)
@@ -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
index 94bb889d846b117827c2590c41473ff6e0fe2029..2452b967b2054b0af1a8194c3d7b0afac8db99f5 100644 (file)
@@ -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);