lkml.org 
[lkml]   [1997]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdesign bug in ISO9660 fs code
the ISO9690 file system code (or buffer cache?) has a bad design bug (at least in my eyes).
when mapping filenames from upper to lower case, it will modify the file names
in original data which will stay in the buffer cache.

even when the filesystem gets unmounted, this changed data still stick
in the buffers and when you try to make a copy of this isofs now,
ISO9660 file name is corrupt (lower case) and as a result e.g. you can't
read these files anymore in MSDOS.

trashing memory/buffer cache or running "flushb" on the device before
reading the isofs data seems to fix this but I don't think this should
be necessary.

at least after umount, these modified buffers should be flushed IMHO.
otherwise, e.g. mounting a freshly mastered isofs to do some last
minutes checks will trash the data and if you're trying to burn
a CDR afterwards, data will be broken :-(


please try the following:

cd /tmp
mkisofs /usr/src/linux/fs > iso.orig

swapoff /dev/swap2 # (or use any other spare partition...)
cp iso.orig /dev/swap2
mount -t iso9660 /dev/swap2 /mnt
ls -lR /mnt > /dev/null
umount /mnt
dd if=/dev/swap2 bs=`wc -c < iso.orig` count=1 of=iso.copy1
mount -t iso9660 /dev/swap2 /mnt
umount /mnt
dd if=/dev/swap2 bs=`wc -c < iso.orig` count=1 of=iso.copy2
cmp -l iso.orig iso.copy1 | wc
cmp -l iso.orig iso.copy2 | wc

why does `mount -o map=off ...' flush buffers (as iso.copy2 isn't corrupted anymore) ?
instead of using `cmp' for comparison you can also do

cp iso.orig /dev/swap2
mount -o map=off -t iso9660 /dev/swap2 /mnt
ls -l /mnt
umount /mnt

cp iso.copy1 /dev/swap2
mount -o map=off -t iso9660 /dev/swap2 /mnt
ls -l /mnt
umount /mnt



comments ?


Harald
--
All SCSI disks will from now on ___ _____
be required to send an email notice 0--,| /OOOOOOO\
24 hours prior to complete hardware failure! <_/ / /OOOOOOOOOOO\
\ \/OOOOOOOOOOOOOOO\
\ OOOOOOOOOOOOOOOOO|//
Harald Koenig, \/\/\/\/\/\/\/\/\/
Inst.f.Theoret.Astrophysik // / \\ \
koenig@tat.physik.uni-tuebingen.de ^^^^^ ^^^^^

\
 
 \ /
  Last update: 2005-03-22 13:39    [W:0.037 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site