linux/drivers
Tejun Heo 6013efd886 libata: retry failed FLUSH if device didn't fail it
If ATA device failed FLUSH, it means that the device failed to write
out some amount of data and the error needs to be reported to upper
layers. As retries can't recover the lost data, FLUSH failures need to
be reported immediately in general.

However, if FLUSH fails due to transmission errors, the FLUSH needs to
be retried; otherwise, filesystems may switch to RO mode and/or raid
array may drop a drive for a random transmission glitch.

This condition can be rather easily reproduced on certain ahci
controllers which go through a PHY event after powersave mode switch +
ext4 combination.  Powersave mode switch is often closely followed by
flush from the filesystem failing the FLUSH with ATA bus error which
makes the filesystem code believe that data is lost and drop to RO
mode.  This was reported in the following bugzilla bug.

  http://bugzilla.kernel.org/show_bug.cgi?id=14543

This patch makes libata EH retry FLUSH if it wasn't failed by the
device.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Andrey Vihrov <andrey.vihrov@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-12-03 02:46:35 -05:00
..
accessibility
acpi Merge branch 'thinkpad-2.6.32' into release 2009-11-25 00:43:08 -05:00
amba
ata libata: retry failed FLUSH if device didn't fail it 2009-12-03 02:46:35 -05:00
atm net: Make setsockopt() optlen be unsigned. 2009-09-30 16:12:20 -07:00
auxdisplay
base PM: fix irq enable/disable in runtime PM code 2009-11-29 16:51:27 +01:00
block aoe: prevent cache aliases 2009-12-01 16:32:20 -08:00
bluetooth fix memory leak in fixed btusb_close 2009-11-14 12:57:08 -08:00
cdrom sysctl: remove "struct file *" argument of ->proc_handler 2009-09-24 07:21:04 -07:00
char tty_port: handle the nonblocking open of a dead port corner case 2009-11-30 16:38:25 -08:00
clocksource
connector connector: Fix incompatible pointer type warning 2009-10-06 01:39:51 -07:00
cpufreq [CPUFREQ] Fix stale cpufreq_cpu_governor pointer 2009-11-17 23:15:04 -05:00
cpuidle cpuidle: always return with interrupts enabled 2009-10-29 07:39:31 -07:00
crypto crypto: padlock-aes - Use the correct mask when checking whether copying is required 2009-11-03 10:32:03 -05:00
dca
dio
dma shdma: fix initialization error handling 2009-11-22 12:10:10 -07:00
edac amd64_edac: fix CECCs reporting 2009-11-04 14:04:06 +01:00
eisa
firewire Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2009-11-30 13:58:23 -08:00
firmware iSCSI/iBFT: use proper address translation 2009-10-05 12:05:40 -07:00
gpio gpio: Langwell GPIO driver bugfixes 2009-12-01 16:32:19 -08:00
gpu Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel 2009-11-30 13:57:19 -08:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2009-10-13 10:10:33 -07:00
hwmon hwmon: (adt7475) Fix sysfs file names 2009-11-16 12:45:40 +01:00
i2c Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging 2009-11-30 14:50:44 -08:00
ide Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6 2009-11-30 14:02:34 -08:00
idle
ieee1394 headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
ieee802154 ieee802154: dont leak skbs in ieee802154_fake_xmit() 2009-11-19 13:16:21 -08:00
infiniband headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
input Input: i8042 - add Dell Vostro 1320, 1520 and 1720 to the reset list 2009-12-02 15:41:33 -08:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2009-11-18 14:54:45 -08:00
leds leds-gpio: fix possible crash on OF device unbinding 2009-11-16 11:50:42 +00:00
lguest headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
macintosh powerpc/pmac: Fix issues with sleep on some powerbooks 2009-10-14 16:58:35 +11:00
mca
md md: revert incorrect fix for read error handling in raid1. 2009-12-01 17:30:59 +11:00
media drivers/media/dvb/dvb-core/dvb_frontend.c: needs semaphore.h 2009-12-01 16:32:19 -08:00
memstick memstick: move dev_dbg 2009-09-24 07:21:05 -07:00
message headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
mfd mfd: Correct WM831X_MAX_ISEL_VALUE 2009-12-01 11:24:19 +01:00
misc at24: Use timeout also for read 2009-11-26 09:22:33 +01:00
mmc [ARM] pxamci: call mmc_remove_host() before freeing resources 2009-12-02 22:58:19 +08:00
mtd ARM: Fix warning in sa1100-flash.c 2009-11-16 16:13:35 +00:00
net Merge branch 'security' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2009-11-30 16:47:16 -08:00
nubus
of of: Remove nested function 2009-10-15 09:58:27 -06:00
oprofile oprofile: warn on freeing event buffer too early 2009-10-09 21:32:05 +02:00
parisc mm: replace various uses of num_physpages by totalram_pages 2009-09-22 07:17:38 -07:00
parport sysctl: remove "struct file *" argument of ->proc_handler 2009-09-24 07:21:04 -07:00
pci Fix handling of the HP/Acer 'DMAR at zero' BIOS error for machines with <4GiB RAM. 2009-11-19 13:42:02 -08:00
pcmcia PM / yenta: Split resume into early and late parts (rev. 4) 2009-11-03 10:54:58 +01:00
platform Merge branch 'misc-2.6.32' into release 2009-11-25 01:01:29 -05:00
pnp ACPI: remove acpi_device.flags.hardware_id 2009-09-25 15:09:48 -04:00
power Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2009-09-23 03:49:27 +04:00
pps pps: events reporting fix up 2009-11-12 07:26:01 -08:00
ps3
rapidio
regulator regulator: Initialise wm831x structure pointor for ISINK driver 2009-12-02 19:37:16 +00:00
rtc rtc-x1205: reset clock to sane state after power failure 2009-12-01 16:32:20 -08:00
s390 [S390] sclp: undo quiesce handler override on resume 2009-11-13 15:45:03 +01:00
sbus const: make block_device_operations const 2009-09-22 07:17:25 -07:00
scsi [SCSI] fix crash when disconnecting usb storage 2009-11-26 10:04:22 -06:00
serial tty/of_serial: add missing ns16550a id 2009-11-30 16:38:44 -08:00
sfi SFI: remove __init from sfi_verify_table 2009-10-03 01:16:12 -04:00
sh
sn
spi SPI: spi_txx9: Fix bit rate calculation 2009-12-02 23:58:32 +00:00
ssb ssb-pcmcia: Fix 32bit register access in early bus scanning 2009-11-10 16:21:12 -05:00
staging Staging: update TODO files 2009-11-30 16:39:42 -08:00
tc
telephony
thermal acpi: thermal: Add EOL to the trip_point_N_type strings 2009-11-05 17:33:24 -05:00
uio uio: pm_runtime_disable is needed if failed 2009-11-13 11:36:00 +09:00
usb USB: Add support for Mobilcom Debitel USB UMTS Surf-Stick to option driver 2009-11-30 16:43:17 -08:00
uwb headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
video VIDEO: Correct use of request_region/request_mem_region 2009-12-02 23:58:32 +00:00
virtio virtio: order used ring after used index read 2009-10-29 08:50:37 +10:30
vlynq drivers/vlynq/vlynq.c: fix resource size off by 1 error 2009-09-24 07:21:05 -07:00
w1 ds2482: Discard obsolete detect method 2009-10-04 22:53:41 +02:00
watchdog [PATCH] rc32434_wdt: fix compilation failure 2009-12-02 12:47:24 +00:00
xen headers: remove sched.h from poll.h 2009-10-04 15:05:10 -07:00
zorro
Kconfig
Makefile Merge git://git.infradead.org/mtd-2.6 2009-09-23 10:07:49 -07:00