9front uses a (older) variant of the 9atom ide driver.

from arisawas's output, it seems that the write command times out
in atagenio():

                iowait(drive, 30*1000, 0);
                if(!ctlr->done){
                        /*
                         * What should the above timeout be? In
                         * standby and sleep modes it could take as
                         * long as 30 seconds for a drive to respond.
                         * Very hard to get out of this cleanly.
                         */
                        atadumpstate(drive, r, lba, count);
                        ataabort(drive, 1);
                        qunlock(ctlr);
                        return atagenioretry(drive, r, lba, count);
                }

atagenioretry() will just cause the command to be retried in pio mode
when it previously was failing in dma mode. think this what erik means
with "assumes dma doesnt work". dma is already off so we fail the
request.

i doubt this is missed interrupts. iowait() calls the interrupt handler
itself before giving up. you can even check, as the driver keeps statistics
about missed interrupts in the ctl file.

the drive seems to not complete the command within the timeout.

what i would try is to check if reading the offending sectors produce
i/o errors as well with dd.

where these sectors ever written before? i dd /dev/zero over the whole
drive before initializing filesystems on it. was something similar done
here as well?

could this be a prblem with the drive going into standby mode and then
the next command taking too long to complete because drive is slow to
spin up?

--
cinap

Reply via email to