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

the media check problem

I've been doing some tests to see what works and what does not in 
the context of the media check problem. A lot of us have to turn of 
dma in order for the media check to work.

This is my current thoughts that I would love to get some comments 
about from someone who knows the kernel.

1) It's the read ahead that causes the problem. If one use
   hdparm and set the read ahead to 0 on the device, then I have
   no problem to verify a cd using dd.

2) When I mount the cd then I can check the md5sum of every file and it is 
   correct no matter what read ahead is set to.

   When a filesystem is mounted we know the exact size of the track. Does 
   the filesystem layer pass on that information to the block device so
   it knows it should not read past the end (even when doing read 

   If it doesn't, then why doesn't it read past the end when the
   fs is mounted?
3) Given that it does work as I guess in point 2, then shouldn't the 
   read ahead on a cdrom device be 0 until we know the max size to 
   prevent it from reading past the end? Before we know the end then
   it's dangerous to read ahead and we should just read what is asked 

4) When DMA is turned off then we read block by block and when we hit
   and error the previous blocks are already read in and valid.  With DMA
   it looks like we tell the drive to read lots of blocks, and then when 
   it breaks we signal back an error directly and the valid blocks in
   the beginning of the DMA request are also lost.

5) Does the read ahead buy us much extra speed when installing? Could it
   be set to 0 by anaconda for everyone in order to help those of us
   where it is a problem.

6) Is read ahead the problem for everyone or is it just something
   that makes it work on my hardware.

My next step should be to read the kernel source to verify the above. So
far it's just guesses based on my intuition of how this is implemented. I
want to present it here first and see what people have to say about it
before I spend days (or weeks) trying to understand the block and ide code
in the kernel.

Maybe someone like Alan Cox (but not limited to him!) will look at this
and say it's stupid, and then I don't need to read the code :-)

/Dennis Björklund

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