Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fsarchiver rejects -j 128 #145

Closed
bwarden opened this issue Dec 12, 2023 · 0 comments · Fixed by #146
Closed

fsarchiver rejects -j 128 #145

bwarden opened this issue Dec 12, 2023 · 0 comments · Fixed by #146

Comments

@bwarden
Copy link
Contributor

bwarden commented Dec 12, 2023

When scripting, it's convenient to run fsarchiver with -j $(nproc) to scale to however many processors are present in the system that runs the script. However, fsarchiver rejects arguments greater than 32, which happens on a large build server with 128 processing threads:

fsarchiver.c#236,process_cmdline(): [128] is not a valid number of jobs. Must be between 1 and 32

It would be nice if fsarchiver would quietly accept values larger than 32, but only actually use 32 threads if that's the internal limit. Otherwise, we have to make scripts significantly more complex to scale the value down.

fsarchiver/src/fsarchiver.c

Lines 232 to 240 in 03089f4

case 'j': // compression jobs
g_options.compressjobs=atoi(optarg);
if (g_options.compressjobs<1 || g_options.compressjobs>FSA_MAX_COMPJOBS)
{
errprintf("[%s] is not a valid number of jobs. Must be between 1 and %d\n", optarg, FSA_MAX_COMPJOBS);
usage(progname, false);
return 1;
}
break;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant