From 3bc036691a1679fa82bee17ed4c3e18d7165c4d1 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 26 Oct 1999 17:17:00 +0000 Subject: [PATCH] ChangeLog, fsck.c: fsck.c (PRS, device_already_active): Add debugging hook; if the environment variable FSCK_FORCE_ALL_PARALLEL is set, then force all fsck runs to happen in parallel. --- misc/ChangeLog | 4 ++++ misc/fsck.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/misc/ChangeLog b/misc/ChangeLog index 1c8dc56..32cb640 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,5 +1,9 @@ 1999-10-26 + * fsck.c (PRS, device_already_active): Add debugging hook; if the + environment variable FSCK_FORCE_ALL_PARALLEL is set, then + force all fsck runs to happen in parallel. + * get_device_by_label.c (has_right_label): Fixed bug where code used a strncmp to compare a binary UUID value which may contain a NULL. Fixed GCC warnings; added const to char * diff --git a/misc/fsck.c b/misc/fsck.c index 2e00d40..6fa8407 100644 --- a/misc/fsck.c +++ b/misc/fsck.c @@ -133,6 +133,7 @@ int like_mount = 0; int notitle = 0; int parallel_root = 0; int progress = 0; +int force_all_parallel = 0; char *progname; char *fstype = NULL; struct fs_info *filesys_info; @@ -699,6 +700,9 @@ static int device_already_active(char *device) struct fsck_instance *inst; const char *base = base_device(device); + if (force_all_parallel) + return 0; + for (inst = instance_list; inst; inst = inst->next) { if (!strcmp(base, base_device(inst->device))) return 1; @@ -914,6 +918,8 @@ static void PRS(int argc, char *argv[]) opt = 0; } } + if (getenv("FSCK_FORCE_ALL_PARALLEL")) + force_all_parallel++; } int main(int argc, char *argv[]) -- 1.8.3.1