Re: [Cbe-oss-dev] [regression/bisected] corrupt CD data after media change and delay

Geert Uytterhoeven
2008-06-10T15:43:58Z

[-- Attachment #1: Type: TEXT/PLAIN, Size: 3226 bytes --]

Hi James,

On Mon, 9 Jun 2008, James Bottomley wrote:
> My best guess is that it's something to do with eaten UNIT_ATTENTION
> keys. I theorise that in the successful case, they get processed in
> scsi_io_completion which sets the changed bit. In the delay case, the
> unit attention is eaten by sr_test_unit_ready so the changed bit is
> always kept at zero. If this is the case, then the patch below should
> fix it. If not, we're back to more debugging ...

Yep, that fixed it. Thanks!

Inserting first CD, mounting:

| +0+ the_result = 0x8000002 (sdev->changed = 1)
| Sense Key : 0x0 [current] [descriptor]
| +0+ the_result = 0x8000002 (sdev->changed = 1)
| Sense Key : 0x0 [current] [descriptor]
| +0+ the_result = 0x8000002 (sdev->changed = 1)
| Sense Key : 0x0 [current] [descriptor]
| Sense Key : 0x2 [current]
| +5+ CDS_DISC_OK
| +0+ the_result = 0x8000002 (sdev->changed = 1)
| Sense Key : 0x0 [current] [descriptor]
| +0+ the_result = 0x8000002 (sdev->changed = 1)
| Sense Key : 0x0 [current] [descriptor]
| +0+ the_result = 0x8000002 (sdev->changed = 1)
| Sense Key : 0x0 [current] [descriptor]
| Sense Key : 0x2 [current]
| +5+ CDS_DISC_OK
| +0+ the_result = 0x0 (sdev->changed = 1)
| Sense Key : 0x0 [current] [descriptor]
| +1+ CDS_DISC_OK
| +0+ the_result = 0x0 (sdev->changed = 1)
| Sense Key : 0x0 [current] [descriptor]
| +1+ CDS_DISC_OK
| +0+ the_result = 0x0 (sdev->changed = 1)
| Sense Key : 0x0 [current] [descriptor]
| +11+ Return forcing update is 1
^
OK

| ISO 9660 Extensions: RRIP_1991A

Unmounting first CD:

| +0+ the_result = 0x0 (sdev->changed = 0)
| Sense Key : 0x0 [current] [descriptor]
| +1+ CDS_DISC_OK
| +0+ the_result = 0x0 (sdev->changed = 0)
| Sense Key : 0x0 [current] [descriptor]
| +1+ CDS_DISC_OK
| +0+ the_result = 0x0 (sdev->changed = 0)
| Sense Key : 0x0 [current] [descriptor]
| +11+ Return forcing update is 0

Inserting second CD, mounting after 30 seconds:

| +0+ the_result = 0x8000002 (sdev->changed = 1)
| Sense Key : 0x0 [current] [descriptor]
| +0+ the_result = 0x0 (sdev->changed = 1)
| Sense Key : 0x0 [current] [descriptor]
| +1+ CDS_DISC_OK
| +0+ the_result = 0x0 (sdev->changed = 1)
| Sense Key : 0x0 [current] [descriptor]
| +1+ CDS_DISC_OK
| +0+ the_result = 0x0 (sdev->changed = 1)
| Sense Key : 0x0 [current] [descriptor]
| +1+ CDS_DISC_OK
| +0+ the_result = 0x0 (sdev->changed = 1)
| Sense Key : 0x0 [current] [descriptor]
| +1+ CDS_DISC_OK
| +0+ the_result = 0x0 (sdev->changed = 1)
| Sense Key : 0x0 [current] [descriptor]
| +11+ Return forcing update is 1
^
OK!

| ISO 9660 Extensions: Microsoft Joliet Level 3
| ISO 9660 Extensions: RRIP_1991A

=> success!

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

Sony Technology and Software Centre Europe
A division of Sony Service Centre (Europe) N.V.
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
VAT BE 0413.825.160 · RPR Brussels
Fortis 293-0376800-10 GEBA-BE-BB