diff options
| author | Alexander Motin <mav@FreeBSD.org> | 2009-05-01 08:03:46 +0000 |
|---|---|---|
| committer | Alexander Motin <mav@FreeBSD.org> | 2009-05-01 08:03:46 +0000 |
| commit | b1d1fff76c4af942f0d88ca60f5dc4f2fe5b3e5e (patch) | |
| tree | 3b444d7537d6bdd164161094c9099ba3ec128c40 /sys/dev/ata/ata-disk.c | |
| parent | 59dffaa08801c9605184f5dc5d0369652db227a8 (diff) | |
Notes
Diffstat (limited to 'sys/dev/ata/ata-disk.c')
| -rw-r--r-- | sys/dev/ata/ata-disk.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c index e11f3f90fb2e..15b9edc30b2c 100644 --- a/sys/dev/ata/ata-disk.c +++ b/sys/dev/ata/ata-disk.c @@ -346,15 +346,23 @@ ad_dump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t length) { struct disk *dp = arg; + device_t dev = dp->d_drv1; struct bio bp; + /* XXX: Drop pre-dump request queue. Long request queue processing + * causes stack overflow in ATA working in dumping (interruptless) mode. + * Conter-XXX: To make dump coherent we should avoid doing anything + * else while dumping. + */ + ata_drop_requests(dev); + /* length zero is special and really means flush buffers to media */ if (!length) { - struct ata_device *atadev = device_get_softc(dp->d_drv1); + struct ata_device *atadev = device_get_softc(dev); int error = 0; if (atadev->param.support.command2 & ATA_SUPPORT_FLUSHCACHE) - error = ata_controlcmd(dp->d_drv1, ATA_FLUSHCACHE, 0, 0, 0); + error = ata_controlcmd(dev, ATA_FLUSHCACHE, 0, 0, 0); return error; } |
