mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-16 10:43:27 +00:00
* Make fsck on journaling filesystems optional (enabled by default).
This is because fsck.ext3 takes several minutes to recover the journal, whereas the ext3 implementation in the kernel only takes a few seconds. I'd love to know why this is the case... svn path=/nixos/branches/modular-nixos/; revision=15965
This commit is contained in:
parent
048e03377f
commit
16937dd23d
@ -146,6 +146,17 @@ checkFS() {
|
||||
# Don't check ROM filesystems.
|
||||
if test "$FSTYPE" = iso9660 -o "$FSTYPE" = udf; then return 0; fi
|
||||
|
||||
# Optionally, skip fsck on journaling filesystems. This option is
|
||||
# a hack - it's mostly because e2fsck on ext3 takes much longer to
|
||||
# recover the journal than the ext3 implementation in the kernel
|
||||
# does (minutes versus seconds).
|
||||
if test -z "@checkJournalingFS@" -a \
|
||||
\( "$FSTYPE" = ext3 -o "$FSTYPE" = ext4 -o "$FSTYPE" = reiserfs \
|
||||
-o "$FSTYPE" = xfs -o "$FSTYPE" = jfs \)
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Don't run `fsck' if the machine is on battery power. !!! Is
|
||||
# this a good idea?
|
||||
if ! onACPower; then
|
||||
|
@ -54,6 +54,14 @@ let
|
||||
";
|
||||
};
|
||||
|
||||
boot.initrd.checkJournalingFS = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to run fsck on journaling filesystems such as ext3.
|
||||
'';
|
||||
};
|
||||
|
||||
fileSystems = mkOption {
|
||||
options.neededForBoot = mkOption {
|
||||
default = false;
|
||||
@ -215,6 +223,8 @@ let
|
||||
|
||||
inherit (config.boot) isLiveCD resumeDevice;
|
||||
|
||||
inherit (config.boot.initrd) checkJournalingFS;
|
||||
|
||||
# !!! copy&pasted from upstart-jobs/filesystems.nix.
|
||||
mountPoints =
|
||||
if fileSystems == null
|
||||
|
Loading…
Reference in New Issue
Block a user