Module Name: src
Committed By: martin
Date: Tue Jul 20 16:41:27 UTC 2021
Modified Files:
src/usr.sbin/sysinst: bsddisklabel.c
Log Message:
PR 56303: do not borrow from the default swap allocation if we are in
tiny ram conditions and will need to enable swap early.
To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/usr.sbin/sysinst/bsddisklabel.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/sysinst/bsddisklabel.c
diff -u src/usr.sbin/sysinst/bsddisklabel.c:1.58 src/usr.sbin/sysinst/bsddisklabel.c:1.59
--- src/usr.sbin/sysinst/bsddisklabel.c:1.58 Sat Feb 13 15:31:35 2021
+++ src/usr.sbin/sysinst/bsddisklabel.c Tue Jul 20 16:41:27 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: bsddisklabel.c,v 1.58 2021/02/13 15:31:35 martin Exp $ */
+/* $NetBSD: bsddisklabel.c,v 1.59 2021/07/20 16:41:27 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -1153,7 +1153,8 @@ fill_defaults(struct partition_usage_set
continue;
free_space -= wanted->infos[i].size;
}
- if (free_space < 0 && swap < wanted->num) {
+ if (free_space < 0 && swap < wanted->num &&
+ get_ramsize() > TINY_RAM_SIZE) {
/* steel from swap partition */
daddr_t d = wanted->infos[swap].size;
daddr_t inc = roundup(-free_space, align);