Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/newfs_lfs Use an even smaller segment size when creatin...
details: https://anonhg.NetBSD.org/src/rev/4384c17028d4
branches: trunk
changeset: 772823:4384c17028d4
user: perseant <perseant%NetBSD.org@localhost>
date: Tue Jan 17 16:27:19 2012 +0000
description:
Use an even smaller segment size when creating a very small filesystem.
This allows the lfs_renamerace_dirs case of the t_renamerace test to
fail correctly, rather than with a bogus "file system full" error as it
has since rev 1.135 of sys/ufs/lfs/lfs.h.
diffstat:
sbin/newfs_lfs/make_lfs.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (36 lines):
diff -r 6def7766918b -r 4384c17028d4 sbin/newfs_lfs/make_lfs.c
--- a/sbin/newfs_lfs/make_lfs.c Tue Jan 17 16:27:15 2012 +0000
+++ b/sbin/newfs_lfs/make_lfs.c Tue Jan 17 16:27:19 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: make_lfs.c,v 1.16 2010/02/16 23:20:30 mlelstv Exp $ */
+/* $NetBSD: make_lfs.c,v 1.17 2012/01/17 16:27:19 perseant Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
#if 0
static char sccsid[] = "@(#)lfs.c 8.5 (Berkeley) 5/24/95";
#else
-__RCSID("$NetBSD: make_lfs.c,v 1.16 2010/02/16 23:20:30 mlelstv Exp $");
+__RCSID("$NetBSD: make_lfs.c,v 1.17 2012/01/17 16:27:19 perseant Exp $");
#endif
#endif /* not lint */
@@ -488,7 +488,7 @@
if (fs->lfs_resvseg < MIN_RESV_SEGS)
fs->lfs_resvseg = MIN_RESV_SEGS;
- if(fs->lfs_nseg < fs->lfs_minfreeseg + 1
+ if(fs->lfs_nseg < (3 * CM_MAG_NUM * fs->lfs_minfreeseg) / CM_MAG_DEN + 1
|| fs->lfs_nseg < LFS_MIN_SBINTERVAL + 1)
{
if(seg_size == 0 && ssize > (bsize<<1)) {
@@ -510,6 +510,8 @@
"size %d and block size %d;\nplease decrease the "
"segment size.\n", ssize, fs->lfs_bsize);
}
+ if(warned_segtoobig)
+ fprintf(stderr,"Using segment size %d.\n", ssize);
/*
* Now that we've determined what we're going to do, announce it
Home |
Main Index |
Thread Index |
Old Index