[NanoBSD] Double copy when using swap as backing?
Arrigo Marchiori
ardovm at yahoo.it
Wed Sep 23 16:07:36 UTC 2015
Hello list,
I was looking at the nanobsd.sh script from 10-STABLE and I found
something that I could not understand.
In function create_diskimage(), lines 639-650 result in two
invocations of dd:
1- if NANO_IMAGE_MBRONLY is `yes':
dd if=/dev/${MD} of=${NANO_DISKIMGDIR}/_.disk.mbr bs=512 count=1
dd conv=sparse if=/dev/${MD} of=${IMG} bs=64k
2- otherwise:
dd if=/dev/${MD} of=${IMG} bs=64k
dd conv=sparse if=/dev/${MD} of=${IMG} bs=64k
Case 2 looks a duplicate to me; the first dd could be avoided. Or did
I miss anything?
I don't use swap-backed md's therefore I cannot experiment with that
part. I just wonder if it may help someone by speeding their builds
up.
Best regards,
--
rigo
http://rigo.altervista.org
More information about the freebsd-embedded
mailing list