linux/drivers/ide
Bartlomiej Zolnierkiewicz 395d8ef5be ide-disk: fix flush requests (take 2)
commit 813a0eb233
Author: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Date:   Fri Jan 25 22:17:10 2008 +0100

    ide: switch idedisk_prepare_flush() to use REQ_TYPE_ATA_TASKFILE requests

...

broke flush requests.

Allocating IDE command structure on the stack for flush requests is not
a very brilliant idea:

- idedisk_prepare_flush() only prepares the request and it doesn't wait
  for it to be completed

- there are can be multiple flush requests queued in the queue

Fix the problem (per hints from James Bottomley) by:
- dynamically allocating ide_task_t instance using kmalloc(..., GFP_ATOMIC)
- adding new taskfile flag (IDE_TFLAG_DYN)
- calling kfree() in ide_end_drive_command() if IDE_TFLAG_DYN is set
  (while at it rename 'args' to 'task' and fix whitespace damage)

[ This will be fixed properly before 2.6.25 but this bug is rather
  critical and the proper solution requires some more work + testing. ]

Thanks to Sebastian Siewior and Christoph Hellwig for reporting the
problem and testing patches (extra thanks to Sebastian for bisecting
it to the guilty commmit).

Tested-by: Sebastian Siewior <ide-bug@ml.breakpoint.cc>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Tejun Heo <htejun@gmail.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-11 00:32:14 +01:00
..
arm bast-ide: build fix 2008-02-11 00:32:14 +01:00
cris ide: remove ide_setup_ports() 2008-02-06 02:57:50 +01:00
h8300 ide: add struct ide_port_info instances to legacy host drivers 2008-02-02 19:56:31 +01:00
legacy ide: fix ide/legacy/gayle.c compilation 2008-02-11 00:32:14 +01:00
mips ide: add IDE_HFLAG_NO_{IO32_BIT,UNMASK_IRQS} host flags 2008-02-02 19:56:40 +01:00
pci pdc202xx_old: always enable burst mode 2008-02-11 00:32:13 +01:00
ppc aout: remove unnecessary inclusions of {asm, linux}/a.out.h 2008-02-08 09:22:30 -08:00
ide-acpi.c drivers/ide/ide-acpi.c: fix uninitialized var warning 2008-02-06 02:57:49 +01:00
ide-cd_ioctl.c ide-cd: move the remaining cdrom.c ioctl handling code to ide-cd_ioctl.c 2008-02-01 23:09:29 +01:00
ide-cd_verbose.c ide-cd: move VERBOSE_IDE_CD_ERRORS code to ide-cd_verbose.c 2008-02-01 23:09:23 +01:00
ide-cd.c ide-cd: replace ntohs with generic byteorder macro be16_to_cpu 2008-02-11 00:32:13 +01:00
ide-cd.h ide: delete filenames/versions from comments 2008-02-01 23:09:33 +01:00
ide-disk.c ide-disk: fix flush requests (take 2) 2008-02-11 00:32:14 +01:00
ide-dma.c ide: introduce CONFIG_BLK_DEV_IDEDMA_SFF option 2008-02-11 00:32:14 +01:00
ide-floppy.c ide: add ide_read_error() inline helper 2008-02-06 02:57:51 +01:00
ide-generic.c ide-generic: probing bugfix 2008-02-06 02:57:48 +01:00
ide-io.c ide-disk: fix flush requests (take 2) 2008-02-11 00:32:14 +01:00
ide-iops.c ide: insert BUG_ON() into __ide_set_handler() (take 2) 2008-02-11 00:32:12 +01:00
ide-lib.c ide: add ide_read_error() inline helper 2008-02-06 02:57:51 +01:00
ide-pnp.c ide: fix ide_unregister() usage in host drivers 2008-02-02 19:56:39 +01:00
ide-probe.c cleanup after APUS removal 2008-02-06 10:41:01 -08:00
ide-proc.c Palmchip BK3710 IDE driver 2008-02-06 02:57:48 +01:00
ide-scan-pci.c ide: small ide-scan-pci.c cleanup 2008-02-01 23:09:16 +01:00
ide-tape.c ide-tape: remove never executed code 2008-02-11 00:32:14 +01:00
ide-taskfile.c ide: add ide_read_error() inline helper 2008-02-06 02:57:51 +01:00
ide-timing.h Spelling fixes: lenght->length 2008-02-03 15:42:53 +02:00
ide.c ide: remove stale version number 2008-02-11 00:32:13 +01:00
Kconfig ide: introduce CONFIG_BLK_DEV_IDEDMA_SFF option 2008-02-11 00:32:14 +01:00
Makefile ide-cd: move code handling cdrom.c IOCTLs to ide-cd_ioctl.c 2008-02-01 23:09:25 +01:00
setup-pci.c ide: add struct ide_port_info instances to legacy host drivers 2008-02-02 19:56:31 +01:00