Bug#502452: kernel: UDF written file corrupted by zeros
Package: kernel
Version: 2.6.24-etchnhalf.1-amd64
Severity: important
Due to existing bugs I had with UDF in kernel 2.6.18, I use 2.6.24 for 8
days.
With 2.6.18 some file were not copied/created, when my log file was mainly
right.
With 2.6.24 my log file is corrupt.
Some monthes ago, I made one script which copy files to the 33 Gbytes IOMEGA /dev/hda
drive I formatted just before, with udf filesystem, in the same time it
writes the text log file.
Everithing looks nice, but begin of log file contains null bytes till
around offset 0x06e3, when begin of this text file is missing.
The log file is obtained by redirecting stdout.
Disk was formated with:
dd if=/dev/zero of=$DEV bs=512 count=64
/usr/bin/mkudffs --lvid="$LABEL" --vid="$LABEL" --vsid="$LABEL"
--fsid=$label --media-type=hd $DEV &&
mount -i -t udf $DEV $MNT &&
(
echo -e "Role:Archivage hebdomadaire\nnum:Cartouche $label" >
/mnt/iomega/identifiant.txt
umount $DEV
)
Log file is created with the following command:
sauvegarde >$DEST/log/log.log
Function sauvegarde begins with:
presente_date ()
{
echo -n " "
date
}
indente ()
{
sed -u 's/^/ /g'
}
sauvegarde ()
{
echo -n " A la date du "; date # FIXME pour process de verification de
date
echo
echo Sauvegarde de $SOURCE vers $DEST
presente_date
cd $SOURCE
echo "i varie dans " *
for i in *
do
if [ -d $i ]
then
(
if pushd $i
then
echo "j varie dans " * &&
for j in *
do
if [ ! -f $toto ]
then
echo " bof"
continue
fi
echo
echo "** Traitement de $i/$j"
presente_date
if [ $OPTION_CHERCHE_ANTIVIRUS -eq 1 ]
then
echo " Recherche d'antivirus dans $i/$j"
clamscan -ri --detect-broken --block-encrypted
--block-max --max-files=2000 --max-space=100M $j
presente_date
else
echo " Desactivation de la recherche antivirus,
pour les performances"
fi
echo "Archivage de $i/$j"
destname=$DEST/data/${i}_"$j"
(
echo "$destname"
if [ -f "$j" ] # guillemets "" pour les noms de fichiers
à espace
then
cp "$j" $DEST/data/${i}_"$j"
#cp "$j" "$destname"
else
echo " " tar czf $DEST/data/${i}_"$j".tgz $j
echo " " tar czf "$destname".tgz $j
#tar czf "$destname".tgz $j ||
tar cz --ignore-failed-read -f
$DEST/data/${i}_"$j".tgz $j ||
(
echo "ECHEC ARCHIVAGE TAR non splité" &&
-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.24-etchnhalf.1-amd64
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Reply to: