Re: [PATCH 4/4] libata: improve media error handling

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

 



Tejun Heo wrote:
The ATA spec says "The amount of data transferred is indeterminate"
when READ/WRITE commands fail with error status.  TF regs contain the
address of the first sector which failed, but that's it.  libata
reports the reported sector to sd which assumes data upto the first
failed sector was transferred successfully.  This can result in data
corruption.

This patch implements highlevel command-aware recovery which currently
has only one recovery action - ata_eh_do_partial().  If the device
reports the first failed block, it tries to transfer upto that block.

SCSI sense generation is updated such that the first failed block is
reported to SCSI layer iff partial IO occurred.

Signed-off-by: Tejun Heo <htejun@xxxxxxxxx>
---
 drivers/ata/libata-eh.c   |  143 +++++++++++++++++++++++++++++++++++++++++++++
 drivers/ata/libata-scsi.c |   36 +++++++-----
 include/linux/libata.h    |    2 +
 3 files changed, 166 insertions(+), 15 deletions(-)

(finally reviewing a patch from a 3 months ago)

ACK, please resend at your leisure

In general, I have worries about how solid partial completion really is. I am mainly thinking of SCSI and VFS not libata, here. Your patch looks sane enough, so let's see how things go...

	Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux