@@ -231,8 +231,8 @@ unsigned int
scrub_nproc(
struct scrub_ctx *ctx)
{
- if (nr_threads)
- return nr_threads;
+ if (force_nr_threads)
+ return force_nr_threads;
return ctx->nr_io_threads;
}
@@ -75,8 +75,8 @@ unsigned int
disk_heads(
struct disk *disk)
{
- if (nr_threads)
- return nr_threads;
+ if (force_nr_threads)
+ return force_nr_threads;
return __disk_heads(disk);
}
@@ -133,7 +133,7 @@ unsigned int bg_mode;
int nproc;
/* Number of threads we're allowed to use. */
-unsigned int nr_threads;
+unsigned int force_nr_threads;
/* Verbosity; higher values print more information. */
bool verbose;
@@ -589,7 +589,7 @@ main(
}
break;
case 'b':
- nr_threads = 1;
+ force_nr_threads = 1;
bg_mode++;
break;
case 'C':
@@ -659,7 +659,7 @@ main(
perror("nr_threads");
usage();
}
- nr_threads = x;
+ force_nr_threads = x;
}
if (optind != argc - 1)
@@ -10,7 +10,7 @@ extern char *progname;
#define _PATH_PROC_MOUNTS "/proc/mounts"
-extern unsigned int nr_threads;
+extern unsigned int force_nr_threads;
extern unsigned int bg_mode;
extern unsigned int debug;
extern int nproc;