1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-20 07:59:00 +00:00

Introduce virStorageFileIsClusterFS

This commit is contained in:
Jiri Denemark 2012-02-21 22:58:50 +01:00
parent 0b7480e34e
commit 5fadb1549d
3 changed files with 12 additions and 0 deletions

View File

@ -1011,6 +1011,7 @@ virStorageFileFormatTypeToString;
virStorageFileFreeMetadata;
virStorageFileGetMetadata;
virStorageFileGetMetadataFromFD;
virStorageFileIsClusterFS;
virStorageFileIsSharedFS;
virStorageFileIsSharedFSType;
virStorageFileProbeFormat;

View 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);
}

View File

@ -82,6 +82,7 @@ enum {
};
int virStorageFileIsSharedFS(const char *path);
int virStorageFileIsClusterFS(const char *path);
int virStorageFileIsSharedFSType(const char *path,
int fstypes);