projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
don't spill superblock numbers for big disks
[unix-history]
/
usr
/
src
/
sbin
/
newfs
/
mkfs.c
diff --git
a/usr/src/sbin/newfs/mkfs.c
b/usr/src/sbin/newfs/mkfs.c
index
45c97ca
..
ea2197f
100644
(file)
--- a/
usr/src/sbin/newfs/mkfs.c
+++ b/
usr/src/sbin/newfs/mkfs.c
@@
-6,7
+6,7
@@
*/
#ifndef lint
*/
#ifndef lint
-static char sccsid[] = "@(#)mkfs.c 8.
3
(Berkeley) %G%";
+static char sccsid[] = "@(#)mkfs.c 8.
5
(Berkeley) %G%";
#endif /* not lint */
#include <unistd.h>
#endif /* not lint */
#include <unistd.h>
@@
-561,7
+561,7
@@
next:
initcg(cylno, utime);
if (mfs)
continue;
initcg(cylno, utime);
if (mfs)
continue;
- if (cylno %
9
== 0)
+ if (cylno %
8
== 0)
printf("\n");
printf(" %d,", fsbtodb(&sblock, cgsblock(&sblock, cylno)));
}
printf("\n");
printf(" %d,", fsbtodb(&sblock, cgsblock(&sblock, cylno)));
}
@@
-907,7
+907,8
@@
alloc(size, mode)
goth:
blkno = fragstoblks(&sblock, d);
clrblock(&sblock, cg_blksfree(&acg), blkno);
goth:
blkno = fragstoblks(&sblock, d);
clrblock(&sblock, cg_blksfree(&acg), blkno);
- clrbit(cg_clustersfree(&acg), blkno);
+ if (sblock.fs_contigsumsize > 0)
+ clrbit(cg_clustersfree(&acg), blkno);
acg.cg_cs.cs_nbfree--;
sblock.fs_cstotal.cs_nbfree--;
fscs[0].cs_nbfree--;
acg.cg_cs.cs_nbfree--;
sblock.fs_cstotal.cs_nbfree--;
fscs[0].cs_nbfree--;