fdupoux / fsarchiver

file system archiver for linux
http://www.fsarchiver.org
GNU General Public License v2.0
249 stars 41 forks source link

fsarchiver rejects -j 128 #145

Closed bwarden closed 5 months ago

bwarden commented 7 months ago

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.

https://github.com/fdupoux/fsarchiver/blob/03089f44e64f2986a11f373a70141a3054336cf0/src/fsarchiver.c#L232-L240