示例#1
0
    def customize(self, size, requested_filesystem):
        """
            increase the sum of all file sizes by an empiric factor
        """
        if requested_filesystem.startswith('ext'):
            size *= 1.5
            file_count = self.accumulate_files()
            inode_mbytes = \
                file_count * Defaults.get_default_inode_size() / 1048576
            size += 2 * inode_mbytes
        elif requested_filesystem == 'btrfs':
            size *= 1.5
        elif requested_filesystem == 'xfs':
            size *= 1.2

        return int(size)