Package: dphys-swapfile
Version: 20100506-3
Severity: important
The setup subcommand uses fallocate(1) which sometimes creates spare
files. Those cannot be used for swapfiles as "swapon" will fail with
"swapfile has holes".
Always using dd instead of fallocate seems better as it ensures the
generated swapfile is valid. The fact that it takes more time than
fallocate is also a good thing, since it done synchronously.
Offending part:
# use fallocate if found to create swapfile, else use dd
type fallocate > /dev/null
if [ $? -eq 0 ]; then
fallocate -l "${CONF_SWAPSIZE}"M "${CONF_SWAPFILE}" 2> /dev/null
else
dd if=/dev/zero of="${CONF_SWAPFILE}" bs=1048576 \
count="${CONF_SWAPSIZE}" 2> /dev/null
fi
Notes:
* this bug is subtly different from #906767.
* I'm using f2fs a the root fs
* There is enough space left
--
Steve Schnepp
"A man is not dead while his name is still spoken."
-- T. Pratchett - Going Postal, Chapter 4 prologue