[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#4557: Last file on iso9660-image always corrupted



I have had some time to work on this problem, and my conclusions are that
this is not a fault in mkisofs. I took a look at write.c (in the mkisofs
source) and could not see how the last file would be treated any
differently than any other file (the same routine writes the first file as
writes the last one, and computes the file size from the file on disk). If
there were a buffer miscounting problem I would expect it to happen for
every file (which it does not).
So, I built a path with one file in it (README) with one line in the file
and did a mkisofs on that path. Mounting it with the loop device and then
trying to cp/cat/mv the file gives an I/O error. However, if I cat the iso
file created by mkisofs, the last record in the file contains the complete
README file.
When I asked about this problem several months ago on linux-kernel, I was
told that this I/O error comes from the driver's attempt to "read ahead"
on the drive. This doesn't happen on an "aluminum" CD because all
remaining sectors are formated (although empty). My additional experience
was, that, if I read the CD on a DOS machine I get no errors.
This file was the LAST record in the file. If the Linux driver tries to
"read ahead" the next sector, it will surely fail.
On thing that mkisofs could do, would be to add one/several blank record
after the last file.
A close reading of cdwrite shows the -P, --pad option has been added to
cdwrite to take care of Linux's read failures under these circumstances. 
The net result of all this is that the bug should probably be marked done,
unless there is some reasonable argument for making mkisofs resolve the
problem at creation time.

Luck,

Dwarf

------------                                          --------------

aka   Dale Scheetz                   Phone:   1 (904) 877-0257
      Flexible Software              Fax:     NONE 
      Black Creek Critters           e-mail:  dwarf@polaris.net

------------ If you don't see what you want, just ask --------------



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com


Reply to: