]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Introduce virStorageFileIsClusterFS
authorJiri Denemark <jdenemar@redhat.com>
Tue, 21 Feb 2012 21:58:50 +0000 (22:58 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 23 Feb 2012 13:23:45 +0000 (14:23 +0100)
src/libvirt_private.syms
src/util/storage_file.c
src/util/storage_file.h

index 9e3573ff46254820560b22c986849e022c8a830a..18a24e48542096a0f106b361b2eb5d41c4af0019 100644 (file)
@@ -1011,6 +1011,7 @@ virStorageFileFormatTypeToString;
 virStorageFileFreeMetadata;
 virStorageFileGetMetadata;
 virStorageFileGetMetadataFromFD;
+virStorageFileIsClusterFS;
 virStorageFileIsSharedFS;
 virStorageFileIsSharedFSType;
 virStorageFileProbeFormat;
index a8661e3b795293e5bb774865cbe17b23bbc181ea..cd1c1421d802866f6cae1b24e5517e2ef7ecc33e 100644 (file)
@@ -1063,3 +1063,13 @@ int virStorageFileIsSharedFS(const char *path)
                                         VIR_STORAGE_FILE_SHFS_OCFS |
                                         VIR_STORAGE_FILE_SHFS_AFS);
 }
+
+int virStorageFileIsClusterFS(const char *path)
+{
+    /* These are coherent cluster filesystems known to be safe for
+     * migration with cache != none
+     */
+    return virStorageFileIsSharedFSType(path,
+                                        VIR_STORAGE_FILE_SHFS_GFS2 |
+                                        VIR_STORAGE_FILE_SHFS_OCFS);
+}
index 96afb12689e8f823806cba0ddd504dbb9f6d5f39..13d0e87934d8f4ef845ab00c95d6983f26de3386 100644 (file)
@@ -82,6 +82,7 @@ enum {
 };
 
 int virStorageFileIsSharedFS(const char *path);
+int virStorageFileIsClusterFS(const char *path);
 int virStorageFileIsSharedFSType(const char *path,
                                  int fstypes);