summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2003-12-05 00:40:30 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2003-12-05 00:40:30 +0000
commit991a42dc982bd20a644e9511bbe50335a6ff74ff (patch)
treec2f79abea09e802933b0d2075b030107c34ab33e
parent8b987b9d2402f25c3fc61b2066593c31d1076c87 (diff)
madvise() the mfs storage area as randomly accessed as mfs does it's own clustering; tedu@ ok
-rw-r--r--sbin/newfs/mkfs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c
index 3bbe69101bb..76c6742464a 100644
--- a/sbin/newfs/mkfs.c
+++ b/sbin/newfs/mkfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mkfs.c,v 1.36 2003/11/06 08:53:58 tedu Exp $ */
+/* $OpenBSD: mkfs.c,v 1.37 2003/12/05 00:40:29 mickey Exp $ */
/* $NetBSD: mkfs.c,v 1.25 1995/06/18 21:35:38 cgd Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)mkfs.c 8.3 (Berkeley) 2/3/94";
#else
-static char rcsid[] = "$OpenBSD: mkfs.c,v 1.36 2003/11/06 08:53:58 tedu Exp $";
+static char rcsid[] = "$OpenBSD: mkfs.c,v 1.37 2003/12/05 00:40:29 mickey Exp $";
#endif
#endif /* not lint */
@@ -166,6 +166,7 @@ mkfs(struct partition *pp, char *fsys, int fi, int fo)
MAP_ANON|MAP_PRIVATE, -1, 0);
if (membase == MAP_FAILED)
err(12, "mmap");
+ madvise(membase, fssize * sectorsize, MADV_RANDOM);
}
fsi = fi;
fso = fo;