mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
virstoragefile: move virStorageFileIsClusterFS into virfile
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
ec594462c1
commit
abab80e29a
@ -2087,6 +2087,7 @@ virFileGetXAttr;
|
||||
virFileGetXAttrQuiet;
|
||||
virFileInData;
|
||||
virFileIsCDROM;
|
||||
virFileIsClusterFS;
|
||||
virFileIsDir;
|
||||
virFileIsExecutable;
|
||||
virFileIsLink;
|
||||
@ -3145,7 +3146,6 @@ virStorageFileGetSCSIKey;
|
||||
virStorageFileGetUniqueIdentifier;
|
||||
virStorageFileInit;
|
||||
virStorageFileInitAs;
|
||||
virStorageFileIsClusterFS;
|
||||
virStorageFileParseBackingStoreStr;
|
||||
virStorageFileParseChainIndex;
|
||||
virStorageFileProbeFormat;
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user