Tool takes long time to return, and swap file not created successfully for RHEL distros (#15)

* Removed optimization process for defragmentation in XFS file systems

* Added comments for defragmentation in xfs file systems

Co-authored-by: Pavan Rachapudy <vrachapu@microsoft.com>
This commit is contained in:
pavanrachapudy 2022-08-11 15:48:07 -07:00 коммит произвёл GitHub
Родитель 1f6bd25f4f
Коммит a972b7364d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 3 добавлений и 5 удалений

Просмотреть файл

@ -960,6 +960,9 @@ static void spawn_and_wait(const char *program, int n_args, ...)
static void perform_fs_specific_checks(const char *path)
{
/* Not performing defragmentation for xfs file systems as xfs_fsr process is taking time for SKUs with larger RAM.
While it is good to have optimization, not ideal to have performance hit on the tool */
if (is_file_on_fs(path, EXT4_SUPER_MAGIC) && is_exec_in_path("e4defrag")) {
try_spawn_and_wait("e4defrag", 1, path);
return;
@ -979,11 +982,6 @@ static void perform_fs_specific_checks(const char *path)
try_spawn_and_wait("btrfs", 3, "filesystem", "defragment", path);
return;
}
if (is_file_on_fs(path, XFS_SUPER_MAGIC) && is_exec_in_path("xfs_fsr")) {
try_spawn_and_wait("xfs_fsr", 2, "-v", path);
return;
}
}
bool is_kernel_version_at_least(const char *version)