Skip to content

Commit

Permalink
Merge pull request #1264 from vojtechtrefny/3.10-devel_fix-get-min-si…
Browse files Browse the repository at this point in the history
…ze-ext

Fix checking for FS min size application availability
  • Loading branch information
vojtechtrefny authored Jul 25, 2024
2 parents 167cb76 + f3a6b65 commit 7de4334
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions blivet/tasks/availability.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def availability_errors(self, resource):
return ["libblockdev fs plugin not loaded"]
else:
try:
if self.operation in (FSOperation.UUID, FSOperation.LABEL, FSOperation.INFO):
if self.operation in (FSOperation.UUID, FSOperation.LABEL, FSOperation.INFO, FSOperation.MIN_SIZE):
avail, utility = self.check_fn(self.fstype)
elif self.operation == FSOperation.RESIZE:
avail, _mode, utility = self.check_fn(self.fstype)
Expand Down Expand Up @@ -538,6 +538,7 @@ class FSOperation():
RESIZE = 2
INFO = 3
MKFS = 4
MIN_SIZE = 5


BLOCKDEV_EXT_UUID = blockdev_fs_plugin_operation(BlockDevFSMethod(FSOperation.UUID, blockdev.fs.can_set_uuid, "ext2"))
Expand Down Expand Up @@ -565,8 +566,8 @@ class FSOperation():
BLOCKDEV_VFAT_MKFS = blockdev_fs_plugin_operation(BlockDevFSMethod(FSOperation.MKFS, blockdev.fs.can_mkfs, "vfat"))
BLOCKDEV_F2FS_MKFS = blockdev_fs_plugin_operation(BlockDevFSMethod(FSOperation.MKFS, blockdev.fs.can_mkfs, "f2fs"))

BLOCKDEV_EXT_MIN_SIZE = blockdev_fs_plugin_operation(BlockDevFSMethod(FSOperation.LABEL, blockdev.fs.can_get_min_size, "ntfs"))
BLOCKDEV_NTFS_MIN_SIZE = blockdev_fs_plugin_operation(BlockDevFSMethod(FSOperation.LABEL, blockdev.fs.can_get_min_size, "ntfs"))
BLOCKDEV_EXT_MIN_SIZE = blockdev_fs_plugin_operation(BlockDevFSMethod(FSOperation.MIN_SIZE, blockdev.fs.can_get_min_size, "ext2"))
BLOCKDEV_NTFS_MIN_SIZE = blockdev_fs_plugin_operation(BlockDevFSMethod(FSOperation.MIN_SIZE, blockdev.fs.can_get_min_size, "ntfs"))

# libblockdev plugins
# we can't just check if the plugin is loaded, we also need to make sure
Expand Down

0 comments on commit 7de4334

Please sign in to comment.