Re: New cdrwtool (trying to format too many blocks)
On Sat, 9 Feb 2002, Sergiy Kudryk wrote:
With Windows Direct CD 5.0 (2.54) i dont' have any problem. I use several new Verbatim CDRW discs. Under Linux i always see errors "Ignoring read error on sector" :-( .
If pktcdvd found error on disc he simply skip copying data into that sector ?
This error message happens when the kernel asks the packet driver to write an incomplete packet. In that case the driver first has to read the missing part of the packet from the disc, and then write the whole packet back to disc. If the read fails, this error message is printed, and the packet driver has two choices, both bad: 1. It could skip copying data to the disc. 2. It could copy the new data to the disc, even though it doesn't know how to preserve the old data. (because reading the old data failed.) The packet driver currently chooses the second alternative, but that's not the problem. It would be equally bad to choose the first alternative. The real mystery is why the read fails. I have seen some drives reporting "device not ready, long write in progress" when you send them a read request while they are writing a packet. However, the packet writing patch includes modifications in the scsi layer to handle this case and retry the read request until it succeeds. If you are using an ide cdrw without scsi emulation, this retry logic is not being used, but with scsi emulation (which I think you are using) it is used. Maybe the read requests can fail for other reasons that are not detected by the scsi layer retry logic? I don't know yet.
Another thing you could try is to make the read speed equal to the write speed. Your drive/disc combination seemed to be able to handle 8x, so you could use this patch. (I have no idea if this will really help.)
Thanks but i can't apply this patch to pktcdvd.c - too many rejected strings:
This is probably because you have already changed the argument to pkt_adjust_speed manually, as I suggested previously. Just make sure that this value is not larger than the maximum write speed supported by your drive/disc. -- Peter Osterlund - petero2@telia.com http://w1.894.telia.com/~u89404340
--- Peter Osterlund
On Sat, 9 Feb 2002, Sergiy Kudryk wrote:
With Windows Direct CD 5.0 (2.54) i dont' have any problem. I use several new Verbatim CDRW discs. Under Linux i always see errors "Ignoring read error on sector" :-( .
If pktcdvd found error on disc he simply skip copying data into that sector ?
This error message happens when the kernel asks the packet driver to write an incomplete packet.
So something wrong with my kernel ?
In that case the driver first has to read the missing part of the packet from the disc, and then write the whole packet back to disc.
Sorry i not get you. Read from source (HDD for example) ?
If the read fails, this error message is printed, and the packet driver has two choices, both bad:
1. It could skip copying data to the disc. 2. It could copy the new data to the disc, even though it doesn't know how to preserve the old data. (because reading the old data failed.)
The packet driver currently chooses the second alternative, but that's not the problem. It would be equally bad to choose the first alternative.
The real mystery is why the read fails. I have seen some drives reporting "device not ready, long write in progress" when you send them a read request while they are writing a packet.
So maybe better to implement next scheme: 1. read drive status 2. if status = "ready for writing" write a packet. 3. if status = "busy" wait a def. time and goto point "1".
However, the packet writing patch includes modifications in the scsi layer to handle this case and retry the read request until it succeeds.
As i understand patch is related to pktcdvd.c, not to ide-scsi.c ...
If you are using an ide cdrw without scsi emulation, this retry logic is not being used, but with scsi emulation (which I think you are using) it is used.
Yes, i use ide-scsi emulation. Without emulation i get the same errors.
Maybe the read requests can fail for other reasons that are not detected by the scsi layer retry logic? I don't know yet.
Maybe buffer underrun problem ?
Another thing you could try is to make the read speed equal to the write speed. Your drive/disc combination seemed to be able to handle 8x, so you could use this patch. (I have no idea if this will really help.)
Thanks but i can't apply this patch to pktcdvd.c - too many rejected strings:
This is probably because you have already changed the argument to pkt_adjust_speed manually, as I suggested previously. Just make sure that this value is not larger than the maximum write speed supported by your drive/disc.
Thanks, i return old value and successfully compile patched pktcdvd module. Take new disc, format it, check with chkudf - ok. Then i do next: # pktcdvd /dev/pktcdvd0 /mnt/sr0 # mount /dev/pktcdvd0 /mnt/cdrw -t udf rw,noatime # mkdir /./mnt/cdrw/dsb .. wait a minute until pktcdvd0 start to write changes to CDRW disc # tail -n 120 /./var/log/messages Feb 11 17:52:33 my kernel: Attached scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0 Feb 11 17:52:33 my kernel: sr0: scsi3-mmc drive: 32x/32x writer cd/rw xa/form2 cdda tray Feb 11 17:52:33 my kernel: Uniform CD-ROM driver Revision: 3.12 Feb 11 17:57:17 my kernel: pktcdvd: writer sr0 sucessfully registered Feb 11 17:57:19 my kernel: pktcdvd: inserted media is CD-RW Feb 11 17:57:19 my kernel: pktcdvd: Fixed packets, 32 blocks, Mode-2 disc Feb 11 17:57:19 my kernel: pktcdvd: speed (R/W) 12/8 Feb 11 17:57:19 my kernel: pktcdvd: 551488kB available on disc Feb 11 17:57:20 my kernel: UDF-fs INFO UDF 0.9.5-rw (2001/10/10) Mounting volume 'LinuxUDF', timestamp 2002/02/11 16:07 (1078) Feb 11 17:57:54 my kernel: I/O error: dev 0b:00, sector 5900 Feb 11 17:57:54 my kernel: Ignoring read error on sector:5900 ... # ls /./mnt/cdrw/ ls: /./mnt/cdrw/lost+found: Permission denied dsb So as you can see errors appears ever when small portion of data is writed to CDRW disc. Any comments ????? Why i get access denied to lost+found directory ? When i again try to copy big file (500 MB, movie) to CDRW disc i get after minute "no space left on device", but drive don't locks. Any help will be appreciated. Regards, Sergiy Kudryk.
-- Peter Osterlund - petero2@telia.com http://w1.894.telia.com/~u89404340
-- To unsubscribe, e-mail: packet-writing-unsubscribe@suse.com For additional commands, e-mail: packet-writing-help@suse.com
__________________________________________________ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com
On Mon, 11 Feb 2002, Sergiy Kudryk wrote:
--- Peter Osterlund
wrote: On Sat, 9 Feb 2002, Sergiy Kudryk wrote:
With Windows Direct CD 5.0 (2.54) i dont' have any problem. I use several new Verbatim CDRW discs. Under Linux i always see errors "Ignoring read error on sector" :-( .
If pktcdvd found error on disc he simply skip copying data into that sector ?
This error message happens when the kernel asks the packet driver to write an incomplete packet.
So something wrong with my kernel ?
No, this is completely normal. The kernel likes to think the CD is partitioned into 2048 byte sectors. Therefore it can ask the packet driver to write a 2048 byte sector to the CDRW disc. However, you can not write a single sector to a CDRW disc, you have to write a full packet, which is normally 32 sectors. Therefore, the packet driver first has to read the 31 missing sectors from the CDRW disc, before it can write back the whole 32 sector packet. The "ignoring read error" message is printed when the reads fail.
However, the packet writing patch includes modifications in the scsi layer to handle this case and retry the read request until it succeeds.
As i understand patch is related to pktcdvd.c, not to ide-scsi.c ...
The packet writing patch modifies scsi_lib.c which is used by ide-scsi.c.
Maybe the read requests can fail for other reasons that are not detected by the scsi layer retry logic? I don't know yet.
Maybe buffer underrun problem ?
I don't think so. AFAIK, buffer underruns can only make writes fail, not reads. And even for writes, buffer underruns should never happen in packet writing mode. Maybe activating scsi logging will provide some clue as to what goes wrong. Here is a test you can do. Active the kernel config options "Verbose SCSI error reporting" and "SCSI logging facility" and recompile. After booting the new kernel, enable full scsi logging: echo "scsi log all" >/proc/scsi/scsi (as root) Set up the pktcdvd device as usual and do your tests to make the "ignoring read error" message appear. Then mail me a copy of the kernel messages. -- Peter Osterlund - petero2@telia.com http://w1.894.telia.com/~u89404340
On Mon, 11 Feb 2002, Peter Osterlund wrote:
Maybe activating scsi logging will provide some clue as to what goes wrong. Here is a test you can do. Active the kernel config options "Verbose SCSI error reporting" and "SCSI logging facility" and recompile. After booting the new kernel, enable full scsi logging:
echo "scsi log all" >/proc/scsi/scsi (as root)
Btw, this assumes your hard disks are IDE disks. If syslogd tries to write the log file to a scsi hard disk, this test may cause an infinite sequence of log messages. (At least I think so, I don't have any scsi disks to test with.) -- Peter Osterlund - petero2@telia.com http://w1.894.telia.com/~u89404340
participants (2)
-
Peter Osterlund
-
Sergiy Kudryk