From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XX4bO-0007F9-H3 for qemu-devel@nongnu.org; Thu, 25 Sep 2014 04:40:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XX4bF-0003aF-1S for qemu-devel@nongnu.org; Thu, 25 Sep 2014 04:40:38 -0400 Received: from mail-wg0-x22c.google.com ([2a00:1450:400c:c00::22c]:61450) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XX4bE-0003Yf-Ix for qemu-devel@nongnu.org; Thu, 25 Sep 2014 04:40:28 -0400 Received: by mail-wg0-f44.google.com with SMTP id z12so3679067wgg.15 for ; Thu, 25 Sep 2014 01:40:22 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5423D4F0.5000800@redhat.com> Date: Thu, 25 Sep 2014 10:40:16 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1411547278-25915-1-git-send-email-famz@redhat.com> <1411547278-25915-8-git-send-email-famz@redhat.com> <5422A894.6070806@redhat.com> <20140925020149.GD1990@fam-t430.nay.redhat.com> In-Reply-To: <20140925020149.GD1990@fam-t430.nay.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 7/7] virtio-scsi: Handle TMF request cancellation asynchronously List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi Il 25/09/2014 04:01, Fam Zheng ha scritto: >>> > > -static void virtio_scsi_do_tmf(VirtIOSCSI *s, VirtIOSCSIReq *req) >>> > > +typedef struct { >>> > > + VirtIOSCSIReq *tmf_req; >>> > > + int remaining; >>> > > +} VirtIOSCSICancelTracker; >> > >> > What about putting "remaining" directly in VirtIOSCSIReq? > It's rarely used, so I preferred managing it here. > It complicates the code though. If you really feel like economizing space, put it in a union with "QTAILQ_ENTRY(VirtIOSCSIReq) next;". Paolo