[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v2 09/13] scsi: introduce the scsi-target de
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [RFC PATCH v2 09/13] scsi: introduce the scsi-target device |
Date: |
Tue, 7 Jun 2011 09:09:54 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, Jun 06, 2011 at 06:04:18PM +0200, Paolo Bonzini wrote:
> +static SCSIRequest *scsi_new_request(SCSIDevice *d, DeviceState *initiator,
> + uint32_t tag, uint32_t lun)
> +{
> + SCSITargetState *s = DO_UPCAST(SCSITargetState, qdev, d);
> + SCSIRequest *req;
> + SCSITargetReq *r;
> +
> + req = scsi_req_alloc(sizeof(SCSITargetReq), &s->qdev, initiator, tag,
> lun);
> + r = DO_UPCAST(SCSITargetReq, req, req);
r not needed
> + return req;
> +}
> +
> +static void scsi_free_request(SCSIRequest *req)
> +{
> + SCSITargetReq *r = DO_UPCAST(SCSITargetReq, req, req);
> +
> + if (r->p_buf) {
> + qemu_free(r->p_buf);
> + }
qemu_free(NULL) is a nop, no need to check NULL
Stefan
- [Qemu-devel] [RFC PATCH v2 00/13] support hierarchical LUNs, Paolo Bonzini, 2011/06/06
- [Qemu-devel] [RFC PATCH v2 02/13] scsi: support parsing of SAM logical unit numbers, Paolo Bonzini, 2011/06/06
- [Qemu-devel] [RFC PATCH v2 01/13] scsi: cleanup reset and destroy callbacks, Paolo Bonzini, 2011/06/06
- [Qemu-devel] [RFC PATCH v2 03/13] scsi: add initiator field to SCSIRequest, Paolo Bonzini, 2011/06/06
- [Qemu-devel] [RFC PATCH v2 04/13] scsi: let a SCSIDevice have children devices, Paolo Bonzini, 2011/06/06
- [Qemu-devel] [RFC PATCH v2 05/13] scsi: let the bus pick a LUN for the child device, Paolo Bonzini, 2011/06/06
- [Qemu-devel] [RFC PATCH v2 06/13] scsi-generic: fix passthrough of devices with LUN != 0, Paolo Bonzini, 2011/06/06
- [Qemu-devel] [RFC PATCH v2 07/13] scsi: add walking of hierarchical LUNs, Paolo Bonzini, 2011/06/06
- [Qemu-devel] [RFC PATCH v2 08/13] scsi: introduce the scsi-path device, Paolo Bonzini, 2011/06/06
- [Qemu-devel] [RFC PATCH v2 09/13] scsi: introduce the scsi-target device, Paolo Bonzini, 2011/06/06
- Re: [Qemu-devel] [RFC PATCH v2 09/13] scsi: introduce the scsi-target device,
Stefan Hajnoczi <=
- [Qemu-devel] [RFC PATCH v2 10/13] scsi: include bus and device levels, Paolo Bonzini, 2011/06/06
- [Qemu-devel] [RFC PATCH v2 11/13] qdev: introduce automatic creation of buses, Paolo Bonzini, 2011/06/06
- [Qemu-devel] [RFC PATCH v2 12/13] scsi: create scsi-path and scsi-target devices automatically, Paolo Bonzini, 2011/06/06
- [Qemu-devel] [RFC PATCH v2 13/13] scsi: delete handling of REPORT LUNS and unknown LUNs outside scsi-target, Paolo Bonzini, 2011/06/06