storage/reflink: is_reflink_supported() -> is_supported()

This commit is contained in:
Rusty Bird 2018-09-11 23:50:16 +00:00
parent 1889c9b75f
commit c75fe09814
No known key found for this signature in database
GPG Key ID: 469D78F47AAF2ADF

View File

@ -55,7 +55,7 @@ class ReflinkPool(qubes.storage.Pool):
def setup(self): def setup(self):
created = _make_dir(self.dir_path) created = _make_dir(self.dir_path)
if self.setup_check and not is_reflink_supported(self.dir_path): if self.setup_check and not is_supported(self.dir_path):
if created: if created:
_remove_empty_dir(self.dir_path) _remove_empty_dir(self.dir_path)
raise qubes.storage.StoragePoolException( raise qubes.storage.StoragePoolException(
@ -449,7 +449,7 @@ def _copy_file(src, dst):
raise qubes.storage.StoragePoolException(str(p)) raise qubes.storage.StoragePoolException(str(p))
return False return False
def is_reflink_supported(dst_dir, src_dir=None): def is_supported(dst_dir, src_dir=None):
''' Return whether destination directory supports reflink copies ''' Return whether destination directory supports reflink copies
from source directory. (A temporary file is created in each from source directory. (A temporary file is created in each
directory, using O_TMPFILE if possible.) directory, using O_TMPFILE if possible.)