Comment 18 for bug 203984

Revision history for this message
Colin Ian King (colin-king) wrote : Re: [hardy beta] [amd64] squashfs errors on resume from desktop cd

Chris,

I've examined this bug by putting copious amounts of debug in squashfs and building a debugged version of the live CD. I've then tracking this through the scsi subsystem down to the ata driver level. I believe the bug is an underlying ata driver issue which may not be easily resolved in 2.6.24.

Basically, the squashfs filesystem is loop back mounted from the file casper/filesystem.squashfs on the live CD. When the system goes into suspend/cycle, the ata driver is not suspended/resumed correctly causing I/O reads in the block layer to fail which ultimately causes squashfs to produce the error messages.

Originally I thought this looked like just an 64 bit kernel issue, but one can reproduce this bug with the 32 it version as well by selection one of the consoles, suspending and resuming and immediately the machine resumes type a command that is not cached in memory. This forces squashfs to read some blocks off the CD (from the loop back mounted filesytem squashfs image) and the ata driver fails with an I/O error - mainly because it is in a unknown state because suspend may not be implemented for the ata controller.

One can show this is not a squashfs bug by inserting any CD-ROM and running dd on an installed Hardy system:

sudo dd if=/dev/scd0 of=/dev/zero

and doing a suspend resume cycle.

The mystery is why this succeeds with non CD-ROM drives such as a hard disk over a suspend/resume cycle, e.g.:

sudo dd if=/dev/sda of=/dev/zero

I conclude that the crux of the matter is the implementation of suspend resume for your ata driver. Looking at http://ata.wiki.kernel.org/index.php/Software_status it states:

"System suspend/resume (suspend-to-RAM, suspend-to-disk) is currently supported for ata_piix, ahci, sata_sil and sata_sil24 drivers.

ACPI support is also needed in certain situations, to ensure that Linux properly initializes the device on boot, and after resume. A patch from Intel is available in -mm and libata-dev.git for this. "

I shall see if the patch is applicable and resolved the issue.

Colin