Add helper functions for mounted file system resizing operations
There is a lot of commonality and code repetition for resizing of file systems which can only be resized while mounted. Resizing of btrfs, jfs and xfs all follow the pattern: mkdir, mount, resize, umount and rmdir. Copying an xfs file system also uses a similar pattern, but for the source and destination xfs file systems simultaneously. Add three helper functions to the FileSystem class which implement common tasks, allowing mounted file system resizing to be implemented more simply. Also add a function to the Utils class which checks whether the kernel supports a file system. It handles the case of non-loaded modules, which currently leads to reporting the growing of jfs and xfs as unsupported.
parent
293e4c71
Please register or sign in to comment