> On Wed, Feb 01, 2017 at 12:29:22PM -0800, Paolo Bonzini wrote:
> > On 01/02/2017 08:40, Stefan Hajnoczi wrote:
> > >> +goto out_free_range;
> > >> +}
> > >> +
> > >> +if (dma_buf_write((uint8_t *)range, sizeof(range), )) {
> > >
> > > Did you mean sizeof(*range) * nr?
> >
> >
On Wed, Feb 01, 2017 at 12:29:22PM -0800, Paolo Bonzini wrote:
> On 01/02/2017 08:40, Stefan Hajnoczi wrote:
> >> +goto out_free_range;
> >> +}
> >> +
> >> +if (dma_buf_write((uint8_t *)range, sizeof(range), )) {
> >
> > Did you mean sizeof(*range) * nr?
>
> Did you also mean
On 01/02/2017 08:40, Stefan Hajnoczi wrote:
>> +range = g_new(NvmeDsmRange, nr);
>> +
>> +if (nvme_map_prp(, le64_to_cpu(cmd->prp1), le64_to_cpu(cmd->prp2),
>> +sizeof(range), n)) {
This should be sizeof(*range) * nr, like the DMA below.
>> +goto out_free_range;
>>
On Mon, Jan 30, 2017 at 07:13:51PM +0100, Christoph Hellwig wrote:
> +static uint16_t nvme_dsm_discard(NvmeCtrl *n, NvmeNamespace *ns, NvmeCmd
> *cmd,
> +NvmeRequest *req)
> +{
> +uint16_t nr = (le32_to_cpu(cmd->cdw10) & 0xff) + 1;
> +uint8_t lba_index =
On Mon, Jan 30, 2017 at 07:13:51PM +0100, Christoph Hellwig wrote:
> Support deallocating of LBAs using the DSM command by wiring it up to
> the qemu discard implementation. The other DSM operations which are
> purely advisory are ignored for now.
>
> Based on an implementation by Keith Busch in
Support deallocating of LBAs using the DSM command by wiring it up to
the qemu discard implementation. The other DSM operations which are
purely advisory are ignored for now.
Based on an implementation by Keith Busch in the qemu-nvme.git repository,
but rewritten to use the qemu AIO