[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/3] ide: add TRIM support
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH 3/3] ide: add TRIM support |
Date: |
Fri, 10 Jun 2011 16:04:55 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Thunderbird/3.1.10 |
Am 19.05.2011 10:58, schrieb Christoph Hellwig:
> Add support for TRIM sub function of the data set management command,
> and wire it up to the qemu discard infrastructure.
>
> Signed-off-by: Christoph Hellwig <address@hidden>
> Index: qemu/hw/ide/pci.c
> ===================================================================
> --- qemu.orig/hw/ide/pci.c 2011-05-18 20:28:17.153625872 +0200
> +++ qemu/hw/ide/pci.c 2011-05-18 20:33:06.102141553 +0200
> @@ -205,6 +205,9 @@ static void bmdma_restart_bh(void *opaqu
> }
> } else if (bm->status & BM_STATUS_RETRY_FLUSH) {
> ide_flush_cache(bmdma_active_if(bm));
> + } else if (bm->status & BM_STATUS_RETRY_TRIM) {
> + bm->status &= ~BM_STATUS_RETRY_TRIM;
> + bmdma_restart_dma(bm, IDE_DMA_TRIM);
> }
> }
Just noticed that this is wrong. BM_STATUS_DMA_RETRY is always set at
the same time, so this is dead code.
Kevin