1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-01 08:27:59 +00:00

o Mount the device async when we're doing the copy.

o Create a sparse file instead of a fully zerod one.  This trades the
  possibiltiy of running out of space during the build for the speed
  gain not having do write all those zeros...

Submitted by:	n_hibma
This commit is contained in:
Warner Losh 2010-12-03 07:39:29 +00:00
parent 62a49e2109
commit 6daeae43a6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=216145

View File

@ -404,7 +404,7 @@ newfs_part ( ) (
lbl=$3 lbl=$3
echo newfs ${NANO_NEWFS} ${NANO_LABEL:+-L${NANO_LABEL}${lbl}} ${dev} echo newfs ${NANO_NEWFS} ${NANO_LABEL:+-L${NANO_LABEL}${lbl}} ${dev}
newfs ${NANO_NEWFS} ${NANO_LABEL:+-L${NANO_LABEL}${lbl}} ${dev} newfs ${NANO_NEWFS} ${NANO_LABEL:+-L${NANO_LABEL}${lbl}} ${dev}
mount ${dev} ${mnt} mount -o async ${dev} ${mnt}
) )
populate_slice ( ) ( populate_slice ( ) (
@ -513,8 +513,8 @@ create_i386_diskimage ( ) (
-y ${NANO_HEADS}` -y ${NANO_HEADS}`
else else
echo "Creating md backing file..." echo "Creating md backing file..."
dd if=/dev/zero of=${IMG} bs=${NANO_SECTS}b \ rm -f ${IMG}
count=`expr ${NANO_MEDIASIZE} / ${NANO_SECTS}` dd if=/dev/zero of=${IMG} seek=${NANO_MEDIASIZE} count=0
MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \ MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \
-y ${NANO_HEADS}` -y ${NANO_HEADS}`
fi fi