newfs with `-m 1'

This is needed even with `-o space' as the kernel decides to be "helpful"
and not really do space optimization.  Looking at src/sys/ufs/ffs/ffs_alloc.c
we see why:		if (fs->fs_minfree <= 5 ||
		            fs->fs_cstotal.cs_nffree >
		            (off_t)fs->fs_dsize * fs->fs_minfree / (2 * 100))
			            break;
	            log(LOG_NOTICE, "%s: optimization changed from SPACE to TIME\n"

I have picked `1' vs. `0' just incase some code somewhere has the assumption
the %free can never be `0'.

Helped with understanding why -m 1 made a different:	imp
This commit is contained in:
David E. O'Brien 2001-03-09 01:03:15 +00:00
parent edc7e465e6
commit ca5bd0c65a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=74005

View File

@ -47,7 +47,7 @@ do
fi
fi
disklabel -Brw /dev/${MDDEVICE} ${FSLABEL}
newfs -i ${FSINODE} -T ${FSLABEL} -o space /dev/${MDDEVICE}c
newfs -i ${FSINODE} -T ${FSLABEL} -o space -m 1 /dev/${MDDEVICE}c
tunefs -m 0 /dev/${MDDEVICE}c
mount /dev/${MDDEVICE}c ${MNT}