Il 15/09/2014 22:07, John Snow ha scritto:
>>>
>>> -    /* free sglist that was created in ahci_populate_sglist() */
>>> -    qemu_sglist_destroy(&s->sg);
>>> +    /* free sglist, update byte count */
>>> +    ahci_commit_buf(dma, true);
>>
>> Perhaps you should make dma_buf_commit public (and add the call to the
>> hook), so that ahci_commit_buf does not have to mess with &s->sg.
>>
> 
> As above, the ahci layer is already messing around with &s->sg during
> preparation, so I don't see why I'd try to abstract this away from parts
> of that file.

I think it would make sense if you moved the QEMUSGList to the DMA layer
instead of the IDE layer.  However, if you leave it in the IDE layer, it
makes sense to leave qemu_sglist_destroy within the IDE layer as well.
That's because qemu_sglist_destroy is idempotent.

Moving the QEMUSGList to the DMA layer would be a relatively large
change, so I would keep it where it is now.

Paolo

Reply via email to